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.
This commit is contained in:
Viktor Szakats
2010-01-22 17:28:38 +00:00
parent 492f8fb1fd
commit e37d3cfa86
3 changed files with 14 additions and 14 deletions

View File

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

View File

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

View File

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