diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 63ae9f6102..1e5acb116b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-02-04 02:15 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbwin/win_prn1.c + + Added support to pass HDCs as numeric parameters + to all Harbour level functions. + This allows them to behave as generic Windows API wrappers, + and makes WIN_MULDIV(), WIN_RECTANGLE(), WIN_SETBKMODE() + fully compatible with parallel GTWVG implementations, so + duplicated can now be removed from there. + 2009-02-04 01:36 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/arrays.c ! protection against possible GPF in hb_rAscan() if user block diff --git a/harbour/contrib/hbwin/win_prn1.c b/harbour/contrib/hbwin/win_prn1.c index c8cfd63830..a5286e38f6 100644 --- a/harbour/contrib/hbwin/win_prn1.c +++ b/harbour/contrib/hbwin/win_prn1.c @@ -104,9 +104,16 @@ static HB_GARBAGE_FUNC( win_HDC_release ) static HDC win_HDC_par( int iParam ) { - void ** phDC = ( void ** ) hb_parptrGC( win_HDC_release, iParam ); + if( ISNUM( iParam ) ) + { + return ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ); + } + else + { + void ** phDC = ( void ** ) hb_parptrGC( win_HDC_release, iParam ); - return phDC ? ( HDC ) * phDC : NULL; + return phDC ? ( HDC ) * phDC : NULL; + } } static HB_GARBAGE_FUNC( win_HPEN_release ) @@ -124,15 +131,6 @@ static HB_GARBAGE_FUNC( win_HPEN_release ) } } -/* -static HPEN win_HPEN_par( int iParam ) -{ - void ** phPEN = ( void ** ) hb_parptrGC( win_HPEN_release, iParam ); - - return phPEN ? ( HPEN ) * phPEN : NULL; -} -*/ - HB_FUNC( WIN_CREATEDC ) { if( ISCHAR( 1 ) )