2012-04-17 13:02 UTC+0200 Viktor Szakats (harbour syenar.net)
* src/rtl/run.c
* src/rtl/hbrunfun.c
* experimental: use hb_processRun() on all win targets
(was wince targets) instead of system() from C RTL.
QUESTION: do the same for all platforms?
* contrib/hbwin/win_prn1.c
* contrib/hbwin/hbwin.ch
* contrib/hbwin/hbwin.hbx
+ WIN_ENUMFONTS() modified to work also when no HDC is passed.
+ WIN_ENUMFONTFAMILIES( [ <nCharset> ][, <cName> ] ) -> <aFonts>
* contrib/gtwvg/wvgcuig.c
* contrib/gtwvg/wvgcore.c
! fixed possible GPF in some functions if font name was not passed
This commit is contained in:
@@ -16,14 +16,31 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-04-17 13:02 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* src/rtl/run.c
|
||||
* src/rtl/hbrunfun.c
|
||||
* experimental: use hb_processRun() on all win targets
|
||||
(was wince targets) instead of system() from C RTL.
|
||||
QUESTION: do the same for all platforms?
|
||||
|
||||
* contrib/hbwin/win_prn1.c
|
||||
* contrib/hbwin/hbwin.ch
|
||||
* contrib/hbwin/hbwin.hbx
|
||||
+ WIN_ENUMFONTS() modified to work also when no HDC is passed.
|
||||
+ WIN_ENUMFONTFAMILIES( [ <nCharset> ][, <cName> ] ) -> <aFonts>
|
||||
|
||||
* contrib/gtwvg/wvgcuig.c
|
||||
* contrib/gtwvg/wvgcore.c
|
||||
! fixed possible GPF in some functions if font name was not passed
|
||||
|
||||
2012-04-12 12:35 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
* INSTALL
|
||||
+ extended TROUBLESHOOTING about generic common-sense
|
||||
information about not overdoing custom configuration,
|
||||
especially for C compiler. I didn't specifically include
|
||||
anything about bcc, but let me here note, that hbmk2
|
||||
and Harbour core build system doesn't require bcc32.cfg
|
||||
and ilink32.cfg to be _present at all_ since quite long,
|
||||
+ extended TROUBLESHOOTING about generic common-sense
|
||||
information about not overdoing custom configuration,
|
||||
especially for C compiler. I didn't specifically include
|
||||
anything about bcc, but let me here note, that hbmk2
|
||||
and Harbour core build system doesn't require bcc32.cfg
|
||||
and ilink32.cfg to be _present at all_ since quite long,
|
||||
so please remove them for best results.
|
||||
|
||||
2012-04-12 00:13 UTC+0200 Viktor Szakats (harbour syenar.net)
|
||||
|
||||
@@ -1198,7 +1198,7 @@ HB_FUNC( WVT_DRAWLABEL )
|
||||
POINT xy = { 0, 0 };
|
||||
HFONT hFont, hOldFont, hOldFontGui;
|
||||
LOGFONT logfont; /* = { 0 };*/
|
||||
void * hText;
|
||||
void * hText = NULL;
|
||||
|
||||
logfont.lfEscapement = hb_parni( 5 ) * 10;
|
||||
logfont.lfOrientation = 0;
|
||||
@@ -2912,7 +2912,7 @@ HB_FUNC( WVT_CREATEFONT )
|
||||
PHB_GTWVT _s = hb_wvt_gtGetWVT();
|
||||
|
||||
LOGFONT logfont; /* = { 0,0,0 }; */
|
||||
void * hText;
|
||||
void * hText = NULL;
|
||||
|
||||
logfont.lfEscapement = hb_parni( 10 ) * 10;
|
||||
logfont.lfOrientation = 0;
|
||||
@@ -2998,7 +2998,7 @@ HB_FUNC( WVT_LOADFONT )
|
||||
LOGFONT logfont; /* = { 0 }; */
|
||||
int iSlot = hb_parni( 1 ) - 1;
|
||||
HFONT hFont;
|
||||
void * hF;
|
||||
void * hF = NULL;
|
||||
|
||||
logfont.lfEscapement = hb_parni( 11 ) * 10;
|
||||
logfont.lfOrientation = 0;
|
||||
@@ -3014,7 +3014,7 @@ HB_FUNC( WVT_LOADFONT )
|
||||
logfont.lfHeight = hb_parnidef( 3, _s->fontHeight );
|
||||
logfont.lfWidth = hb_parnidef( 4, _s->fontWidth < 0 ? -_s->fontWidth : _s->fontWidth );
|
||||
|
||||
HB_STRNCPY( logfont.lfFaceName, ( ! HB_ISCHAR( 2 ) ? _s->fontFace : HB_PARSTR( 2, &hF, NULL ) ), HB_SIZEOFARRAY( logfont.lfFaceName ) - 1 );
|
||||
HB_STRNCPY( logfont.lfFaceName, ( HB_ISCHAR( 2 ) ? HB_PARSTR( 2, &hF, NULL ) : _s->fontFace ), HB_SIZEOFARRAY( logfont.lfFaceName ) - 1 );
|
||||
hb_strfree( hF );
|
||||
|
||||
hFont = CreateFontIndirect( &logfont );
|
||||
|
||||
@@ -590,7 +590,7 @@ HB_FUNC( WVG_LABEL )
|
||||
PHB_GTWVT pWVT = hb_wvt_gtGetWVT();
|
||||
LOGFONT lf;
|
||||
HFONT hFont;
|
||||
void * hText;
|
||||
void * hText = NULL;
|
||||
|
||||
lf.lfEscapement = hb_parni( 6 ) * 10;
|
||||
lf.lfOrientation = 0;
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
#define HB_WINPRN_SERVER 6
|
||||
#define HB_WINPRN_LEN_ 6
|
||||
|
||||
/* WIN_ENUMFONTS() positions for array returned */
|
||||
/* WIN_ENUMFONTS()/WIN_ENUMFONTFAMILIES() positions for array returned */
|
||||
#define HB_WINFONT_NAME 1
|
||||
#define HB_WINFONT_FIXED 2
|
||||
#define HB_WINFONT_TRUETYPE 3
|
||||
|
||||
@@ -318,6 +318,7 @@ DYNAMIC WIN_DRAWBITMAP
|
||||
DYNAMIC WIN_ELLIPSE
|
||||
DYNAMIC WIN_ENDDOC
|
||||
DYNAMIC WIN_ENDPAGE
|
||||
DYNAMIC WIN_ENUMFONTFAMILIES
|
||||
DYNAMIC WIN_ENUMFONTS
|
||||
DYNAMIC WIN_FILLRECT
|
||||
DYNAMIC WIN_GETCHARSIZE
|
||||
|
||||
@@ -556,23 +556,52 @@ static int CALLBACK FontEnumCallBack( LOGFONT * lplf, TEXTMETRIC * lpntm,
|
||||
|
||||
hb_itemRelease( pSubItems );
|
||||
|
||||
return HB_TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HB_FUNC( WIN_ENUMFONTS )
|
||||
{
|
||||
HDC hDC = hbwapi_par_HDC( 1 );
|
||||
HB_BOOL fNullDC = ( ! hDC );
|
||||
PHB_ITEM pArray = hb_itemArrayNew( 0 );
|
||||
|
||||
if( hDC )
|
||||
if( fNullDC )
|
||||
hDC = GetDC( NULL );
|
||||
|
||||
EnumFonts( hDC, ( LPCTSTR ) NULL, ( FONTENUMPROC ) FontEnumCallBack, ( LPARAM ) pArray );
|
||||
|
||||
if( fNullDC )
|
||||
ReleaseDC( NULL, hDC );
|
||||
|
||||
hb_itemReturnRelease( pArray );
|
||||
}
|
||||
|
||||
HB_FUNC( WIN_ENUMFONTFAMILIES )
|
||||
{
|
||||
HDC hDC = hbwapi_par_HDC( 1 );
|
||||
HB_BOOL fNullDC = ( ! hDC );
|
||||
LOGFONT Logfont;
|
||||
PHB_ITEM pArray = hb_itemArrayNew( 0 );
|
||||
|
||||
memset( &Logfont, 0, sizeof( Logfont ) );
|
||||
|
||||
Logfont.lfCharSet = ( BYTE ) hb_parnidef( 1, DEFAULT_CHARSET );
|
||||
if( HB_ISCHAR( 2 ) )
|
||||
{
|
||||
PHB_ITEM pArray = hb_itemArrayNew( 0 );
|
||||
|
||||
EnumFonts( hDC, ( LPCTSTR ) NULL, ( FONTENUMPROC ) FontEnumCallBack, ( LPARAM ) pArray );
|
||||
|
||||
hb_itemReturnRelease( pArray );
|
||||
void * hText;
|
||||
HB_STRNCPY( Logfont.lfFaceName, HB_PARSTR( 2, &hText, NULL ), HB_SIZEOFARRAY( Logfont.lfFaceName ) - 1 );
|
||||
hb_strfree( hText );
|
||||
}
|
||||
else
|
||||
hb_reta( 0 );
|
||||
|
||||
if( fNullDC )
|
||||
hDC = GetDC( NULL );
|
||||
|
||||
EnumFontFamiliesEx( hDC, &Logfont, ( FONTENUMPROC ) FontEnumCallBack, ( LPARAM ) pArray, 0 );
|
||||
|
||||
if( fNullDC )
|
||||
ReleaseDC( NULL, hDC );
|
||||
|
||||
hb_itemReturnRelease( pArray );
|
||||
}
|
||||
|
||||
HB_FUNC( WIN_SETCOLOR )
|
||||
|
||||
@@ -66,7 +66,7 @@ HB_FUNC( HB_RUN )
|
||||
|
||||
if( hb_gtSuspend() == HB_SUCCESS )
|
||||
{
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
#if defined( HB_OS_WIN )
|
||||
iResult = hb_fsProcessRun( pszCommand,
|
||||
NULL, 0, NULL, NULL, NULL, NULL, HB_FALSE );
|
||||
#else
|
||||
|
||||
@@ -65,7 +65,7 @@ HB_FUNC( __RUN )
|
||||
|
||||
if( pszCommand && hb_gtSuspend() == 0 )
|
||||
{
|
||||
#if defined( HB_OS_WIN_CE )
|
||||
#if defined( HB_OS_WIN )
|
||||
hb_fsProcessRun( pszCommand, NULL, 0, NULL, NULL, NULL, NULL, HB_FALSE );
|
||||
#else
|
||||
char * pszFree = NULL;
|
||||
|
||||
Reference in New Issue
Block a user