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
This commit is contained in:
Przemyslaw Czerpak
2010-10-06 18:57:05 +00:00
parent 579935aa08
commit 2cf025fa75
3 changed files with 22 additions and 1 deletions

View File

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

View File

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

View File

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