Converting POS application to xHarbour + FWH
Antonio,
I made changes to the code as shown but there is a new error that showed up.
error e2340: Type mismatch in parameter 1 (wanted 'short', got "HWND_*) in function CREATEWINE
Thanks,
Jose
CLIPPER CREATEWINE() // ( nExtendedStyle, cClassName, cTitle, nStyle, nLeft, nTop, nWidth,
// nHeight, hWndOwner, hMenu, cExtraData ) --> hWnd
{
_retni( CreateWindowEx(_parnl( 1 ), // Extended style
_parc( 2 ), // Class
_parc( 3 ), // Title
_parnl( 4 ), // Style
_parni( 5 ), // Left
_parni( 6 ), // Top
_parni( 7 ), // Width
_parni( 8 ), // Height
(HWND)_parni( 9 ), // Parent
(HMENU)_parni( 10 ), // Menu
(HINSTANCE)__hInstance,
( PCOUNT() > 10 ) ? ( void FAR * ) _parc( 11 ): 0 ) ); // Address Window-Creation-Data
}
I made changes to the code as shown but there is a new error that showed up.
error e2340: Type mismatch in parameter 1 (wanted 'short', got "HWND_*) in function CREATEWINE
Thanks,
Jose
CLIPPER CREATEWINE() // ( nExtendedStyle, cClassName, cTitle, nStyle, nLeft, nTop, nWidth,
// nHeight, hWndOwner, hMenu, cExtraData ) --> hWnd
{
_retni( CreateWindowEx(_parnl( 1 ), // Extended style
_parc( 2 ), // Class
_parc( 3 ), // Title
_parnl( 4 ), // Style
_parni( 5 ), // Left
_parni( 6 ), // Top
_parni( 7 ), // Width
_parni( 8 ), // Height
(HWND)_parni( 9 ), // Parent
(HMENU)_parni( 10 ), // Menu
(HINSTANCE)__hInstance,
( PCOUNT() > 10 ) ? ( void FAR * ) _parc( 11 ): 0 ) ); // Address Window-Creation-Data
}
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
Thanks for the tip. I have already the main window.
You mentioned about the fwcopy16.prg. This means I cannot use the exisiting C function WMCopyData ?
There is only one error in this function (error E2349 Nonportable pointer conversion in this line:
cds.lpData =(long)_parc(3);
I tried to remove the conversion (long) it compiles but the main screen is still not responding.
Kindly comment. Thanks.
Regards,
Jose
Thanks for the tip. I have already the main window.
You mentioned about the fwcopy16.prg. This means I cannot use the exisiting C function WMCopyData ?
There is only one error in this function (error E2349 Nonportable pointer conversion in this line:
cds.lpData =(long)_parc(3);
I tried to remove the conversion (long) it compiles but the main screen is still not responding.
Kindly comment. Thanks.
Regards,
Jose
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Jose,
> This means I cannot use the exisiting C function WMCopyData ?
No, I didnt mean that. I dont know for sure what your application does. Are you providing some data to another application ?
>
There is only one error in this function (error E2349 Nonportable pointer conversion in this line:
>
cds.lpData = ( void * ) _parc(3);
> This means I cannot use the exisiting C function WMCopyData ?
No, I didnt mean that. I dont know for sure what your application does. Are you providing some data to another application ?
>
There is only one error in this function (error E2349 Nonportable pointer conversion in this line:
>
cds.lpData = ( void * ) _parc(3);
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
The main window is showing but not responding and the menu is not showing up. I commented a try() function and get the following runtime error at oRect:Move(Max(oRect:nTop, ::nTop ).
alert('oRect:nTop='+ valtype(::nTop) ) &&<-- this is equal to 'U'.
oRect:Move( max( oRect:nTop, ::nTop ), max( oRect:nLeft, ::nLeft ) )
Here's the error log:
Application
===========
Path and name: C:\pcrwin\PCREGW32.Exe (32 bits)
Size: 2,769,408 bytes
Time from start: 0 hours 0 mins 13 secs
Error occurred at: 05/12/08, 10:10:16
Error description: Error BASE/1093 Argument error: MAX
Args:
[ 1] = N 0
[ 2] = U
Stack Calls
===========
Called from: => MAX(0)
Called from: CRect.prg => CRECT:NEW(83)
Called from: CPcreg.prg => CPCREG:NEW(63)
Called from: PCREGW.PRG => WINMAIN(87)
May be this is related to the creation of main window in C.
Any idea?
Thanks,
Jose
The main window is showing but not responding and the menu is not showing up. I commented a try() function and get the following runtime error at oRect:Move(Max(oRect:nTop, ::nTop ).
alert('oRect:nTop='+ valtype(::nTop) ) &&<-- this is equal to 'U'.
oRect:Move( max( oRect:nTop, ::nTop ), max( oRect:nLeft, ::nLeft ) )
Here's the error log:
Application
===========
Path and name: C:\pcrwin\PCREGW32.Exe (32 bits)
Size: 2,769,408 bytes
Time from start: 0 hours 0 mins 13 secs
Error occurred at: 05/12/08, 10:10:16
Error description: Error BASE/1093 Argument error: MAX
Args:
[ 1] = N 0
[ 2] = U
Stack Calls
===========
Called from: => MAX(0)
Called from: CRect.prg => CRECT:NEW(83)
Called from: CPcreg.prg => CPCREG:NEW(63)
Called from: PCREGW.PRG => WINMAIN(87)
May be this is related to the creation of main window in C.
Any idea?
Thanks,
Jose
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
There is still an error. Message not found. Here's the error log.
Thanks,
Jose
Application
===========
Path and name: C:\pcrwin\PCREGW32.Exe (32 bits)
Size: 2,769,408 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 05/12/08, 11:11:35
Error description: Error BASE/1004 Message not found: CRECT:HWND
Stack Calls
===========
Called from: tobject.prg => CRECT:ERROR(172)
Called from: tobject.prg => CRECT:MSGNOTFOUND(205)
Called from: tobject.prg => CRECT:HWND(0)
Called from: CRect.prg => CRECT:NEW(83)
Called from: CPcreg.prg => CPCREG:NEW(63)
Called from: PCREGW.PRG => WINMAIN(87)
There is still an error. Message not found. Here's the error log.
Thanks,
Jose
Application
===========
Path and name: C:\pcrwin\PCREGW32.Exe (32 bits)
Size: 2,769,408 bytes
Time from start: 0 hours 0 mins 2 secs
Error occurred at: 05/12/08, 11:11:35
Error description: Error BASE/1004 Message not found: CRECT:HWND
Stack Calls
===========
Called from: tobject.prg => CRECT:ERROR(172)
Called from: tobject.prg => CRECT:MSGNOTFOUND(205)
Called from: tobject.prg => CRECT:HWND(0)
Called from: CRect.prg => CRECT:NEW(83)
Called from: CPcreg.prg => CPCREG:NEW(63)
Called from: PCREGW.PRG => WINMAIN(87)
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: