diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7969554ead..40a95f5cda 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2010-10-06 20:56 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/gtwvt/gtwvt.c + ! fixed possible double font freeing in non UNICODE builds + + * harbour/contrib/hbwin/win_misc.c + + added prg function WIN_UNICODE() which returns logical value + indicating if UNICODE macro was used or not + 2010-10-06 08:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + contrib/hbqt/qtgui/doc/en/class_qcommonstyle.txt + contrib/hbqt/qtgui/doc/en/class_qdateedit.txt diff --git a/harbour/contrib/hbwin/win_misc.c b/harbour/contrib/hbwin/win_misc.c index 9598fe6c77..a873c3a500 100644 --- a/harbour/contrib/hbwin/win_misc.c +++ b/harbour/contrib/hbwin/win_misc.c @@ -205,6 +205,15 @@ HB_FUNC( WIN_WIDETOANSI ) hb_retclen_buffer( lpDstMB, ( HB_SIZE ) dwLength ); } +HB_FUNC( WIN_UNICODE ) +{ +#if defined( UNICODE ) + hb_retl( HB_TRUE ); +#else + hb_retl( HB_FALSE ); +#endif +} + HB_FUNC( WIN_N2P ) { hb_retptr( ( void * ) ( HB_PTRDIFF ) hb_parnint( 1 ) ); diff --git a/harbour/src/rtl/gtwvt/gtwvt.c b/harbour/src/rtl/gtwvt/gtwvt.c index a574715bf1..8cb91c4f2c 100644 --- a/harbour/src/rtl/gtwvt/gtwvt.c +++ b/harbour/src/rtl/gtwvt/gtwvt.c @@ -2307,7 +2307,11 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) pWVT->fontWeight, pWVT->fontQuality, iVal ); if( hFont ) { +#if !defined( UNICODE ) + if( pWVT->hFont && pWVT->hFont != pWVT->hFontBox ) +#else if( pWVT->hFont ) +#endif DeleteObject( pWVT->hFont ); pWVT->hFont = hFont; pWVT->CodePage = iVal; @@ -2354,7 +2358,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) pWVT->fontWeight, pWVT->fontQuality, iVal ); if( hFont ) { - if( pWVT->hFontBox ) + if( pWVT->hFontBox && pWVT->hFontBox != pWVT->hFont ) DeleteObject( pWVT->hFontBox ); pWVT->hFontBox = hFont; pWVT->boxCodePage = iVal;