diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1cc9e166f2..8f1d7740ed 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-10-05 17:28 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/gtwvt/gtwvt.c + ! fixed font selection in UNICODE builds - it was not selected at all + ! fixed possible double font freeing in non UNICODE builds + 2009-10-05 14:45 UTC+0200 Maurilio Longo (maurilio.longo@libero.it) * config/os2/gcc.mk diff --git a/harbour/source/rtl/gtwvt/gtwvt.c b/harbour/source/rtl/gtwvt/gtwvt.c index 9bb5380559..aaf1ceb0b2 100644 --- a/harbour/source/rtl/gtwvt/gtwvt.c +++ b/harbour/source/rtl/gtwvt/gtwvt.c @@ -772,7 +772,7 @@ static void hb_gt_wvt_ResetWindowSize( PHB_GTWVT pWVT, HFONT hFont ) #if ! defined( UNICODE ) if( pWVT->hFont ) DeleteObject( pWVT->hFont ); - if( pWVT->hFontBox ) + if( pWVT->hFontBox && pWVT->hFontBox != pWVT->hFont ) DeleteObject( pWVT->hFontBox ); if( pWVT->CodePage == pWVT->boxCodePage ) pWVT->hFontBox = hFont; @@ -1542,6 +1542,9 @@ static void hb_gt_wvt_PaintText( PHB_GTWVT pWVT, RECT updateRect ) TCHAR text[ WVT_MAX_ROWS ]; hdc = BeginPaint( pWVT->hWnd, &ps ); +#if defined( UNICODE ) + SelectObject( hdc, pWVT->hFont ); +#endif rcRect = hb_gt_wvt_GetColRowFromXYRect( pWVT, updateRect );