2008-12-20 09:36 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* harbour/contrib/gtwvg/gtwvg.h
    ! Seperated PHB_GTWVT structure for GUI elements as PHB_GUIDATA + PHB_GTWVT.

  * harbour/contrib/gtwvg/gtwvg.c
  * harbour/contrib/gtwvg/wvgcore.c
  * harbour/contrib/gtwvg/wvgutils.c
    ! Modified to respect PHB_GUIDATA structure.

  * harbour/contrib/gtwvg/wvgpaint.prg
    ! Modified THREAD STATIC paint_ behavior to respect true thread oriented
      until THREAD STATIC is modified to respect its true meaning.

  * harbour/contrib/gtwvg/wincback.prg
  * harbour/contrib/gtwvg/wvgmenub.prg
  * harbour/contrib/gtwvg/wvgclass.prg
  * harbour/contrib/gtwvg/wvgsle.prg
  * harbour/contrib/gtwvg/wvgstatc.prg
  * harbour/contrib/gtwvg/wvgsysw.prg
  * harbour/contrib/gtwvg/wvgwnd.prg
    ! Fixed to respect new compiler warnings. 
      Thanks Mindaugus for this great addition.
      Hope code will be faster than before.
This commit is contained in:
Pritpal Bedi
2008-12-20 17:46:47 +00:00
parent f4eb0c1b8d
commit 7c72dc1cda
13 changed files with 291 additions and 225 deletions

View File

@@ -8,6 +8,30 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2008-12-20 09:36 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* harbour/contrib/gtwvg/gtwvg.h
! Seperated PHB_GTWVT structure for GUI elements as PHB_GUIDATA + PHB_GTWVT.
* harbour/contrib/gtwvg/gtwvg.c
* harbour/contrib/gtwvg/wvgcore.c
* harbour/contrib/gtwvg/wvgutils.c
! Modified to respect PHB_GUIDATA structure.
* harbour/contrib/gtwvg/wvgpaint.prg
! Modified THREAD STATIC paint_ behavior to respect true thread oriented
until THREAD STATIC is modified to respect its true meaning.
* harbour/contrib/gtwvg/wincback.prg
* harbour/contrib/gtwvg/wvgmenub.prg
* harbour/contrib/gtwvg/wvgclass.prg
* harbour/contrib/gtwvg/wvgsle.prg
* harbour/contrib/gtwvg/wvgstatc.prg
* harbour/contrib/gtwvg/wvgsysw.prg
* harbour/contrib/gtwvg/wvgwnd.prg
! Fixed to respect new compiler warnings.
Thanks Mindaugus for this great addition.
Hope code will be faster than before.
2008-12-20 18:35 UTC+0100 Francesco Saverio Giudice (info/at/fsgiudice.com)
* contrib/hbfbird/tfirebrd.prg
* contrib/hbgd/gdbar.prg

View File

@@ -97,8 +97,9 @@ static HB_CRITICAL_NEW( s_wvtMtx );
#define HB_WVT_LOCK hb_threadEnterCriticalSection( &s_wvtMtx );
#define HB_WVT_UNLOCK hb_threadLeaveCriticalSection( &s_wvtMtx );
static PHB_GTWVT s_wvtWindows[ WVT_MAX_WINDOWS ];
static int s_wvtCount = 0;
static PHB_GTWVT s_wvtWindows[ WVT_MAX_WINDOWS ];
static int s_wvtCount = 0;
static PHB_GUIDATA s_guiData;
static const TCHAR s_szClassName[] = TEXT( "Harbour_WVG_Class" );
@@ -119,6 +120,8 @@ static void hb_wvt_gtCreateToolTipWindow( PHB_GTWVT pWVT );
static void hb_wvt_gtHandleMenuSelection( PHB_GTWVT pWVT, int );
static void hb_wvt_gtSaveGuiState( PHB_GTWVT pWVT );
static void hb_wvt_gtRestGuiState( PHB_GTWVT pWVT, LPRECT rect );
static void hb_wvt_gtLoadGuiData( void );
static void hb_wvt_gtReleaseGuiData( void );
static LRESULT CALLBACK hb_gt_wvt_WndProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
@@ -184,7 +187,10 @@ static BOOL hb_gt_wvt_Alloc( PHB_GTWVT pWVT )
s_wvtWindows[ iPos ] = pWVT;
pWVT->iHandle = iPos;
if( ++s_wvtCount == 1 )
{
hb_gt_wvt_RegisterClass( pWVT->hInstance );
hb_wvt_gtLoadGuiData();
}
fOK = TRUE;
break;
}
@@ -208,6 +214,9 @@ static void hb_gt_wvt_Free( PHB_GTWVT pWVT )
if( --s_wvtCount == 0 )
{
hb_wvt_gtReleaseGuiData();
s_guiData = NULL;
if( pWVT->hInstance )
UnregisterClass( s_szClassName, pWVT->hInstance );
}
@@ -356,10 +365,12 @@ static PHB_GTWVT hb_gt_wvt_New( PHB_GT pGT, HINSTANCE hInstance, int iCmdShow )
#endif
#endif
pWVT->bResizing = FALSE;
/* GUI Related members initialized */
hb_wvt_gtCreateObjects( pWVT );
pWVT->bResizing = FALSE;
pWVT->pGUI = s_guiData;
return pWVT;
}
@@ -3138,13 +3149,13 @@ static BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
if( pWVT->hWnd )
{
#if ( _WIN32_WINNT >= 0x0500 )
if ( pWVT->pfnLayered )
if ( s_guiData->pfnLayered )
{
SetWindowLong( pWVT->hWnd,
GWL_EXSTYLE,
GetWindowLong( pWVT->hWnd, GWL_EXSTYLE ) | WS_EX_LAYERED );
pWVT->pfnLayered( pWVT->hWnd,
s_guiData->pfnLayered( pWVT->hWnd,
RGB( 255,255,255 ),
hb_itemGetNI( pInfo->pNewVal2 ),
/*LWA_COLORKEY|*/ LWA_ALPHA );
@@ -3677,6 +3688,111 @@ HB_CALL_ON_STARTUP_END( _hb_startup_gt_Init_ )
//-------------------------------------------------------------------//
//-------------------------------------------------------------------//
static void hb_wvt_gtLoadGuiData( void )
{
HINSTANCE h;
s_guiData = ( PHB_GUIDATA ) hb_xgrab( sizeof( HB_GUIDATA ) );
memset( s_guiData, 0, sizeof( HB_GUIDATA ) );
s_guiData->penWhite = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 255,255,255 ) );
s_guiData->penBlack = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 0, 0, 0 ) );
s_guiData->penWhiteDim = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 205,205,205 ) );
s_guiData->penDarkGray = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 150,150,150 ) );
s_guiData->penGray = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 198,198,198 ) );
s_guiData->penNull = CreatePen( PS_NULL , 0, ( COLORREF ) RGB( 198,198,198 ) );
s_guiData->diagonalBrush = CreateHatchBrush( HS_DIAGCROSS, RGB( 210,210,210 ) );
s_guiData->solidBrush = CreateSolidBrush( RGB( 0,0,0 ) );
s_guiData->whiteBrush = CreateSolidBrush( RGB( 198,198,198 ) );
h = LoadLibraryEx( TEXT( "msimg32.dll" ), NULL, 0 );
if( h )
{
/* workaround for wrong declarations in some old C compilers */
#if defined( UNICODE ) && defined( GetProcAddress )
s_guiData->pfnGF = ( wvtGradientFill ) GetProcAddressW( h, TEXT( "GradientFill" ) );
#else
s_guiData->pfnGF = ( wvtGradientFill ) GetProcAddress( h, "GradientFill" );
#endif
if( s_guiData->pfnGF )
{
s_guiData->hMSImg32 = h;
}
}
h = LoadLibraryEx( TEXT( "user32.dll" ), NULL, 0 );
if( h )
{
/* workaround for wrong declarations in some old C compilers */
#if defined( UNICODE ) && defined( GetProcAddress )
s_guiData->pfnLayered = ( wvtSetLayeredWindowAttributes ) GetProcAddressW( h, TEXT( "SetLayeredWindowAttributes" ) );
#else
s_guiData->pfnLayered = ( wvtSetLayeredWindowAttributes ) GetProcAddress( h, "SetLayeredWindowAttributes" );
#endif
if( s_guiData->pfnLayered )
{
s_guiData->hUser32 = h;
}
}
}
static void hb_wvt_gtReleaseGuiData( void )
{
int i;
DeleteObject( ( HPEN ) s_guiData->penWhite );
DeleteObject( ( HPEN ) s_guiData->penWhiteDim );
DeleteObject( ( HPEN ) s_guiData->penBlack );
DeleteObject( ( HPEN ) s_guiData->penDarkGray );
DeleteObject( ( HPEN ) s_guiData->penGray );
DeleteObject( ( HPEN ) s_guiData->penNull );
DeleteObject( ( HBRUSH ) s_guiData->diagonalBrush );
DeleteObject( ( HBRUSH ) s_guiData->solidBrush );
DeleteObject( ( HBRUSH ) s_guiData->whiteBrush );
if( s_guiData->hMSImg32 )
{
FreeLibrary( s_guiData->hMSImg32 );
s_guiData->hMSImg32 = NULL;
}
if( s_guiData->hUser32 )
{
FreeLibrary( s_guiData->hUser32 );
s_guiData->hUser32 = NULL;
}
for( i = 0; i < WVT_PICTURES_MAX; i++ )
{
if( s_guiData->iPicture[ i ] )
{
s_guiData->iPicture[ i ]->lpVtbl->Release( s_guiData->iPicture[ i ] );
s_guiData->iPicture[ i ] = NULL;
}
}
for( i = 0; i < WVT_FONTS_MAX; i++ )
{
if( s_guiData->hUserFonts[ i ] )
{
DeleteObject( s_guiData->hUserFonts[ i ] );
s_guiData->hUserFonts[ i ] = NULL;
}
}
for( i = 0; i < WVT_PENS_MAX; i++ )
{
if( s_guiData->hUserPens[ i ] )
{
DeleteObject( s_guiData->hUserPens[ i ] );
s_guiData->hUserPens[ i ] = NULL;
}
}
hb_xfree( s_guiData );
s_guiData = NULL;
}
static void hb_wvt_gtCreateObjects( PHB_GTWVT pWVT )
{
LOGBRUSH lb;
@@ -3686,36 +3802,13 @@ static void hb_wvt_gtCreateObjects( PHB_GTWVT pWVT )
pWVT->bDeferPaint = FALSE;
pWVT->bTracking = FALSE;
pWVT->penWhite = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 255,255,255 ) );
pWVT->penBlack = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 0, 0, 0 ) );
pWVT->penWhiteDim = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 205,205,205 ) );
pWVT->penDarkGray = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 150,150,150 ) );
pWVT->penGray = CreatePen( PS_SOLID, 0, ( COLORREF ) pWVT->COLORS[ 7 ] );
pWVT->penNull = CreatePen( PS_NULL , 0, ( COLORREF ) pWVT->COLORS[ 7 ] );
pWVT->currentPen = CreatePen( PS_SOLID, 0, ( COLORREF ) RGB( 0, 0, 0 ) );
//
lb.lbStyle = BS_NULL;
lb.lbColor = RGB( 198,198,198 );
lb.lbHatch = 0;
pWVT->currentBrush = CreateBrushIndirect( &lb );
lb.lbStyle = BS_HATCHED;
lb.lbColor = RGB( 210,210,210 );
lb.lbHatch = HS_DIAGCROSS; // HS_BDIAGONAL;
pWVT->diagonalBrush = CreateHatchBrush( HS_DIAGCROSS, RGB( 210,210,210 ) ); //CreateBrushIndirect( &lb );
lb.lbStyle = BS_SOLID;
lb.lbColor = 0; // NULL; // RGB( 0,0,0 );
lb.lbHatch = 0;
pWVT->solidBrush = CreateSolidBrush( RGB( 0,0,0 ) ); //CreateBrushIndirect( &lb );
lb.lbStyle = BS_SOLID;
lb.lbColor = pWVT->COLORS[ 7 ];
lb.lbHatch = 0;
pWVT->wvtWhiteBrush = CreateSolidBrush( pWVT->COLORS[ 7 ] ); //CreateBrushIndirect( &lb );
/* GUI members of global structure */
pWVT->LastMenuEvent = 0;
pWVT->MenuKeyEvent = 1024;
@@ -3735,36 +3828,6 @@ static void hb_wvt_gtCreateObjects( PHB_GTWVT pWVT )
pWVT->bToolTipActive = FALSE;
pWVT->iFactor = 255;
h = LoadLibraryEx( TEXT( "msimg32.dll" ), NULL, 0 );
if( h )
{
/* workaround for wrong declarations in some old C compilers */
#if defined( UNICODE ) && defined( GetProcAddress )
pWVT->pfnGF = ( wvtGradientFill ) GetProcAddressW( h, TEXT( "GradientFill" ) );
#else
pWVT->pfnGF = ( wvtGradientFill ) GetProcAddress( h, "GradientFill" );
#endif
if( pWVT->pfnGF )
{
pWVT->hMSImg32 = h;
}
}
h = LoadLibraryEx( TEXT( "user32.dll" ), NULL, 0 );
if( h )
{
/* workaround for wrong declarations in some old C compilers */
#if defined( UNICODE ) && defined( GetProcAddress )
pWVT->pfnLayered = ( wvtSetLayeredWindowAttributes ) GetProcAddressW( h, TEXT( "SetLayeredWindowAttributes" ) );
#else
pWVT->pfnLayered = ( wvtSetLayeredWindowAttributes ) GetProcAddress( h, "SetLayeredWindowAttributes" );
#endif
if( pWVT->pfnLayered )
{
pWVT->hUser32 = h;
}
}
for( iIndex = 0; iIndex < WVT_DLGML_MAX; iIndex++ )
{
pWVT->hDlgModeless[ iIndex ] = NULL;
@@ -3805,17 +3868,8 @@ static void hb_wvt_gtExitGui( PHB_GTWVT pWVT )
}
}
DeleteObject( ( HPEN ) pWVT->penWhite );
DeleteObject( ( HPEN ) pWVT->penWhiteDim );
DeleteObject( ( HPEN ) pWVT->penBlack );
DeleteObject( ( HPEN ) pWVT->penDarkGray );
DeleteObject( ( HPEN ) pWVT->penGray );
DeleteObject( ( HPEN ) pWVT->penNull );
DeleteObject( ( HPEN ) pWVT->currentPen );
DeleteObject( ( HBRUSH ) pWVT->currentBrush );
DeleteObject( ( HBRUSH ) pWVT->diagonalBrush );
DeleteObject( ( HBRUSH ) pWVT->solidBrush );
DeleteObject( ( HBRUSH ) pWVT->wvtWhiteBrush );
if( pWVT->hdc )
{
@@ -3845,36 +3899,6 @@ static void hb_wvt_gtExitGui( PHB_GTWVT pWVT )
DeleteObject( pWVT->hGuiBmp );
pWVT->hGuiBmp = NULL;
}
for( i = 0; i < WVT_PICTURES_MAX; i++ )
{
if( pWVT->iPicture[ i ] )
{
pWVT->iPicture[ i ]->lpVtbl->Release( pWVT->iPicture[ i ] );
pWVT->iPicture[ i ] = NULL;
}
}
for( i = 0; i < WVT_FONTS_MAX; i++ )
{
if( pWVT->hUserFonts[ i ] )
{
DeleteObject( pWVT->hUserFonts[ i ] );
pWVT->hUserFonts[ i ] = NULL;
}
}
for( i = 0; i < WVT_PENS_MAX; i++ )
{
if( pWVT->hUserPens[ i ] )
{
DeleteObject( pWVT->hUserPens[ i ] );
pWVT->hUserPens[ i ] = NULL;
}
}
if( pWVT->hMSImg32 )
{
FreeLibrary( pWVT->hMSImg32 );
pWVT->hMSImg32 = NULL;
}
}
static void hb_wvt_gtInitGui( PHB_GTWVT pWVT )

View File

@@ -262,16 +262,15 @@ typedef struct
HPEN penDarkGray; // Dark gray pen to draw GDI elements
HPEN penGray; // Gray pen equivilant to Clipper White
HPEN penNull; // Null pen
HPEN currentPen; // Handle to current pen settable at runtime
HBRUSH currentBrush; // Handle to current brush settable by runtime
HBRUSH diagonalBrush; // Handle to diaoganl brush to draw scrollbars
HBRUSH solidBrush; // Handle to solid brush
HBRUSH wvtWhiteBrush; // Wvt specific White colored brush
HBRUSH whiteBrush; // Wvt specific White colored brush
IPicture *iPicture[ WVT_PICTURES_MAX ]; // Array to hold the Picture Streams to avoid recurring loading and unloading
HFONT hUserFonts[ WVT_FONTS_MAX ] ; // User defined font handles
HPEN hUserPens[ WVT_PENS_MAX ]; // User defined pens
HINSTANCE hMSImg32; // Handle to the loaded library msimg32.dll
wvtGradientFill pfnGF; // Pointer to Address of the GradientFill function in MSImg32.dll
HINSTANCE hUser32; // Handle to the loaded library user32.dll
wvtSetLayeredWindowAttributes pfnLayered;// Pointer to set Windows attribute - transparency.
} HB_GUIDATA, * PHB_GUIDATA;
@@ -380,24 +379,11 @@ typedef struct
PHB_DYNS pSymWVT_TIMER; // Stores pointer to WVT_TIMER function
PHB_DYNS pSymWVT_KEY;
HPEN penWhite; // White pen to draw GDI elements
HPEN penBlack; // Black pen to draw GDI elements
HPEN penWhiteDim; // White dim pen to draw GDI elements
HPEN penDarkGray; // Dark gray pen to draw GDI elements
HPEN penGray; // Gray pen equivilant to Clipper White
HPEN penNull; // Null pen
HPEN currentPen; // Handle to current pen settable at runtime
HBRUSH currentBrush; // Handle to current brush settable by runtime
HBRUSH diagonalBrush; // Handle to diaoganl brush to draw scrollbars
HBRUSH solidBrush; // Handle to solid brush
HBRUSH wvtWhiteBrush; // Wvt specific White colored brush
IPicture *iPicture[ WVT_PICTURES_MAX ]; // Array to hold the Picture Streams to avoid recurring loading and unloading
HFONT hUserFonts[ WVT_FONTS_MAX ] ; // User defined font handles
HPEN hUserPens[ WVT_PENS_MAX ]; // User defined pens
HINSTANCE hMSImg32; // Handle to the loaded library msimg32.dll
wvtGradientFill pfnGF; // Pointer to Address of the GradientFill function in MSImg32.dll
HINSTANCE hUser32; // Handle to the loaded library user32.dll
wvtSetLayeredWindowAttributes pfnLayered;// Pointer to set Windows attribute - transparency.
PHB_GUIDATA pGUI; // GUI Data Structure
HMENU hPopup; // Handle of context menu invokable with right click
HWND hWndTT; // Handle to hold tooltip information
@@ -414,8 +400,6 @@ typedef struct
PHB_ITEM pcbFuncModal[ WVT_DLGMD_MAX ]; // codeblock for WndProc
int iTypeModal[ WVT_DLGMD_MAX ]; // Type of Function Pointers - Function 1, Block 2, Method 3
PHB_GUIDATA pGUI; // GUI Data Structure
PHB_GT_PARAMS pPP; // Presentation Parameters
BOOL bDeferPaint; // To create pure Windows dialogs

View File

@@ -126,11 +126,10 @@ FUNCTION HB_AsCallback( pbcFunc, oObj, nNumParam, xCargo, lVoid, cDebug )
// destroyed first, or it must be "unsubclassed"
//
FUNCTION HB_FreeCallback( pCallback )
LOCAL lSuccess := .F.
lSuccess := _FreeCallback( pCallback )
_FreeCallback( pCallback )
RETURN .T. //lSuccess
RETURN .T.
//----------------------------------------------------------------------//
// free all oustanding unreleased callback pointers on exit from the application
// could be changed to EXIT PROCEDURE

View File

