xHarbour/FWH/Canal 5 Calendar

xHarbour/FWH/Canal 5 Calendar

Postby Randal » Wed Oct 26, 2005 5:50 pm

All,

I posted a msg a few days ago about a problem I'm having since upgrading to the latest xHarbour Oct 2005 w/xcc. When I start my app I get the Windows "myapp.exe has encountered a problem and needs to close". I've narrowed it down to canal 5 calendar code. There are some .prg's and one .c source file being linked in. I've included below the .c source below. Can you see anything in this source that would cause a problem? Is anyone else using the C5 Calendar control? Using FWH Jan 2005.

#include <hbapi.h>
#include <windows.h>

BOOL WINAPI StretchBlt(HDC, int, int, int, int, HDC, int, int, int, int, DWORD);

HB_FUNC( COMPATDC ) // ( hDC )
{
hb_retnl( ( LONG ) CreateCompatibleDC( ( HDC ) hb_parnl( 1 ) ) );
// hb_retni( CreateCompatibleDC( hb_parnl( 1 ) ) );

}


HB_FUNC( COMPATBMP ) // ( hDC, nWidth, nHeight )
{

hb_retnl( (LONG) CreateCompatibleBitmap( (HDC) hb_parnl(1),hb_parni(2), hb_parni(3) ) );

}


HB_FUNC( BITBLT ) // ( hdcDest, nXDest, nYDest, nWidth, nHeight,hdcSrc, nXSrc , nYSrc, dwRop )
{
hb_retl( BitBlt( ( HDC ) hb_parnl( 1 ), hb_parni( 2 ), hb_parni( 3 ),
hb_parni( 4 ), hb_parni( 5 ), ( HDC ) hb_parnl( 6 ),
hb_parni( 7 ), hb_parni( 8 ), hb_parnl( 9 ) ) );
}



HB_FUNC( STRETCHBLT )
{
hb_retl(StretchBlt( ( HDC ) hb_parnl(1),hb_parni(2),hb_parni(3),hb_parni(4),hb_parni(5),
( HDC ) hb_parnl(6),hb_parni(7),hb_parni(8),hb_parni(9),hb_parni(10),
hb_parni(11)));


}

Thanks,
Randal Ferguson
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Postby Randal » Thu Oct 27, 2005 7:46 pm

Never mind, I figured it out.

Thanks,
Randal Ferguson
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Postby Taiwan » Fri Oct 28, 2005 1:35 am

Hello

I use xHarbour 0.99.4+FWH26 SEPT+C5 Calendar no problem.

Regards,

Richard
http://www.fivetech.com.tw
User avatar
Taiwan
 
Posts: 218
Joined: Fri Oct 07, 2005 1:55 am
Location: Taipei, Taiwan

Postby Antonio Linares » Fri Oct 28, 2005 5:36 am

Randal Ferguson wrote:Never mind, I figured it out.


Would you mind to share it with us ?

I would suggest to change all hb_parni() to hb_parnl() calls.
regards, saludos

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

Postby Silvio » Wed Nov 09, 2005 11:22 am

I use it ....no Problem
I have convert also the banner class and grid class

the C5.c is here :


Code: Select all  Expand view
#include <hbapi.h>
#include <windows.h>



BOOL    WINAPI StretchBlt(HDC, int, int, int, int, HDC, int, int, int, int, DWORD);

HB_FUNC( COMPATDC ) // ( hDC )
{
   hb_retnl( ( LONG ) CreateCompatibleDC( ( HDC ) hb_parnl( 1 ) ) );
   // hb_retni( CreateCompatibleDC( hb_parnl( 1 ) ) );

}


HB_FUNC( COMPATBMP ) // ( hDC, nWidth, nHeight )
{

    hb_retnl( (LONG) CreateCompatibleBitmap( (HDC) hb_parnl(1),hb_parni(2), hb_parni(3) ) );

}


HB_FUNC( BITBLT ) // ( hdcDest, nXDest, nYDest, nWidth, nHeight,hdcSrc,  nXSrc , nYSrc, dwRop )
{
     hb_retl( BitBlt( ( HDC ) hb_parnl( 1 ), hb_parni( 2 ), hb_parni( 3 ),
                  hb_parni( 4 ), hb_parni( 5 ), ( HDC ) hb_parnl( 6 ),
                  hb_parni( 7 ), hb_parni( 8 ), hb_parnl( 9 ) ) );
}



HB_FUNC( STRETCHBLT )
{
   hb_retl(StretchBlt( ( HDC ) hb_parnl(1),hb_parni(2),hb_parni(3),hb_parni(4),hb_parni(5),
                     ( HDC ) hb_parnl(6),hb_parni(7),hb_parni(8),hb_parni(9),hb_parni(10),
                     hb_parni(11)));


}

User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 54 guests