2011-07-16 15:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* src/rtl/gtwvt/gtwvt.c
  * contrib/gtwvg/gtwvg.c
    ! fixed to use LONG instead of DWORD for GetWindowLong() values
    ! fixed to use LONG_PTR instead of LONG for GetWindowLongPtr() values
      on systems requiring it, f.e. win64 builds
    ; review me pls
    ; TODO: GTWVG would have to be synced with recent GTWVT changes
This commit is contained in:
Viktor Szakats
2011-07-16 14:00:32 +00:00
parent fef8b07037
commit 290be7f0e0
3 changed files with 38 additions and 25 deletions

View File

@@ -16,6 +16,15 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-07-16 15:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/gtwvt/gtwvt.c
* contrib/gtwvg/gtwvg.c
! fixed to use LONG instead of DWORD for GetWindowLong() values
! fixed to use LONG_PTR instead of LONG for GetWindowLongPtr() values
on systems requiring it, f.e. win64 builds
; review me pls
; TODO: GTWVG would have to be synced with recent GTWVT changes
2011-07-16 14:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbmlzo/core.c
! fixed to use hb_storns() instead of hb_storni() to make win64

View File

@@ -116,9 +116,9 @@ static HB_CRITICAL_NEW( s_wvtMtx );
# ifndef SetWindowLongPtr
# define SetWindowLongPtr SetWindowLong
# endif
#define WVT_DWORD_LONG_PTR DWORD
# define HB_GTWVT_LONG_PTR LONG
#else
#define WVT_DWORD_LONG_PTR LONG_PTR
# define HB_GTWVT_LONG_PTR LONG_PTR
#endif
#ifndef WS_OVERLAPPEDWINDOW
@@ -2678,8 +2678,8 @@ static HB_BOOL hb_gt_wvt_FullScreen( PHB_GT pGT )
{
PHB_GTWVT pWVT;
RECT rt;
DWORD dwStyle;
DWORD dwExtendedStyle;
HB_GTWVT_LONG_PTR nStyle;
HB_GTWVT_LONG_PTR nExtendedStyle;
#ifdef MONITOR_DEFAULTTONEAREST
HMONITOR mon;
MONITORINFO mi;
@@ -2691,16 +2691,16 @@ static HB_BOOL hb_gt_wvt_FullScreen( PHB_GT pGT )
pWVT = HB_GTWVT_GET( pGT );
dwStyle = GetWindowLongPtr( pWVT->hWnd, GWL_STYLE );
dwExtendedStyle = GetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE );
nStyle = GetWindowLongPtr( pWVT->hWnd, GWL_STYLE );
nExtendedStyle = GetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE );
if( pWVT->bFullScreen )
{
dwStyle |= WS_CAPTION | WS_BORDER;
dwExtendedStyle |= WS_EX_TOPMOST;
nStyle |= WS_CAPTION | WS_BORDER;
nExtendedStyle |= WS_EX_TOPMOST;
if( pWVT->bResizable )
dwStyle |= WS_THICKFRAME;
nStyle |= WS_THICKFRAME;
pWVT->MarginLeft = 0;
pWVT->MarginTop = 0;
@@ -2708,15 +2708,15 @@ static HB_BOOL hb_gt_wvt_FullScreen( PHB_GT pGT )
}
else
{
dwStyle &= ~( WS_CAPTION | WS_BORDER | WS_THICKFRAME );
dwExtendedStyle &= ~WS_EX_TOPMOST;
nStyle &= ~( WS_CAPTION | WS_BORDER | WS_THICKFRAME );
nExtendedStyle &= ~WS_EX_TOPMOST;
pWVT->bMaximized = HB_FALSE;
pWVT->bFullScreen = HB_TRUE;
}
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, dwStyle );
SetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE, dwExtendedStyle );
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, nStyle );
SetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE, nExtendedStyle );
if( ! pWVT->bFullScreen )
{
@@ -3453,7 +3453,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
pWVT->bResizable = bNewValue;
if( pWVT->hWnd )
{
WVT_DWORD_LONG_PTR style = GetWindowLongPtr( pWVT->hWnd, GWL_STYLE );
HB_GTWVT_LONG_PTR style = GetWindowLongPtr( pWVT->hWnd, GWL_STYLE );
if( pWVT->bResizable )
style = style | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME;
else

View File

@@ -116,6 +116,9 @@ static HB_CRITICAL_NEW( s_wvtMtx );
# ifndef SetWindowLongPtr
# define SetWindowLongPtr SetWindowLong
# endif
# define HB_GTWVT_LONG_PTR LONG
#else
# define HB_GTWVT_LONG_PTR LONG_PTR
#endif
#ifndef WS_OVERLAPPEDWINDOW
@@ -1972,8 +1975,9 @@ static HB_BOOL hb_gt_wvt_FullScreen( PHB_GT pGT )
{
PHB_GTWVT pWVT;
RECT rt;
DWORD dwStyle;
DWORD dwExtendedStyle;
HB_GTWVT_LONG_PTR nStyle;
HB_GTWVT_LONG_PTR nExtendedStyle;
/*Don't need this as Windows automatically maximizes to nearest [HVB]
#ifdef MONITOR_DEFAULTTONEAREST
@@ -1987,16 +1991,16 @@ static HB_BOOL hb_gt_wvt_FullScreen( PHB_GT pGT )
*/
pWVT = HB_GTWVT_GET( pGT );
dwStyle = GetWindowLongPtr( pWVT->hWnd, GWL_STYLE );
dwExtendedStyle = GetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE );
nStyle = GetWindowLongPtr( pWVT->hWnd, GWL_STYLE );
nExtendedStyle = GetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE );
if( pWVT->bFullScreen )
{
dwStyle |= WS_CAPTION | WS_BORDER;
dwExtendedStyle |= WS_EX_TOPMOST;
nStyle |= WS_CAPTION | WS_BORDER;
nExtendedStyle |= WS_EX_TOPMOST;
if( pWVT->bResizable )
dwStyle |= WS_THICKFRAME;
nStyle |= WS_THICKFRAME;
pWVT->MarginLeft = 0;
pWVT->MarginTop = 0;
@@ -2004,13 +2008,13 @@ static HB_BOOL hb_gt_wvt_FullScreen( PHB_GT pGT )
}
else
{
dwStyle &= ~( WS_CAPTION | WS_BORDER | WS_THICKFRAME );
dwExtendedStyle &= ~WS_EX_TOPMOST;
nStyle &= ~( WS_CAPTION | WS_BORDER | WS_THICKFRAME );
nExtendedStyle &= ~WS_EX_TOPMOST;
pWVT->bFullScreen = HB_TRUE;
}
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, dwStyle );
SetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE, dwExtendedStyle );
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, nStyle );
SetWindowLongPtr( pWVT->hWnd, GWL_EXSTYLE, nExtendedStyle );
if( !pWVT->bFullScreen )
{