Page 3 of 4
Posted:
Sun May 11, 2008 6:30 am
by xhbcoder
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
}
Posted:
Sun May 11, 2008 7:05 am
by Antonio Linares
Jose,
Change this line this way:
_retni( ( LONG ) CreateWindowEx(_parnl( 1 ), // Extended style
...
Posted:
Sun May 11, 2008 10:50 pm
by xhbcoder
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
Posted:
Sun May 11, 2008 11:36 pm
by Antonio Linares
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);
Posted:
Mon May 12, 2008 1:27 am
by xhbcoder
Antonio,
Thanks, the compiler error go away.
>> Are you providing some data to another application?
Yes it is.
Is it okay to continue using the C function WMCopyData ?
Regards,
Jose
Posted:
Mon May 12, 2008 9:10 am
by Antonio Linares
Jose,
> Is it okay to continue using the C function WMCopyData ?
If it works fine, yes
Posted:
Mon May 12, 2008 5:47 pm
by xhbcoder
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
Posted:
Mon May 12, 2008 6:10 pm
by Antonio Linares
Jose,
Please replace ::nTop with WndTop( ::hWnd )
Posted:
Mon May 12, 2008 6:18 pm
by xhbcoder
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)
Posted:
Mon May 12, 2008 6:33 pm
by Antonio Linares
Jose,
If you keep the handle of the window somewhere, use it here:
WndTop( hWnd ) // notice we don't use ::
If you provide us a small and self contained PRG then we may be able to provide you a better tech support
Posted:
Tue May 13, 2008 11:31 pm
by xhbcoder
Antonio,
I just send it to your private email.
Thank you for your support.
Regards,
Jose
Posted:
Wed May 14, 2008 10:05 am
by Antonio Linares
Jose,
We have not received it yet
Posted:
Wed May 14, 2008 2:55 pm
by xhbcoder
Antonio,
I send it again to
alinares@fivetechsoft.com.
Regards,
Jose
Posted:
Sun May 18, 2008 7:57 am
by Antonio Linares
Jose,
Remove this line from pcregw.prg:
oMportal:destroy()
Posted:
Mon May 19, 2008 3:40 pm
by xhbcoder
Antonio,
I commented that line but the same error showed up.
Thanks,
Jose