diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5ca7497336..44739c580e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-11-16 07:29 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/gtwvg/gtwvg.c + * harbour/contrib/gtwvg/gtwvg.h + ! Further tuned up the resizing behavior. Viktor please check. + 2008-11-16 15:32 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbatomic.h + added support for built in GCC atomic functions: __sync_*() diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index cc32dff4cc..30f882c30e 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -359,6 +359,8 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow ) /* GUI Related members initialized */ hb_wvt_gtCreateObjects( pWVT ); + pWVT->bResizing = FALSE; + return pWVT; } @@ -788,6 +790,8 @@ static BOOL hb_gt_wvt_IsSizeChanged( PHB_GTWVT pWVT ) else bSizeChanged = hb_gt_wvt_FitRows( pWVT ); + pWVT->bResizing = FALSE; + if( bSizeChanged ) { PHB_ITEM pEvParams = hb_itemNew( NULL ); @@ -805,6 +809,15 @@ static BOOL hb_gt_wvt_IsSizeChanged( PHB_GTWVT pWVT ) hb_itemRelease( pEvParams ); } + else + { + InvalidateRect( pWVT->hWnd, NULL, FALSE ); + } + } + else + { + pWVT->bResizing = FALSE; + InvalidateRect( pWVT->hWnd, NULL, FALSE ); } return( bSizeChanged ); } @@ -1712,19 +1725,24 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara { RECT updateRect; - if( GetUpdateRect( hWnd, &updateRect, FALSE ) ) + if( !pWVT->bDeferPaint ) { - if( !pWVT->bDeferPaint ) + if( pWVT->bResizing ) { -//hb_ToOutDebug( "LLLLLLLLLLLLLLLLLLL hWnd=%i", hWnd ); - hb_gt_wvt_PaintText( pWVT, updateRect ); + return DefWindowProc( hWnd, message, wParam, lParam ); } else { -//hb_ToOutDebug( "................... hWnd=%i", hWnd ); - return DefWindowProc( hWnd, message, wParam, lParam ); + if( GetUpdateRect( hWnd, &updateRect, FALSE ) ) + { + hb_gt_wvt_PaintText( pWVT, updateRect ); + } } } + else + { + return DefWindowProc( hWnd, message, wParam, lParam ); + } return 0; } @@ -1851,6 +1869,7 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara ShowWindow( pWVT->hWnd, SW_HIDE ); ShowWindow( pWVT->hWnd, SW_NORMAL ); } + pWVT->bResizing = TRUE; return 0; case WM_EXITSIZEMOVE: diff --git a/harbour/contrib/gtwvg/gtwvg.h b/harbour/contrib/gtwvg/gtwvg.h index 9515412bad..6d73fcea82 100644 --- a/harbour/contrib/gtwvg/gtwvg.h +++ b/harbour/contrib/gtwvg/gtwvg.h @@ -421,6 +421,8 @@ typedef struct BOOL bDeferPaint; // To create pure Windows dialogs BOOL bTracking; // To track if mouse has eneter or left the window area + BOOL bResizing; // To know when it is in resizing mode + } HB_GTWVT, * PHB_GTWVT; //----------------------------------------------------------------------//