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.
This commit is contained in:
Viktor Szakats
2009-02-04 01:16:33 +00:00
parent ca6779b236
commit fcf54d9256
2 changed files with 18 additions and 11 deletions

View File

@@ -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

View File

@@ -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 ) )