@@ -255,7 +255,7 @@ METHOD New( nRows, nCols, cTitle, cFont, nFontHeight, nFontWidth,nFontBold,nFont
//-------------------------------------------------------------------//
METHOD Create() CLASS wvtDialog
LOCAL aPalette, n, i, j // , cScr, cQry
LOCAL aPalette, i, j // , cScr, cQry
::oldToolTipActive := Wvt_SetToolTipActive( .t. )
if ::nTooltipWidth <> nil
@@ -309,7 +309,7 @@ METHOD Create() CLASS wvtDialog
next
WvtSetPaint( GetPaint( ::cPaintBlockID ) )
if ( n := ascan( ::aObjects, {|o| o:lTabStop } ) ) > 0
if ascan( ::aObjects, {|o| o:lTabStop } ) > 0
::lTabStops := .t.
endif
@@ -2609,8 +2609,7 @@ METHOD SetPos( nTotal, nCurrent ) CLASS WvtScrollBar
//-------------------------------------------------------------------//
METHOD ThumbPos() CLASS WvtScrollBar
LOCAL nNewPos := ::nThumbPos
LOCAL nRecPerUnit, nCurUnit
LOCAL nNewPos, nRecPerUnit, nCurUnit
if ::nBarType == WVT_SCROLLBAR_VERT
nRecPerUnit := ::nTotal / ::nScrollUnits
@@ -2624,9 +2623,9 @@ METHOD ThumbPos() CLASS WvtScrollBar
nNewPos := ::nSTop + nCurUnit
if nNewPos < ::nSTop
nNewPos := ::nSTop
nNewPos := ::nSTop
elseif nNewPos > ::nSBottom
nNewPos := ::nSBottom
nNewPos := ::nSBottom
endif
else
@@ -2643,12 +2642,12 @@ METHOD ThumbPos() CLASS WvtScrollBar
nCurUnit := ::nScrollUnits
endif
nNewPos := ::nSLeft + nCurUnit
nNewPos := ::nSLeft + nCurUnit
if nNewPos < ::nSLeft
nNewPos := ::nSLeft
if nNewPos < ::nSLeft
nNewPos := ::nSLeft
elseif nNewPos > ::nSRight - 1
nNewPos := ::nSRight-1
nNewPos := ::nSRight-1
endif
endif

View File

@@ -680,25 +680,25 @@ static void hb_wvt_DrawBoxRaised( HDC hdc, int iTop, int iLeft, int iBottom, int
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->penWhiteDim );
SelectObject( hdc, _s->pGUI->penWhiteDim );
MoveToEx( hdc, iLeft, iTop, NULL ); // Top Inner
LineTo( hdc, iRight, iTop );
MoveToEx( hdc, iLeft, iTop, NULL ); // Left Inner
LineTo( hdc, iLeft, iBottom );
SelectObject( hdc, _s->penWhite );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iLeft-1, iTop-1, NULL ); // Top Outer
LineTo( hdc, iRight+1, iTop-1 );
MoveToEx( hdc, iLeft-1, iTop-1, NULL ); // Left Outer
LineTo( hdc, iLeft-1, iBottom+1 );
SelectObject( hdc, _s->penDarkGray );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iLeft, iBottom, NULL ); // Bottom Inner
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iRight, iBottom, NULL ); // Right Inner
LineTo( hdc, iRight, iTop );
SelectObject( hdc, _s->penBlack );
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iLeft-1, iBottom+1, NULL ); // Bottom Outer
LineTo( hdc, iRight+1+1, iBottom+1 );
MoveToEx( hdc, iRight+1, iTop-1, NULL ); // Right Outer
@@ -711,25 +711,25 @@ static void hb_wvt_DrawBoxRecessed( HDC hdc, int iTop, int iLeft, int iBottom, i
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->penWhiteDim );
SelectObject( hdc, _s->pGUI->penWhiteDim );
MoveToEx( hdc, iRight, iTop, NULL ); // Right Inner
LineTo( hdc, iRight, iBottom );
MoveToEx( hdc, iLeft, iBottom, NULL ); // Bottom Inner
LineTo( hdc, iRight, iBottom );
SelectObject( hdc, _s->penWhite );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iRight+1, iTop-1, NULL ); // Right Outer
LineTo( hdc, iRight + 1, iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iBottom + 1, NULL ); // Bottom Outer
LineTo( hdc, iRight + 2, iBottom + 1 );
SelectObject( hdc, _s->penBlack );
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iLeft, iTop, NULL ); // Left Inner
LineTo( hdc, iLeft, iBottom );
MoveToEx( hdc, iLeft, iTop, NULL ); // Top Inner
LineTo( hdc, iRight, iTop );
SelectObject( hdc, _s->penDarkGray );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); // Left Outer
LineTo( hdc, iLeft - 1 , iBottom + 1 );
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); // Top Outer
@@ -759,13 +759,13 @@ static void hb_wvt_DrawBoxGet( HDC hdc, int iTop, int iLeft, int iBottom, int iR
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->penBlack );
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iLeft-1 , iTop-1, NULL ); // Top Inner
LineTo( hdc, iRight-1, iTop-1 );
MoveToEx( hdc, iLeft-1 , iTop-1, NULL ); // Left Inner
LineTo( hdc, iLeft-1 , iBottom-1 );
SelectObject( hdc, _s->penDarkGray );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iLeft-2, iTop-2, NULL ); // Top Outer
LineTo( hdc, iRight , iTop-2 );
MoveToEx( hdc, iLeft-2, iTop-2, NULL ); // Left Outer
@@ -778,7 +778,7 @@ static void hb_wvt_DrawBoxGroup( HDC hdc, int iTop, int iLeft, int iBottom, int
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->penDarkGray );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iRight, iTop, NULL ); // Right Inner
LineTo( hdc, iRight, iBottom );
@@ -793,7 +793,7 @@ static void hb_wvt_DrawBoxGroup( HDC hdc, int iTop, int iLeft, int iBottom, int
LineTo( hdc, iRight + 1, iTop - 1 );
SelectObject( hdc, _s->penWhite );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iRight + 1, iTop, NULL ); // Right Outer
LineTo( hdc, iRight + 1, iBottom + 1 );
@@ -814,7 +814,7 @@ static void hb_wvt_DrawBoxGroupRaised( HDC hdc, int iTop, int iLeft, int iBottom
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->penWhite );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iRight, iTop, NULL ); // Right Inner
LineTo( hdc, iRight, iBottom );
@@ -828,7 +828,7 @@ static void hb_wvt_DrawBoxGroupRaised( HDC hdc, int iTop, int iLeft, int iBottom
MoveToEx( hdc, iLeft - 1, iTop - 1, NULL ); // Top Outer
LineTo( hdc, iRight + 1, iTop - 1 );
SelectObject( hdc, _s->penDarkGray );
SelectObject( hdc, _s->pGUI->penDarkGray );
MoveToEx( hdc, iRight + 1, iTop, NULL ); // Right Outer
LineTo( hdc, iRight + 1, iBottom + 1 );
@@ -849,7 +849,7 @@ static void hb_wvt_DrawToolButtonFlat( HDC hdc, int iTop, int iLeft, int iBottom
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->penGray );
SelectObject( hdc, _s->pGUI->penGray );
MoveToEx( hdc, iRight, iTop, NULL ); // Right
LineTo( hdc, iRight, iBottom + 1);
@@ -870,7 +870,7 @@ static void hb_wvt_DrawToolButtonUp( HDC hdc, int iTop, int iLeft, int iBottom,
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->penBlack );
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iRight, iTop, NULL ); // Right
LineTo( hdc, iRight, iBottom+1 );
@@ -878,7 +878,7 @@ static void hb_wvt_DrawToolButtonUp( HDC hdc, int iTop, int iLeft, int iBottom,
MoveToEx( hdc, iLeft, iBottom, NULL ); // Bottom
LineTo( hdc, iRight, iBottom );
SelectObject( hdc, _s->penWhite );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iLeft, iTop, NULL ); // Left
LineTo( hdc, iLeft, iBottom );
@@ -893,7 +893,7 @@ static void hb_wvt_DrawToolButtonDown( HDC hdc, int iTop, int iLeft, int iBottom
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();
SelectObject( hdc, _s->penWhite );
SelectObject( hdc, _s->pGUI->penWhite );
MoveToEx( hdc, iRight, iTop, NULL ); // Right
LineTo( hdc, iRight, iBottom+1 );
@@ -901,7 +901,7 @@ static void hb_wvt_DrawToolButtonDown( HDC hdc, int iTop, int iLeft, int iBottom
MoveToEx( hdc, iLeft, iBottom, NULL ); // Bottom
LineTo( hdc, iRight, iBottom );
SelectObject( hdc, _s->penBlack );
SelectObject( hdc, _s->pGUI->penBlack );
MoveToEx( hdc, iLeft, iTop, NULL ); // Left
LineTo( hdc, iLeft, iBottom );
@@ -1147,7 +1147,7 @@ HB_FUNC( WVT_DRAWIMAGE )
if ( ISNUM( 5 ) )
{
hb_wvt_gtRenderPicture( iLeft, iTop, ( iRight - iLeft ) + 1, ( iBottom - iTop ) + 1, _s->iPicture[ hb_parni( 5 )-1 ] );
hb_wvt_gtRenderPicture( iLeft, iTop, ( iRight - iLeft ) + 1, ( iBottom - iTop ) + 1, _s->pGUI->iPicture[ hb_parni( 5 )-1 ] );
}
else
{
@@ -1264,7 +1264,7 @@ HB_FUNC( WVT_DRAWOUTLINE )
else
{
hPen = 0;
SelectObject( _s->hdc, _s->penBlack );
SelectObject( _s->hdc, _s->pGUI->penBlack );
}
hb_wvt_DrawOutline( _s->hdc, iTop, iLeft, iBottom, iRight );
@@ -1276,7 +1276,7 @@ HB_FUNC( WVT_DRAWOUTLINE )
}
else
{
hOldPenGUI = (HPEN) SelectObject( _s->hGuiDC, _s->penBlack );
hOldPenGUI = (HPEN) SelectObject( _s->hGuiDC, _s->pGUI->penBlack );
hb_wvt_DrawOutline( _s->hGuiDC, iTop, iLeft, iBottom, iRight );
}
}
@@ -1375,7 +1375,7 @@ HB_FUNC( WVT_DRAWLINE )
{
if ( iOrient == 0 ) // Horizontal
{
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, x, y, NULL );
LineTo( _s->hdc, iRight, y );
SelectObject( _s->hdc, hPen );
@@ -1384,7 +1384,7 @@ HB_FUNC( WVT_DRAWLINE )
if ( _s->bGui )
{
SelectObject( _s->hGuiDC, _s->penWhite );
SelectObject( _s->hGuiDC, _s->pGUI->penWhite );
MoveToEx( _s->hGuiDC, x, y, NULL );
LineTo( _s->hGuiDC, iRight, y );
SelectObject( _s->hGuiDC, hPen );
@@ -1394,7 +1394,7 @@ HB_FUNC( WVT_DRAWLINE )
}
else // Vertical
{
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, x, y, NULL );
LineTo( _s->hdc, x, iBottom );
SelectObject( _s->hdc, hPen );
@@ -1402,7 +1402,7 @@ HB_FUNC( WVT_DRAWLINE )
LineTo( _s->hdc, x+1, iBottom );
if ( _s->bGui )
{
SelectObject( _s->hGuiDC, _s->penWhite );
SelectObject( _s->hGuiDC, _s->pGUI->penWhite );
MoveToEx( _s->hGuiDC, x, y, NULL );
LineTo( _s->hGuiDC, x, iBottom );
SelectObject( _s->hGuiDC, hPen );
@@ -1420,7 +1420,7 @@ HB_FUNC( WVT_DRAWLINE )
SelectObject( _s->hdc, hPen );
MoveToEx( _s->hdc, x, y, NULL );
LineTo( _s->hdc, iRight, y );
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, x, y+1, NULL );
LineTo( _s->hdc, iRight, y+1 );
if ( _s->bGui )
@@ -1428,7 +1428,7 @@ HB_FUNC( WVT_DRAWLINE )
SelectObject( _s->hGuiDC, hPen );
MoveToEx( _s->hGuiDC, x, y, NULL );
LineTo( _s->hGuiDC, iRight, y );
SelectObject( _s->hGuiDC, _s->penWhite );
SelectObject( _s->hGuiDC, _s->pGUI->penWhite );
MoveToEx( _s->hGuiDC, x, y+1, NULL );
LineTo( _s->hGuiDC, iRight, y+1 );
}
@@ -1438,7 +1438,7 @@ HB_FUNC( WVT_DRAWLINE )
SelectObject( _s->hdc, hPen );
MoveToEx( _s->hdc, x, y, NULL );
LineTo( _s->hdc, x, iBottom );
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, x+1, y, NULL );
LineTo( _s->hdc, x+1, iBottom );
if ( _s->bGui )
@@ -1446,7 +1446,7 @@ HB_FUNC( WVT_DRAWLINE )
SelectObject( _s->hGuiDC, hPen );
MoveToEx( _s->hGuiDC, x, y, NULL );
LineTo( _s->hGuiDC, x, iBottom );
SelectObject( _s->hGuiDC, _s->penWhite );
SelectObject( _s->hGuiDC, _s->pGUI->penWhite );
MoveToEx( _s->hGuiDC, x+1, y, NULL );
LineTo( _s->hGuiDC, x+1, iBottom );
}
@@ -1869,7 +1869,7 @@ HB_FUNC( WVT_DRAWBUTTON )
if ( ISNUM( 6 ) )
{
iPicture = _s->iPicture[ hb_parni( 6 ) - 1 ];
iPicture = _s->pGUI->iPicture[ hb_parni( 6 ) - 1 ];
hb_wvt_gtRenderPicture( iLeft+4, iTop+4, iImageWidth, iImageHeight, iPicture );
}
else
@@ -1910,7 +1910,7 @@ HB_FUNC( WVT_DRAWSTATUSBAR )
iBottom = xy.y - 1;
iRight = xy.x - 2;
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, iRight, iTop, NULL ); // Right
LineTo( _s->hdc, iRight, iBottom );
@@ -1918,7 +1918,7 @@ HB_FUNC( WVT_DRAWSTATUSBAR )
MoveToEx( _s->hdc, iLeft, iBottom, NULL ); // Bottom
LineTo( _s->hdc, iRight, iBottom );
SelectObject( _s->hdc, _s->penDarkGray );
SelectObject( _s->hdc, _s->pGUI->penDarkGray );
MoveToEx( _s->hdc, iLeft, iTop, NULL ); // Left
LineTo( _s->hdc, iLeft, iBottom );
@@ -1935,7 +1935,7 @@ HB_FUNC( WVT_DRAWSTATUSBAR )
iBottom = iTop;
iRight = iLeft;
SelectObject( _s->hdc, _s->penBlack );
SelectObject( _s->hdc, _s->pGUI->penBlack );
MoveToEx( _s->hdc, iLeft-4, iBottom, NULL );
LineTo( _s->hdc, iRight, iTop-4 );
@@ -1944,7 +1944,7 @@ HB_FUNC( WVT_DRAWSTATUSBAR )
MoveToEx( _s->hdc, iLeft-10, iBottom, NULL );
LineTo( _s->hdc, iRight, iTop-10 );
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, iLeft-5, iBottom, NULL );
LineTo( _s->hdc, iRight, iTop-5 );
@@ -1969,7 +1969,7 @@ HB_FUNC( WVT_DRAWPICTURE )
if ( iSlot < WVT_PICTURES_MAX )
{
if ( _s->iPicture[ iSlot ] )
if ( _s->pGUI->iPicture[ iSlot ] )
{
xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );;
iTop = xy.y + hb_parni( 6,1 );
@@ -1979,7 +1979,7 @@ HB_FUNC( WVT_DRAWPICTURE )
iBottom = xy.y-1 + hb_parni( 6,3 );
iRight = xy.x-1 + hb_parni( 6,4 );
hb_retl( hb_wvt_gtRenderPicture( iLeft, iTop, iRight - iLeft + 1, iBottom - iTop + 1, _s->iPicture[ iSlot ] ) );
hb_retl( hb_wvt_gtRenderPicture( iLeft, iTop, iRight - iLeft + 1, iBottom - iTop + 1, _s->pGUI->iPicture[ iSlot ] ) );
}
}
}
@@ -1995,7 +1995,7 @@ HB_FUNC( WVT_DRAWLABELEX )
POINT xy = { 0,0 };
int iSlot = hb_parni( 7 ) - 1;
if ( _s->hUserFonts[ iSlot ] )
if ( _s->pGUI->hUserFonts[ iSlot ] )
{
LPTSTR text = HB_TCHAR_CONVTO( hb_parc( 3 ) );
COLORREF fgClr = hb_wvt_FgColorParam( 5 ),
@@ -2008,7 +2008,7 @@ HB_FUNC( WVT_DRAWLABELEX )
SetBkColor( _s->hdc, bgClr );
SetTextColor( _s->hdc, fgClr );
SetTextAlign( _s->hdc, ( ISNIL( 4 ) ? TA_LEFT : hb_parni( 4 ) ) );
SelectObject( _s->hdc, _s->hUserFonts[ iSlot ] );
SelectObject( _s->hdc, _s->pGUI->hUserFonts[ iSlot ] );
//ExtTextOut( _s->hdc, xy.x, xy.y, 0, NULL, hb_parcx( 3 ), strlen( hb_parcx( 3 ) ), NULL );
ExtTextOut( _s->hdc, xy.x, xy.y, 0, NULL, text, lstrlen( text ), NULL );
@@ -2017,7 +2017,7 @@ HB_FUNC( WVT_DRAWLABELEX )
SetBkColor( _s->hGuiDC, bgClr );
SetTextColor( _s->hGuiDC, fgClr );
SetTextAlign( _s->hGuiDC, ( ISNIL( 4 ) ? TA_LEFT : hb_parni( 4 ) ) );
SelectObject( _s->hGuiDC, _s->hUserFonts[ iSlot ] );
SelectObject( _s->hGuiDC, _s->pGUI->hUserFonts[ iSlot ] );
//ExtTextOut( _s->hGuiDC, xy.x, xy.y, 0, NULL, hb_parcx( 3 ), strlen( hb_parcx( 3 ) ), NULL );
ExtTextOut( _s->hGuiDC, xy.x, xy.y, 0, NULL, text, lstrlen( text ), NULL );
@@ -2110,7 +2110,7 @@ HB_FUNC( WVT_DRAWLINEEX )
break;
}
hPen = _s->hUserPens[ iSlot ];
hPen = _s->pGUI->hUserPens[ iSlot ];
switch ( iFormat )
{
@@ -2118,7 +2118,7 @@ HB_FUNC( WVT_DRAWLINEEX )
{
if ( iOrient == 0 ) // Horizontal
{
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, x, y, NULL );
LineTo( _s->hdc, iRight, y );
SelectObject( _s->hdc, hPen );
@@ -2126,7 +2126,7 @@ HB_FUNC( WVT_DRAWLINEEX )
LineTo( _s->hdc, iRight, y+1 );
if ( _s->bGui )
{
SelectObject( _s->hGuiDC, _s->penWhite );
SelectObject( _s->hGuiDC, _s->pGUI->penWhite );
MoveToEx( _s->hGuiDC, x, y, NULL );
LineTo( _s->hGuiDC, iRight, y );
SelectObject( _s->hGuiDC, hPen );
@@ -2136,7 +2136,7 @@ HB_FUNC( WVT_DRAWLINEEX )
}
else // Vertical
{
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, x, y, NULL );
LineTo( _s->hdc, x, iBottom );
SelectObject( _s->hdc, hPen );
@@ -2144,7 +2144,7 @@ HB_FUNC( WVT_DRAWLINEEX )
LineTo( _s->hdc, x+1, iBottom );
if ( _s->bGui )
{
SelectObject( _s->hGuiDC, _s->penWhite );
SelectObject( _s->hGuiDC, _s->pGUI->penWhite );
MoveToEx( _s->hGuiDC, x, y, NULL );
LineTo( _s->hGuiDC, x, iBottom );
SelectObject( _s->hGuiDC, hPen );
@@ -2162,7 +2162,7 @@ HB_FUNC( WVT_DRAWLINEEX )
SelectObject( _s->hdc, hPen );
MoveToEx( _s->hdc, x, y, NULL );
LineTo( _s->hdc, iRight, y );
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, x, y+1, NULL );
LineTo( _s->hdc, iRight, y+1 );
if ( _s->bGui )
@@ -2170,7 +2170,7 @@ HB_FUNC( WVT_DRAWLINEEX )
SelectObject( _s->hGuiDC, hPen );
MoveToEx( _s->hGuiDC, x, y, NULL );
LineTo( _s->hGuiDC, iRight, y );
SelectObject( _s->hGuiDC, _s->penWhite );
SelectObject( _s->hGuiDC, _s->pGUI->penWhite );
MoveToEx( _s->hGuiDC, x, y+1, NULL );
LineTo( _s->hGuiDC, iRight, y+1 );
}
@@ -2180,7 +2180,7 @@ HB_FUNC( WVT_DRAWLINEEX )
SelectObject( _s->hdc, hPen );
MoveToEx( _s->hdc, x, y, NULL );
LineTo( _s->hdc, x, iBottom );
SelectObject( _s->hdc, _s->penWhite );
SelectObject( _s->hdc, _s->pGUI->penWhite );
MoveToEx( _s->hdc, x+1, y, NULL );
LineTo( _s->hdc, x+1, iBottom );
if ( _s->bGui )
@@ -2188,7 +2188,7 @@ HB_FUNC( WVT_DRAWLINEEX )
SelectObject( _s->hGuiDC, hPen );
MoveToEx( _s->hGuiDC, x, y, NULL );
LineTo( _s->hGuiDC, x, iBottom );
SelectObject( _s->hGuiDC, _s->penWhite );
SelectObject( _s->hGuiDC, _s->pGUI->penWhite );
MoveToEx( _s->hGuiDC, x+1, y, NULL );
LineTo( _s->hGuiDC, x+1, iBottom );
}
@@ -2248,13 +2248,13 @@ HB_FUNC( WVT_DRAWOUTLINEEX )
iBottom = xy.y + hb_parni( 6,3 );
iRight = xy.x + hb_parni( 6,4 );
if ( _s->hUserPens[ iSlot ] )
if ( _s->pGUI->hUserPens[ iSlot ] )
{
SelectObject( _s->hdc, _s->hUserPens[ iSlot ] );
SelectObject( _s->hdc, _s->pGUI->hUserPens[ iSlot ] );
}
else
{
SelectObject( _s->hdc, _s->penBlack );
SelectObject( _s->hdc, _s->pGUI->penBlack );
}
hb_wvt_DrawOutline( _s->hdc, iTop, iLeft, iBottom, iRight );
@@ -2505,11 +2505,11 @@ HB_FUNC( WVT_DRAWSCROLLBUTTON )
break;
}
SelectObject( _s->hdc, _s->solidBrush );
SelectObject( _s->hdc, _s->pGUI->solidBrush );
Polygon( _s->hdc, Point, 3 );
if ( _s->bGui )
{
SelectObject( _s->hGuiDC, _s->solidBrush );
SelectObject( _s->hGuiDC, _s->pGUI->solidBrush );
Polygon( _s->hGuiDC, Point, 3 );
}
@@ -2534,15 +2534,15 @@ HB_FUNC( WVT_DRAWSCROLLTHUMBVERT )
//
SetBkMode( _s->hdc, OPAQUE );
SetBkColor( _s->hdc, RGB( 230,230,230 ) );
SelectObject( _s->hdc, _s->diagonalBrush );
SelectObject( _s->hdc, _s->penNull );
SelectObject( _s->hdc, _s->pGUI->diagonalBrush );
SelectObject( _s->hdc, _s->pGUI->penNull );
Rectangle( _s->hdc, iLeft, iTop, iRight+1, iBottom+1 );
if ( _s->bGui )
{
SetBkMode( _s->hGuiDC, OPAQUE );
SetBkColor( _s->hGuiDC, RGB( 230,230,230 ) );
SelectObject( _s->hGuiDC, _s->diagonalBrush );
SelectObject( _s->hGuiDC, _s->penNull );
SelectObject( _s->hGuiDC, _s->pGUI->diagonalBrush );
SelectObject( _s->hGuiDC, _s->pGUI->penNull );
Rectangle( _s->hGuiDC, iLeft, iTop, iRight+1, iBottom+1 );
}
@@ -2553,13 +2553,13 @@ HB_FUNC( WVT_DRAWSCROLLTHUMBVERT )
iTabBtm = iTabTop + _s->PTEXTSIZE.y - 1;
iTabRgt = iRight;
SelectObject( _s->hdc, _s->wvtWhiteBrush );
SelectObject( _s->hdc, _s->penGray );
SelectObject( _s->hdc, _s->pGUI->whiteBrush );
SelectObject( _s->hdc, _s->pGUI->penGray );
Rectangle( _s->hdc, iTabLft, iTabTop, iTabRgt+1, iTabBtm );
if ( _s->bGui )
{
SelectObject( _s->hGuiDC, _s->wvtWhiteBrush );
SelectObject( _s->hGuiDC, _s->penGray );
SelectObject( _s->hGuiDC, _s->pGUI->whiteBrush );
SelectObject( _s->hGuiDC, _s->pGUI->penGray );
Rectangle( _s->hGuiDC, iTabLft, iTabTop, iTabRgt+1, iTabBtm );
}
@@ -2591,27 +2591,27 @@ HB_FUNC( WVT_DRAWSCROLLTHUMBHORZ )
//
SetBkMode( _s->hdc, OPAQUE );
SetBkColor( _s->hdc, RGB( 230,230,230 ) );
SelectObject( _s->hdc, _s->diagonalBrush );
SelectObject( _s->hdc, _s->penNull );
SelectObject( _s->hdc, _s->pGUI->diagonalBrush );
SelectObject( _s->hdc, _s->pGUI->penNull );
Rectangle( _s->hdc, iLeft, iTop, iRight+1, iBottom+1 );
if ( _s->bGui )
{
SetBkMode( _s->hGuiDC, OPAQUE );
SetBkColor( _s->hGuiDC, RGB( 230,230,230 ) );
SelectObject( _s->hGuiDC, _s->diagonalBrush );
SelectObject( _s->hGuiDC, _s->penNull );
SelectObject( _s->hGuiDC, _s->pGUI->diagonalBrush );
SelectObject( _s->hGuiDC, _s->pGUI->penNull );
Rectangle( _s->hGuiDC, iLeft, iTop, iRight+1, iBottom+1 );
}
// Thumb
//
SelectObject( _s->hdc, _s->wvtWhiteBrush );
SelectObject( _s->hdc, _s->penGray );
SelectObject( _s->hdc, _s->pGUI->whiteBrush );
SelectObject( _s->hdc, _s->pGUI->penGray );
Rectangle( _s->hdc, iThumbLeft, iTop, iThumbRight, iBottom );
if ( _s->bGui )
{
SelectObject( _s->hGuiDC, _s->wvtWhiteBrush );
SelectObject( _s->hGuiDC, _s->penGray );
SelectObject( _s->hGuiDC, _s->pGUI->whiteBrush );
SelectObject( _s->hGuiDC, _s->pGUI->penGray );
Rectangle( _s->hGuiDC, iThumbLeft, iTop, iThumbRight, iBottom );
}
@@ -2633,7 +2633,7 @@ HB_FUNC( WVT_DRAWSHADEDRECT )
BOOL bGF = FALSE;
if ( _s->hMSImg32 )
if ( _s->pGUI->hMSImg32 )
{
TRIVERTEX vert[ 2 ] ;
GRADIENT_RECT gRect = { 0,0 };
@@ -2662,10 +2662,10 @@ HB_FUNC( WVT_DRAWSHADEDRECT )
gRect.UpperLeft = 0;
gRect.LowerRight= 1;
bGF = ( BOOL ) _s->pfnGF( _s->hdc, vert, 2, &gRect, 1, iMode );
bGF = ( BOOL ) _s->pGUI->pfnGF( _s->hdc, vert, 2, &gRect, 1, iMode );
if ( _s->bGui )
{
bGF = ( BOOL ) _s->pfnGF( _s->hGuiDC, vert, 2, &gRect, 1, iMode );
bGF = ( BOOL ) _s->pGUI->pfnGF( _s->hGuiDC, vert, 2, &gRect, 1, iMode );
}
}
hb_retl( bGF );
@@ -2876,12 +2876,12 @@ HB_FUNC( WVT_LOADPICTURE )
if ( iPicture )
{
if ( _s->iPicture[ iSlot ] )
if ( _s->pGUI->iPicture[ iSlot ] )
{
hb_wvt_gtDestroyPicture( _s->iPicture[ iSlot ] );
hb_wvt_gtDestroyPicture( _s->pGUI->iPicture[ iSlot ] );
}
_s->iPicture[ iSlot ] = iPicture;
_s->pGUI->iPicture[ iSlot ] = iPicture;
bResult = TRUE;
}
hb_retl( bResult );
@@ -2899,12 +2899,12 @@ HB_FUNC( WVT_LOADPICTUREFROMRESOURCE )
if ( iPicture )
{
if ( _s->iPicture[ iSlot ] )
if ( _s->pGUI->iPicture[ iSlot ] )
{
hb_wvt_gtDestroyPicture( _s->iPicture[ iSlot ] );
hb_wvt_gtDestroyPicture( _s->pGUI->iPicture[ iSlot ] );
}
_s->iPicture[ iSlot ] = iPicture;
_s->pGUI->iPicture[ iSlot ] = iPicture;
bResult = TRUE;
}
hb_retl( bResult );
@@ -2943,11 +2943,11 @@ HB_FUNC( WVT_LOADFONT )
hFont = CreateFontIndirect( &logfont );
if ( hFont )
{
if ( _s->hUserFonts[ iSlot ] )
if ( _s->pGUI->hUserFonts[ iSlot ] )
{
DeleteObject( _s->hUserFonts[ iSlot ] );
DeleteObject( _s->pGUI->hUserFonts[ iSlot ] );
}
_s->hUserFonts[ iSlot ] = hFont;
_s->pGUI->hUserFonts[ iSlot ] = hFont;
}
}
@@ -2972,11 +2972,11 @@ HB_FUNC( WVT_LOADPEN )
if ( hPen )
{
if ( _s->hUserPens[ iSlot ] )
if ( _s->pGUI->hUserPens[ iSlot ] )
{
DeleteObject( _s->hUserPens[ iSlot ] );
DeleteObject( _s->pGUI->hUserPens[ iSlot ] );
}
_s->hUserPens[ iSlot ] = hPen;
_s->pGUI->hUserPens[ iSlot ] = hPen;
hb_retl( TRUE );
}

