From 092dcdb6934524949b86f01528be68a344044d08 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 21 Jul 2008 19:54:54 +0000 Subject: [PATCH] 2008-07-21 21:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/gtwvt/gtwvt.h * added some definitions which seems to be missing in some MSVC-WinCE versions * harbour/source/rtl/gtwvt/gtwvt.c * cleaned SetWindowLongPtr()/SetWindowLong() usage so now all calls are protected by the same #if condition --- harbour/ChangeLog | 9 +++++++++ harbour/source/rtl/gtwvt/gtwvt.c | 8 ++++++-- harbour/source/rtl/gtwvt/gtwvt.h | 13 +++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7872a844c9..01be94ebee 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-07-21 21:54 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/gtwvt/gtwvt.h + * added some definitions which seems to be missing in some MSVC-WinCE + versions + + * harbour/source/rtl/gtwvt/gtwvt.c + * cleaned SetWindowLongPtr()/SetWindowLong() usage so now all calls + are protected by the same #if condition + 2008-07-21 19:05 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbwince.h * added DRIVE_UNKNOWN declaration for MSVC WinCE builds diff --git a/harbour/source/rtl/gtwvt/gtwvt.c b/harbour/source/rtl/gtwvt/gtwvt.c index b93c0524b0..107ae1b39f 100644 --- a/harbour/source/rtl/gtwvt/gtwvt.c +++ b/harbour/source/rtl/gtwvt/gtwvt.c @@ -1447,9 +1447,9 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara /* Enable "maximize" button */ #if defined(_MSC_VER) && (_MSC_VER <= 1200) - SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME ); -#else SetWindowLong( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME ); +#else + SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME ); #endif SetWindowPos( pWVT->hWnd, NULL, 0, 0, 0, 0, @@ -1477,7 +1477,11 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara hb_gt_wvt_FitSize( pWVT ); /* Disable "maximize" button */ +#if defined(_MSC_VER) && (_MSC_VER <= 1200) + SetWindowLong( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_THICKFRAME ); +#else SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_THICKFRAME ); +#endif SetWindowPos( pWVT->hWnd, NULL, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_DEFERERASE ); ShowWindow( pWVT->hWnd, SW_HIDE ); diff --git a/harbour/source/rtl/gtwvt/gtwvt.h b/harbour/source/rtl/gtwvt/gtwvt.h index 38a838aaaa..aebbb868fb 100644 --- a/harbour/source/rtl/gtwvt/gtwvt.h +++ b/harbour/source/rtl/gtwvt/gtwvt.h @@ -184,6 +184,19 @@ typedef struct #ifndef WM_MOUSEWHEEL # define WM_MOUSEWHEEL 0x020A #endif +#ifndef WM_ENTERSIZEMOVE +# define WM_ENTERSIZEMOVE 561 +#endif + +#ifndef SWP_DEFERERASE +# define SWP_DEFERERASE 0x2000 +#endif +#ifndef SW_NORMAL +# define SW_NORMAL 1 +#endif +#ifndef SC_MAXIMIZE +# define SC_MAXIMIZE 0xF030 +#endif #define SYS_EV_MARK 1000