diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a937558d8b..5bd1f6de97 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-22 18:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/hbwin/wapi_wingdi.c + - Dropped array support for DOCINFO parameter. + ; Array has only any point for really simple/obvious structures + like point and rect, for anything more complicated hash is + a much convenient answer (don't have to remember structure + member positions, can pass them in any order and combination, + and MSDN docs can be used when coding .prg for Windows). + + * contrib/hbwin/tests/testgdi.prg + % Inlined DOCINFO hash parameter syntax. + 2010-01-22 17:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/strapi.c * allow to pass NULL as item pointer in hb_item{Get,Copy}Str*() functions @@ -47,7 +59,7 @@ ; TODO: Low-level string handling functions will GPF yet if the related hashes are missing (f.e. in posted test code). This requires proposed extra - guards in low-level string functions. + guards in low-level string functions. [DONE] + WAPI_STARTDOC() changed to use hbwapi_par_DOCINFO(). % Minor cleanup in WAPI_SELECTOBJECT(). diff --git a/harbour/contrib/hbwin/tests/testgdi.prg b/harbour/contrib/hbwin/tests/testgdi.prg index 9fefc09043..1fac0e4bf1 100644 --- a/harbour/contrib/hbwin/tests/testgdi.prg +++ b/harbour/contrib/hbwin/tests/testgdi.prg @@ -17,7 +17,6 @@ PROCEDURE Main() LOCAL hDC - LOCAL hDOCINFO LOCAL hDEVMODE LOCAL hRECT LOCAL aRECT @@ -26,9 +25,7 @@ PROCEDURE Main() hDEVMODE := hb_hash() ? hDC := wapi_CreateDC( NIL, "Microsoft XPS Document Writer", NIL, hDEVMODE ) - hDOCINFO := hb_hash() - hDOCINFO[ "lpszDocName" ] := "test job" - ? wapi_StartDoc( hDC, hDOCINFO ) + ? wapi_StartDoc( hDC, { "lpszDocName" => "test job" } /* DOCINFO */ ) ? wapi_StartPage( hDC ) ? hOBJECT := wapi_CreateFont( ,,,,,,,,,,,,, "Arial" ) ? wapi_SelectObject( hDC, hOBJECT ) diff --git a/harbour/contrib/hbwin/wapi_wingdi.c b/harbour/contrib/hbwin/wapi_wingdi.c index fbbe2d02d8..50d439388a 100644 --- a/harbour/contrib/hbwin/wapi_wingdi.c +++ b/harbour/contrib/hbwin/wapi_wingdi.c @@ -241,15 +241,6 @@ DOCINFO * hbwapi_par_DOCINFO( DOCINFO * p, int iParam, HB_BOOL bMandatory, void return p; } - else if( pStru && HB_IS_ARRAY( pStru ) && hb_arrayLen( pStru ) >= 4 ) - { - p->lpszDocName = HB_ARRAYGETSTR( pStru, 1, &h[ 0 ], NULL ); /* DEF? */ - p->lpszOutput = HB_ARRAYGETSTR( pStru, 2, &h[ 1 ], NULL ); - p->lpszDatatype = HB_ARRAYGETSTR( pStru, 3, &h[ 2 ], NULL ); - p->fwType = ( DWORD ) hb_arrayGetNL( pStru, 4 ); - - return p; - } else if( bMandatory ) return p;