View File

@@ -270,6 +270,9 @@ METHOD addItem( aItem, p2, p3, p4 ) CLASS wvgMenuBar
nAttrib := p4
endif
HB_SYMBOL_UNUSED( nStyle )
HB_SYMBOL_UNUSED( nAttrib )
nItemIndex := ::numItems() + 1
// xCaption : NIL | cPrompt | ncResource | oMenu
@@ -317,7 +320,7 @@ METHOD addItem( aItem, p2, p3, p4 ) CLASS wvgMenuBar
//----------------------------------------------------------------------//
METHOD findMenuItemById( nId ) CLASS wvgMenuBar
LOCAL x, aResult :={}, aRes :={}
LOCAL x, aResult :={}
IF !empty( nId )
x := ::numItems()

View File

@@ -64,7 +64,11 @@
//-------------------------------------------------------------------//
#if 0 // Until THREAD STATIC is made true thread sttaic
thread static paint_:= { { '', {} } }
#else
thread static paint_
#endif
//-------------------------------------------------------------------//
//
@@ -144,7 +148,11 @@ function WvtPaintObjects()
function WvtSetPaint( a_ )
local o
thread static s := {}
thread static s
IF s == nil
s := {}
ENDIF
o := s
@@ -159,6 +167,10 @@ function WvtSetPaint( a_ )
function SetPaint( cID, nAction, xData, aAttr )
local n, n1, oldData
IF paint_== NIL
paint_:= { { '', {} } }
ENDIF
if xData <> nil
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
if ( n1 := ascan( paint_[ n,2 ], {|e_| e_[ 1 ] == nAction } ) ) > 0
@@ -182,6 +194,10 @@ function SetPaint( cID, nAction, xData, aAttr )
function GetPaint( cID )
local n
IF paint_== NIL
paint_:= { { '', {} } }
ENDIF
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
return paint_[ n,2 ]
endif
@@ -193,6 +209,10 @@ function GetPaint( cID )
function DelPaint( cID, nAction )
local xData, n1, n
IF paint_== NIL
paint_:= { { '', {} } }
ENDIF
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
if ( n1 := ascan( paint_[ n,2 ], {|e_| e_[ 1 ] == nAction } ) ) > 0
xData := paint_[ n,2,n1,2 ]
@@ -209,6 +229,10 @@ function PurgePaint( cID,lDummy )
DEFAULT lDummy TO .f.
IF paint_== NIL
paint_:= { { '', {} } }
ENDIF
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
aPaint := paint_[ n ]
ADel( paint_, n )
@@ -228,6 +252,10 @@ function InsertPaint( cID, aPaint, lSet )
DEFAULT lSet TO .f.
IF paint_== NIL
paint_:= { { '', {} } }
ENDIF
if ( n := ascan( paint_, { |e_| e_[ 1 ] == cID } ) ) > 0
paint_[ n ] := aPaint
else
@@ -391,7 +419,6 @@ Function Wvt_CreateDialog( acnDlg, lOnTop, cbDlgProc, ncIcon, nTimerTicks, hMenu
cbDlgProc := upper( cbDlgProc )
endif
hDlg := 0
cType := Valtype( acnDlg )
nDlgMode := iif( cType == 'C', 0, iif( cType == 'N', 1, 2 ) )

View File

@@ -140,7 +140,6 @@ METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSLE
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSLE
LOCAL es_:= { ES_LEFT, ES_RIGHT, ES_CENTER }
LOCAL xVar
::Initialize( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
@@ -178,7 +177,7 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgSL
ENDIF
IF hb_isObject( ::datalink )
xVar := eval( ::datalink )
eval( ::datalink )
ENDIF
::sendMessage( EM_SETLIMITTEXT, ::bufferLength )

View File

@@ -122,7 +122,6 @@ METHOD new( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgStati
//----------------------------------------------------------------------//
METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgStatic
LOCAL wm_:= {}
::Initialize( oParent, oOwner, aPos, aSize, aPresParams, lVisible )

View File

@@ -394,6 +394,8 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog
nL := Win_LoWord( nwParam )
nH := Win_HiWord( nwParam )
HB_SYMBOL_UNUSED( nH )
DO CASE
CASE nL == IDOK

View File

@@ -1448,7 +1448,7 @@ HB_FUNC( WVT_GETFONTHANDLE )
int iSlot = hb_parni( 1 ) - 1;
if ( iSlot >= 0 && iSlot < WVT_PICTURES_MAX )
hFont = _s->hUserFonts[ iSlot ];
hFont = _s->pGUI->hUserFonts[ iSlot ];
hb_retnint( ( HB_PTRDIFF ) hFont );
}

View File

@@ -549,7 +549,7 @@ METHOD setFont() CLASS WvgWindow
//----------------------------------------------------------------------//
METHOD setFontCompoundName( xFont ) CLASS WvgWindow
LOCAL cOldFont, s, n, cAttr := '', nPoint := 0, cFace := '', cFont
LOCAL cOldFont, s, n, nPoint, cFont, cAttr, cFace
LOCAL aAttr := { 'normal','italic','bold' }
cOldFont := ::fnt_COMMPOUNDNAME
@@ -572,9 +572,15 @@ METHOD setFontCompoundName( xFont ) CLASS WvgWindow
IF ( n := at( '.', cFont ) ) > 0
nPoint := val( substr( cFont,1,n-1 ) )
cFont := substr( cFont,n+1 )
ELSE
nPoint := 0
ENDIF
cFace := alltrim( cFont )
HB_SYMBOL_UNUSED( cFace )
HB_SYMBOL_UNUSED( cAttr )
HB_SYMBOL_UNUSED( nPoint )
ENDIF
ENDIF