2009-07-01 08:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* source/rtl/gtwvt/gtwvt.c
! Fixed maximize button state when HB_GTI_RESIZABLE is set to .T.
before the window is drawn.
Please test.
% Cleaned windows style definitions in source.
* include/hbstack.h
* include/hbapi.h
* Formatting in comment.
This commit is contained in:
@@ -17,6 +17,17 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-07-01 08:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* source/rtl/gtwvt/gtwvt.c
|
||||
! Fixed maximize button state when HB_GTI_RESIZABLE is set to .T.
|
||||
before the window is drawn.
|
||||
Please test.
|
||||
% Cleaned windows style definitions in source.
|
||||
|
||||
* include/hbstack.h
|
||||
* include/hbapi.h
|
||||
* Formatting in comment.
|
||||
|
||||
2009-06-30 19:17 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* harbour/contrib/hbqt/hbqt.ch
|
||||
+ Added more constants
|
||||
|
||||
@@ -613,8 +613,8 @@ extern HB_EXPORT const char * hb_parc( int iParam ); /* retrieve a string parame
|
||||
extern HB_EXPORT const char * hb_parcx( int iParam ); /* retrieve a string parameter */
|
||||
extern HB_EXPORT ULONG hb_parclen( int iParam ); /* retrieve a string parameter length */
|
||||
extern HB_EXPORT ULONG hb_parcsiz( int iParam ); /* retrieve a by-reference string parameter length, including terminator */
|
||||
extern HB_EXPORT char * hb_pards( int iParam ); /* retrieve a date as a string yyyymmdd */
|
||||
extern HB_EXPORT char * hb_pardsbuff( char * szDate, int iParam ); /* retrieve a date as a string yyyymmdd */
|
||||
extern HB_EXPORT char * hb_pards( int iParam ); /* retrieve a date as a string YYYYMMDD */
|
||||
extern HB_EXPORT char * hb_pardsbuff( char * szDate, int iParam ); /* retrieve a date as a string YYYYMMDD */
|
||||
extern HB_EXPORT LONG hb_pardl( int iParam ); /* retrieve a date as a LONG NUMBER */
|
||||
extern HB_EXPORT double hb_partd( int iParam ); /* retrieve a timestamp as a double number */
|
||||
extern HB_EXPORT BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam ); /* retrieve a timestamp as two long numbers */
|
||||
@@ -633,8 +633,8 @@ extern HB_EXPORT const char * hb_parvc( int iParam, ... ); /* retrieve a string
|
||||
extern HB_EXPORT const char * hb_parvcx( int iParam, ... ); /* retrieve a string parameter */
|
||||
extern HB_EXPORT ULONG hb_parvclen( int iParam, ... ); /* retrieve a string parameter length */
|
||||
extern HB_EXPORT ULONG hb_parvcsiz( int iParam, ... ); /* retrieve a by-reference string parameter length, including terminator */
|
||||
extern HB_EXPORT char * hb_parvds( int iParam, ... ); /* retrieve a date as a string yyyymmdd */
|
||||
extern HB_EXPORT char * hb_parvdsbuff( char * szDate, int iParam, ... ); /* retrieve a date as a string yyyymmdd */
|
||||
extern HB_EXPORT char * hb_parvds( int iParam, ... ); /* retrieve a date as a string YYYYMMDD */
|
||||
extern HB_EXPORT char * hb_parvdsbuff( char * szDate, int iParam, ... ); /* retrieve a date as a string YYYYMMDD */
|
||||
extern HB_EXPORT LONG hb_parvdl( int iParam, ... ); /* retrieve a date as a LONG NUMBER */
|
||||
extern HB_EXPORT double hb_parvtd( int iParam, ... ); /* retrieve a timestamp as a double number */
|
||||
extern HB_EXPORT BOOL hb_parvtdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... ); /* retrieve a timestamp as two long numbers */
|
||||
@@ -657,7 +657,7 @@ extern HB_EXPORT void hb_retc_buffer( char * szText ); /* sames as above, but
|
||||
extern HB_EXPORT void hb_retc_const( const char * szText ); /* returns a string as a pcode based string */
|
||||
extern HB_EXPORT void hb_retclen( const char * szText, ULONG ulLen ); /* returns a string with a specific length */
|
||||
extern HB_EXPORT void hb_retclen_buffer( char * szText, ULONG ulLen ); /* sames as above, but accepts an allocated buffer */
|
||||
extern HB_EXPORT void hb_retds( const char * szDate ); /* returns a date, must use yyyymmdd format */
|
||||
extern HB_EXPORT void hb_retds( const char * szDate ); /* returns a date, must use YYYYMMDD format */
|
||||
extern HB_EXPORT void hb_retd( int iYear, int iMonth, int iDay ); /* returns a date */
|
||||
extern HB_EXPORT void hb_retdl( long lJulian ); /* returns a long value as a julian date */
|
||||
extern HB_EXPORT void hb_rettd( double dTimeStamp ); /* returns a double value as a timestamp */
|
||||
@@ -727,7 +727,7 @@ extern HB_EXPORT void hb_retnlllen( LONGLONG lNumber, int iWidth ); /* returns
|
||||
extern HB_EXPORT int hb_storc( const char * szText, int iParam ); /* stores a szString on a variable by reference */
|
||||
extern HB_EXPORT int hb_storclen( const char * szText, ULONG ulLength, int iParam ); /* stores a fixed length string on a variable by reference */
|
||||
extern HB_EXPORT int hb_storclen_buffer( char * szText, ULONG ulLength, int iParam ); /* stores a fixed length string buffer on a variable by reference */
|
||||
extern HB_EXPORT int hb_stords( const char * szDate, int iParam ); /* szDate must have yyyymmdd format */
|
||||
extern HB_EXPORT int hb_stords( const char * szDate, int iParam ); /* szDate must have YYYYMMDD format */
|
||||
extern HB_EXPORT int hb_stordl( long lJulian, int iParam ); /* lJulian must be a date in Julian format */
|
||||
extern HB_EXPORT int hb_stortd( double dTimeStamp, int iParam ); /* stores a double value as timestamp on a variable by reference */
|
||||
extern HB_EXPORT int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam ); /* stores two long values as timestamp on a variable by reference */
|
||||
@@ -745,7 +745,7 @@ extern HB_EXPORT int hb_stornll( LONGLONG lValue, int iParam ); /* stores a l
|
||||
extern HB_EXPORT int hb_storvc( const char * szText, int iParam, ... ); /* stores a szString on a variable by reference */
|
||||
extern HB_EXPORT int hb_storvclen( const char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string on a variable by reference */
|
||||
extern HB_EXPORT int hb_storvclen_buffer( char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string buffer on a variable by reference */
|
||||
extern HB_EXPORT int hb_storvds( const char * szDate, int iParam, ... ); /* szDate must have yyyymmdd format */
|
||||
extern HB_EXPORT int hb_storvds( const char * szDate, int iParam, ... ); /* szDate must have YYYYMMDD format */
|
||||
extern HB_EXPORT int hb_storvdl( long lJulian, int iParam, ... ); /* lJulian must be a date in Julian format */
|
||||
extern HB_EXPORT int hb_storvtd( double dTimeStamp, int iParam, ... ); /* stores a double value as timestamp on a variable by reference */
|
||||
extern HB_EXPORT int hb_storvtdt( LONG lJulian, LONG lMilliSec, int iParam, ... ); /* stores two long values as timestamp on a variable by reference */
|
||||
|
||||
@@ -164,7 +164,7 @@ typedef struct
|
||||
USHORT uiQuitState; /* HVM is quiting */
|
||||
HB_STACK_STATE state; /* first (default) stack state frame */
|
||||
HB_STACKRDD rdd; /* RDD related data */
|
||||
char szDate[ 9 ]; /* last returned date from _pards() yyyymmdd format */
|
||||
char szDate[ 9 ]; /* last returned date from hb_pards() YYYYMMDD format */
|
||||
void * pCDP; /* current codepage module */
|
||||
void * pLang; /* current language module */
|
||||
void * pI18N; /* current I18N module */
|
||||
|
||||
@@ -104,6 +104,10 @@ static HB_CRITICAL_NEW( s_wvtMtx );
|
||||
#define HB_WVT_LOCK hb_threadEnterCriticalSection( &s_wvtMtx );
|
||||
#define HB_WVT_UNLOCK hb_threadLeaveCriticalSection( &s_wvtMtx );
|
||||
|
||||
#define _WVT_WS_DEF ( WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_THICKFRAME )
|
||||
#define _WVT_WS_NORESIZE ( WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_BORDER )
|
||||
#define _WVT_WS_MAXED ( WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_THICKFRAME )
|
||||
|
||||
static PHB_GTWVT s_wvtWindows[ WVT_MAX_WINDOWS ];
|
||||
static int s_wvtCount = 0;
|
||||
|
||||
@@ -740,9 +744,9 @@ static void hb_gt_wvt_Maximize( PHB_GTWVT pWVT )
|
||||
|
||||
/* Disable "maximize" button */
|
||||
#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_OS_WIN_CE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT)
|
||||
SetWindowLong( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_THICKFRAME );
|
||||
SetWindowLong( pWVT->hWnd, GWL_STYLE, _WVT_WS_MAXED );
|
||||
#else
|
||||
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_THICKFRAME );
|
||||
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, _WVT_WS_MAXED );
|
||||
#endif
|
||||
SetWindowPos( pWVT->hWnd, NULL, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_DEFERERASE );
|
||||
@@ -1689,9 +1693,9 @@ static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wPara
|
||||
/* Enable "maximize" button */
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_OS_WIN_CE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT)
|
||||
SetWindowLong( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME );
|
||||
SetWindowLong( pWVT->hWnd, GWL_STYLE, _WVT_WS_DEF );
|
||||
#else
|
||||
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME );
|
||||
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, _WVT_WS_DEF );
|
||||
#endif
|
||||
|
||||
SetWindowPos( pWVT->hWnd, NULL, 0, 0, 0, 0,
|
||||
@@ -1805,11 +1809,7 @@ static HWND hb_gt_wvt_CreateWindow( HINSTANCE hInstance, BOOL bResizable )
|
||||
hWnd = CreateWindow(
|
||||
s_szClassName, /* classname */
|
||||
szAppName, /* window name */
|
||||
bResizable ? /* style */
|
||||
( WS_THICKFRAME|WS_OVERLAPPED|WS_CAPTION|
|
||||
WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX ) :
|
||||
( WS_BORDER|WS_OVERLAPPED|WS_CAPTION|
|
||||
WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX ),
|
||||
bResizable ? _WVT_WS_DEF : _WVT_WS_NORESIZE, /* style */
|
||||
0, /* x */
|
||||
0, /* y */
|
||||
CW_USEDEFAULT, /* width */
|
||||
@@ -2548,19 +2548,9 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
|
||||
if( pWVT->hWnd )
|
||||
{
|
||||
#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_OS_WIN_CE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT)
|
||||
LONG style;
|
||||
SetWindowLong( pWVT->hWnd, GWL_STYLE, pWVT->bResizable ? _WVT_WS_DEF : _WVT_WS_NORESIZE );
|
||||
#else
|
||||
LONG_PTR style;
|
||||
#endif
|
||||
if( pWVT->bResizable )
|
||||
style = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_THICKFRAME;
|
||||
else
|
||||
style = WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_BORDER;
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER <= 1200 || defined(HB_OS_WIN_CE)) || defined(__DMC__)) && !defined(HB_ARCH_64BIT)
|
||||
SetWindowLong( pWVT->hWnd, GWL_STYLE, style );
|
||||
#else
|
||||
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, style );
|
||||
SetWindowLongPtr( pWVT->hWnd, GWL_STYLE, pWVT->bResizable ? _WVT_WS_DEF : _WVT_WS_NORESIZE );
|
||||
#endif
|
||||
SetWindowPos( pWVT->hWnd, NULL, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_DEFERERASE );
|
||||
|
||||
Reference in New Issue
Block a user