Converting POS application to xHarbour + FWH

Postby xhbcoder » Sun May 11, 2008 6:30 am

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
}
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Postby Antonio Linares » Sun May 11, 2008 7:05 am

Jose,

Change this line this way:

_retni( ( LONG ) CreateWindowEx(_parnl( 1 ), // Extended style
...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby xhbcoder » Sun May 11, 2008 10:50 pm

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
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Postby Antonio Linares » Sun May 11, 2008 11:36 pm

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);
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby xhbcoder » Mon May 12, 2008 1:27 am

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
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Postby Antonio Linares » Mon May 12, 2008 9:10 am

Jose,

> Is it okay to continue using the C function WMCopyData ?

If it works fine, yes :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby xhbcoder » Mon May 12, 2008 5:47 pm

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 :D
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Postby Antonio Linares » Mon May 12, 2008 6:10 pm

Jose,

Please replace ::nTop with WndTop( ::hWnd )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby xhbcoder » Mon May 12, 2008 6:18 pm

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)
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Postby Antonio Linares » Mon May 12, 2008 6:33 pm

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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby xhbcoder » Tue May 13, 2008 11:31 pm

Antonio,

I just send it to your private email.

Thank you for your support.

Regards,

Jose :D
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Postby Antonio Linares » Wed May 14, 2008 10:05 am

Jose,

We have not received it yet
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby xhbcoder » Wed May 14, 2008 2:55 pm

Antonio,

I send it again to alinares@fivetechsoft.com.

Regards,

Jose
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Postby Antonio Linares » Sun May 18, 2008 7:57 am

Jose,

Remove this line from pcregw.prg:

oMportal:destroy()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby xhbcoder » Mon May 19, 2008 3:40 pm

Antonio,

I commented that line but the same error showed up.

Thanks,

Jose
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

PreviousNext

Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 9 guests