From 47d10a4978fc8a5e896c037a1378de9e893e6136 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Tue, 9 Jun 2009 05:39:19 +0000 Subject: [PATCH] 2009-06-08 22:36 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtwvg/wvgcore.c * harbour/contrib/gtwvg/wvgcuig.c * harbour/contrib/gtwvg/wvgutils.c * harbour/contrib/gtwvg/wvgwin.c ! ISNIL() => HB_IS*() --- harbour/ChangeLog | 7 ++ harbour/contrib/gtwvg/wvgcore.c | 138 +++++++++++++++---------------- harbour/contrib/gtwvg/wvgcuig.c | 60 +++++++------- harbour/contrib/gtwvg/wvgutils.c | 42 +++++----- harbour/contrib/gtwvg/wvgwin.c | 52 ++++++------ 5 files changed, 153 insertions(+), 146 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d2750179e8..49b2bcdc50 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,13 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-08 22:36 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/gtwvg/wvgcore.c + * harbour/contrib/gtwvg/wvgcuig.c + * harbour/contrib/gtwvg/wvgutils.c + * harbour/contrib/gtwvg/wvgwin.c + ! ISNIL() => HB_IS*() + 2009-06-08 21:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * make_gnu.bat + Added C compiler autodetection. This feature will kick diff --git a/harbour/contrib/gtwvg/wvgcore.c b/harbour/contrib/gtwvg/wvgcore.c index 3a1b0ee78d..967046b5bd 100644 --- a/harbour/contrib/gtwvg/wvgcore.c +++ b/harbour/contrib/gtwvg/wvgcore.c @@ -984,14 +984,14 @@ HB_FUNC( WVT_SETPEN ) COLORREF crColor; HPEN hPen; - if ( ISNIL( 1 ) ) + if ( !HB_ISNUM( 1 ) ) { hb_retl( FALSE ); } iPenStyle = hb_parni( 1 ) ; - iPenWidth = ISNIL( 2 ) ? 0 : hb_parni( 2 ); - crColor = ISNIL( 3 ) ? RGB( 0,0,0 ) : ( COLORREF ) hb_parnl( 3 ); + iPenWidth = hb_parni( 2 ); + crColor = HB_ISNUM( 3 ) ? ( COLORREF ) hb_parnl( 3 ) : RGB( 0,0,0 ); hPen = CreatePen( iPenStyle, iPenWidth, crColor ); @@ -1022,14 +1022,14 @@ HB_FUNC( WVT_SETBRUSH ) HBRUSH hBrush; LOGBRUSH lb = { 0,0,0 }; - if ( ISNIL( 1 ) ) + if ( !HB_ISNUM( 1 ) ) { hb_retl( FALSE ); } lb.lbStyle = hb_parnl( 1 ); - lb.lbColor = ISNIL( 2 ) ? RGB( 0,0,0 ) : ( COLORREF ) hb_parnl( 2 ) ; - lb.lbHatch = ISNIL( 3 ) ? 0 : hb_parnl( 3 ); + lb.lbColor = HB_ISNUM( 2 ) ? ( COLORREF ) hb_parnl( 2 ) : RGB( 0,0,0 ); + lb.lbHatch = hb_parnl( 3 ); #if ! defined( HB_OS_WIN_CE ) hBrush = CreateBrushIndirect( &lb ); #else @@ -1217,22 +1217,22 @@ HB_FUNC( WVT_DRAWLABEL ) HFONT hFont, hOldFont, hOldFontGui; LOGFONT logfont;// = { 0 }; - logfont.lfEscapement = ( ISNIL( 5 ) ? 0 : ( hb_parni( 5 ) * 10 ) ); + logfont.lfEscapement = hb_parni( 5 ) * 10; logfont.lfOrientation = 0; - logfont.lfWeight = ( ISNIL( 11 ) ? 0 : hb_parni( 11 ) ); - logfont.lfItalic = ( ISNIL( 14 ) ? 0 : ( BYTE ) hb_parl( 14 ) ); - logfont.lfUnderline = ( ISNIL( 15 ) ? 0 : ( BYTE ) hb_parl( 15 ) ); - logfont.lfStrikeOut = ( ISNIL( 16 ) ? 0 : ( BYTE ) hb_parl( 16 ) ); - logfont.lfCharSet = ( ISNIL( 13 ) ? ( BYTE ) _s->CodePage : ( BYTE ) hb_parni( 13 ) ); + logfont.lfWeight = hb_parni( 11 ); + logfont.lfItalic = ( BYTE ) hb_parl( 14 ); + logfont.lfUnderline = ( BYTE ) hb_parl( 15 ); + logfont.lfStrikeOut = ( BYTE ) hb_parl( 16 ); + logfont.lfCharSet = ( !HB_ISNUM( 13 ) ? ( BYTE ) _s->CodePage : ( BYTE ) hb_parni( 13 ) ); logfont.lfOutPrecision = 0; logfont.lfClipPrecision = 0; - logfont.lfQuality = ( ISNIL( 12 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 12 ) ); + logfont.lfQuality = ( !HB_ISNUM( 12 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 12 ) ); logfont.lfPitchAndFamily = FF_DONTCARE; - logfont.lfHeight = ( ISNIL( 9 ) ? _s->fontHeight : hb_parni( 9 ) ); - logfont.lfWidth = ( ISNIL( 10 ) ? (_s->fontWidth < 0 ? -_s->fontWidth : _s->fontWidth ) : hb_parni( 10 ) ); + logfont.lfHeight = ( !HB_ISNUM( 9 ) ? _s->fontHeight : hb_parni( 9 ) ); + logfont.lfWidth = ( !HB_ISNUM( 10 ) ? (_s->fontWidth < 0 ? -_s->fontWidth : _s->fontWidth ) : hb_parni( 10 ) ); - HB_TCHAR_CPTO( logfont.lfFaceName, ( ISNIL( 8 ) ? _s->fontFace : hb_parcx( 8 ) ), sizeof( logfont.lfFaceName )-1 ); + HB_TCHAR_CPTO( logfont.lfFaceName, ( !HB_ISCHAR( 8 ) ? _s->fontFace : hb_parcx( 8 ) ), sizeof( logfont.lfFaceName )-1 ); hFont = CreateFontIndirect( &logfont ); if ( hFont ) @@ -1247,7 +1247,7 @@ HB_FUNC( WVT_DRAWLABEL ) SetBkColor( _s->hdc, bgClr ); SetTextColor( _s->hdc, fgClr ); - SetTextAlign( _s->hdc, ( ISNIL( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); + SetTextAlign( _s->hdc, ( !HB_ISNUM( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); hOldFont = ( HFONT ) SelectObject( _s->hdc, hFont ); ExtTextOut( _s->hdc, xy.x, xy.y, 0, NULL, text, lstrlen( text ), NULL ); @@ -1258,7 +1258,7 @@ HB_FUNC( WVT_DRAWLABEL ) { SetBkColor( _s->hGuiDC, bgClr ); SetTextColor( _s->hGuiDC, fgClr ); - SetTextAlign( _s->hGuiDC, ( ISNIL( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); + SetTextAlign( _s->hGuiDC, ( !HB_ISNUM( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); hOldFontGui = ( HFONT ) SelectObject( _s->hGuiDC, hFont ); ExtTextOut( _s->hGuiDC, xy.x, xy.y, 0, NULL, text, lstrlen( text ), NULL ); @@ -1296,7 +1296,7 @@ HB_FUNC( WVT_DRAWOUTLINE ) if ( ISNUM( 5 ) ) { - hPen = CreatePen( hb_parni( 5 ), 0, ( ISNIL( 7 ) ? 0 : ( COLORREF ) hb_parnl( 7 ) ) ); + hPen = CreatePen( hb_parni( 5 ), 0, ( !HB_ISNUM( 7 ) ? 0 : ( COLORREF ) hb_parnl( 7 ) ) ); if ( hPen ) { hOldPen = (HPEN) SelectObject( _s->hdc, hPen ); @@ -1354,12 +1354,12 @@ HB_FUNC( WVT_DRAWLINE ) HPEN hPen, hOldPen, hOldPenGUI; /* Resolve Parameters */ - iOrient = ISNIL( 5 ) ? 0 : hb_parni( 5 ); - iFormat = ISNIL( 6 ) ? 0 : hb_parni( 6 ); - iAlign = ISNIL( 7 ) ? 0 : hb_parni( 7 ); - iStyle = ISNIL( 8 ) ? 0 : hb_parni( 8 ); - iThick = ISNIL( 9 ) ? 0 : hb_parni( 9 ); - cr = ISNIL(10 ) ? 0 : ( COLORREF ) hb_parnl( 10 ); + iOrient = hb_parni( 5 ); + iFormat = hb_parni( 6 ); + iAlign = hb_parni( 7 ); + iStyle = hb_parni( 8 ); + iThick = hb_parni( 9 ); + cr = !HB_ISNUM( 10 ) ? 0 : ( COLORREF ) hb_parnl( 10 ); x = iLeft ; y = iTop ; @@ -1612,8 +1612,8 @@ HB_FUNC( WVT_DRAWROUNDRECT ) int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); int iHt, iWd; - iHt = ISNIL( 6 ) ? 0 : hb_parni( 6 ); - iWd = ISNIL( 7 ) ? 0 : hb_parni( 7 ); + iHt = hb_parni( 6 ); + iWd = hb_parni( 7 ); SelectObject( _s->hdc, _s->currentBrush ); SelectObject( _s->hdc, _s->currentPen ); @@ -1810,11 +1810,11 @@ HB_FUNC( WVT_DRAWBUTTON ) HBRUSH hBrush; BOOL bText = ISCHAR( 5 ); - BOOL bImage = !( ISNIL( 6 ) ); - int iFormat = ISNIL( 7 ) ? 0 : hb_parni( 7 ); - COLORREF textColor = ISNIL( 8 ) ? _s->COLORS[ 0 ] : ( COLORREF ) hb_parnl( 8 ) ; - COLORREF bkColor = ISNIL( 9 ) ? _s->COLORS[ 7 ] : ( COLORREF ) hb_parnl( 9 ) ; - /* int iImageAt = ISNIL( 10 ) ? 0 : hb_parni( 10 ); */ + BOOL bImage = ( HB_ISNUM( 6 ) || HB_ISCHAR( 6 ) ); + int iFormat = hb_parni( 7 ); + COLORREF textColor = !HB_ISNUM( 8 ) ? _s->COLORS[ 0 ] : ( COLORREF ) hb_parnl( 8 ) ; + COLORREF bkColor = !HB_ISNUM( 9 ) ? _s->COLORS[ 7 ] : ( COLORREF ) hb_parnl( 9 ) ; + /* int iImageAt = hb_parni( 10 ); */ xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; iTop = xy.y + hb_parni( 11,1 ); @@ -2081,7 +2081,7 @@ HB_FUNC( WVT_DRAWLABELEX ) SetBkColor( _s->hdc, bgClr ); SetTextColor( _s->hdc, fgClr ); - SetTextAlign( _s->hdc, ( ISNIL( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); + SetTextAlign( _s->hdc, ( !HB_ISNUM( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); SelectObject( _s->hdc, _s->pGUI->hUserFonts[ iSlot ] ); ExtTextOut( _s->hdc, xy.x, xy.y, 0, NULL, text, lstrlen( text ), NULL ); @@ -2090,7 +2090,7 @@ HB_FUNC( WVT_DRAWLABELEX ) { SetBkColor( _s->hGuiDC, bgClr ); SetTextColor( _s->hGuiDC, fgClr ); - SetTextAlign( _s->hGuiDC, ( ISNIL( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); + SetTextAlign( _s->hGuiDC, ( !HB_ISNUM( 4 ) ? TA_LEFT : hb_parni( 4 ) ) ); SelectObject( _s->hGuiDC, _s->pGUI->hUserFonts[ iSlot ] ); ExtTextOut( _s->hGuiDC, xy.x, xy.y, 0, NULL, text, lstrlen( text ), NULL ); @@ -2127,9 +2127,9 @@ HB_FUNC( WVT_DRAWLINEEX ) iRight = xy.x-1 + hb_parni( 9,4 ); /* Resolve Parameters */ - iOrient = ISNIL( 5 ) ? 0 : hb_parni( 5 ); - iFormat = ISNIL( 6 ) ? 0 : hb_parni( 6 ); - iAlign = ISNIL( 7 ) ? 0 : hb_parni( 7 ); + iOrient = hb_parni( 5 ); + iFormat = hb_parni( 6 ); + iAlign = hb_parni( 7 ); x = iLeft ; y = iTop ; @@ -2518,7 +2518,7 @@ HB_FUNC( WVT_DRAWSCROLLBUTTON ) POINT * Point; POINT xy = { 0,0 }; int iHeight, iOff; - BOOL bDepressed = ISNIL( 7 ) ? FALSE : hb_parl( 7 ) ; + BOOL bDepressed = hb_parl( 7 ) ; Point = ( POINT * ) hb_xgrab( 3 * sizeof( POINT ) ); iOff = 6; @@ -2744,7 +2744,7 @@ HB_FUNC( WVT_DRAWSHADEDRECT ) int iBottom = ( _s->PTEXTSIZE.y * ( hb_parni( 3 ) + 1 ) ) - 1 + hb_parni( 5,3 ); int iRight = ( _s->PTEXTSIZE.x * ( hb_parni( 4 ) + 1 ) ) - 1 + hb_parni( 5,4 ); - int iMode = ISNIL( 6 ) ? GRADIENT_FILL_RECT_H : hb_parni( 6 ) ; + int iMode = !HB_ISNUM( 6 ) ? GRADIENT_FILL_RECT_H : hb_parni( 6 ) ; vert[ 0 ].x = iLeft; vert[ 0 ].y = iTop; @@ -2821,7 +2821,7 @@ HB_FUNC( WVT_DRAWTEXTBOX ) SetTextAlign( _s->hdc, TA_TOP | TA_LEFT | TA_NOUPDATECP ); SetTextColor( _s->hdc, fgClr ); SetBkColor( _s->hdc, bgClr ); - SetBkMode( _s->hdc, ISNIL( 11 ) ? OPAQUE : hb_parni( 11 ) ); + SetBkMode( _s->hdc, !HB_ISNUM( 11 ) ? OPAQUE : hb_parni( 11 ) ); SelectObject( _s->hdc, ( HFONT ) ( HB_PTRDIFF ) hb_parnint( 12 ) ); DrawText( _s->hdc, text, lstrlen( text ), &rc, iAlignH | DT_WORDBREAK | DT_TOP ); @@ -2831,7 +2831,7 @@ HB_FUNC( WVT_DRAWTEXTBOX ) SetTextAlign( _s->hGuiDC, TA_TOP | TA_LEFT | TA_NOUPDATECP ); SetTextColor( _s->hGuiDC, fgClr ); SetBkColor( _s->hGuiDC, bgClr ); - SetBkMode( _s->hGuiDC, ISNIL( 11 ) ? OPAQUE : hb_parni( 11 ) ); + SetBkMode( _s->hGuiDC, !HB_ISNUM( 11 ) ? OPAQUE : hb_parni( 11 ) ); SelectObject( _s->hGuiDC, ( HFONT ) ( HB_PTRDIFF ) hb_parnint( 12 ) ); DrawText( _s->hGuiDC, text, lstrlen( text ), &rc, iAlignH | DT_WORDBREAK | DT_TOP ); @@ -2861,9 +2861,9 @@ HB_FUNC( WVT_DRAWPROGRESSBAR ) RECT rc = { 0,0,0,0 }; iPercent = hb_parni( 6 ); - bImage = ISNIL( 9 ) ? FALSE : TRUE ; - bVertical = ISNIL( 10 ) ? FALSE : hb_parl( 10 ) ; - iDirection = ISNIL( 11 ) ? 0 : hb_parni( 11 ); + bImage = HB_ISCHAR( 9 ); + bVertical = hb_parl( 10 ) ; + iDirection = hb_parni( 11 ); if ( bVertical ) { @@ -2916,7 +2916,7 @@ HB_FUNC( WVT_DRAWPROGRESSBAR ) } else { - crBarColor = ISNIL( 8 ) ? _s->COLORS[ 0 ] : ( COLORREF ) hb_parnl( 8 ); + crBarColor = !HB_ISNUM( 8 ) ? _s->COLORS[ 0 ] : ( COLORREF ) hb_parnl( 8 ); lb.lbStyle = BS_SOLID; lb.lbColor = crBarColor; @@ -2951,21 +2951,21 @@ HB_FUNC( WVT_CREATEFONT ) LOGFONT logfont; /* = { 0,0,0 }; */ - logfont.lfEscapement = ( ISNIL( 10 ) ? 0 : ( hb_parni( 10 ) * 10 ) ); + logfont.lfEscapement = hb_parni( 10 ) * 10; logfont.lfOrientation = 0; - logfont.lfWeight = ( ISNIL( 4 ) ? 0 : hb_parni( 4 ) ); - logfont.lfItalic = ( ISNIL( 5 ) ? 0 : ( BYTE ) hb_parl( 5 ) ); - logfont.lfUnderline = ( ISNIL( 6 ) ? 0 : ( BYTE ) hb_parl( 6 ) ); - logfont.lfStrikeOut = ( ISNIL( 7 ) ? 0 : ( BYTE ) hb_parl( 7 ) ); - logfont.lfCharSet = ( ISNIL( 8 ) ? ( BYTE ) _s->CodePage : ( BYTE ) hb_parni( 8 ) ); + logfont.lfWeight = ( hb_parni( 4 ) ); + logfont.lfItalic = ( BYTE ) hb_parl( 5 ); + logfont.lfUnderline = ( BYTE ) hb_parl( 6 ); + logfont.lfStrikeOut = ( BYTE ) hb_parl( 7 ); + logfont.lfCharSet = ( !HB_ISNUM( 8 ) ? ( BYTE ) _s->CodePage : ( BYTE ) hb_parni( 8 ) ); logfont.lfOutPrecision = 0; logfont.lfClipPrecision = 0; - logfont.lfQuality = ( ISNIL( 9 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 9 ) ); + logfont.lfQuality = ( !HB_ISNUM( 9 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 9 ) ); logfont.lfPitchAndFamily = FF_DONTCARE; - logfont.lfHeight = ( ISNIL( 2 ) ? _s->fontHeight : hb_parni( 2 ) ); - logfont.lfWidth = ( ISNIL( 3 ) ? ( _s->fontWidth < 0 ? -_s->fontWidth : _s->fontWidth ) : hb_parni( 3 ) ); + logfont.lfHeight = ( !HB_ISNUM( 2 ) ? _s->fontHeight : hb_parni( 2 ) ); + logfont.lfWidth = ( !HB_ISNUM( 3 ) ? ( _s->fontWidth < 0 ? -_s->fontWidth : _s->fontWidth ) : hb_parni( 3 ) ); - HB_TCHAR_CPTO( logfont.lfFaceName, ( ISNIL( 1 ) ? _s->fontFace : hb_parcx( 1 ) ), sizeof( logfont.lfFaceName )-1 ); + HB_TCHAR_CPTO( logfont.lfFaceName, ( !HB_ISCHAR( 1 ) ? _s->fontFace : hb_parcx( 1 ) ), sizeof( logfont.lfFaceName )-1 ); hb_retnint( ( HB_PTRDIFF ) CreateFontIndirect( &logfont ) ); } @@ -3035,21 +3035,21 @@ HB_FUNC( WVT_LOADFONT ) int iSlot = hb_parni( 1 ) - 1; HFONT hFont; - logfont.lfEscapement = ( ISNIL( 11 ) ? 0 : ( hb_parni( 11 ) * 10 ) ); + logfont.lfEscapement = hb_parni( 11 ) * 10; logfont.lfOrientation = 0; - logfont.lfWeight = ( ISNIL( 5 ) ? 0 : hb_parni( 5 ) ); - logfont.lfItalic = ( ISNIL( 6 ) ? 0 : ( BYTE ) hb_parl( 6 ) ); - logfont.lfUnderline = ( ISNIL( 7 ) ? 0 : ( BYTE ) hb_parl( 7 ) ); - logfont.lfStrikeOut = ( ISNIL( 8 ) ? 0 : ( BYTE ) hb_parl( 8 ) ); - logfont.lfCharSet = ( ISNIL( 9 ) ? ( BYTE ) _s->CodePage : ( BYTE ) hb_parni( 9 ) ); + logfont.lfWeight = hb_parni( 5 ); + logfont.lfItalic = ( BYTE ) hb_parl( 6 ); + logfont.lfUnderline = ( BYTE ) hb_parl( 7 ); + logfont.lfStrikeOut = ( BYTE ) hb_parl( 8 ); + logfont.lfCharSet = ( !HB_ISNUM( 9 ) ? ( BYTE ) _s->CodePage : ( BYTE ) hb_parni( 9 ) ); logfont.lfOutPrecision = 0; logfont.lfClipPrecision = 0; - logfont.lfQuality = ( ISNIL( 10 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 10 ) ); + logfont.lfQuality = ( !HB_ISNUM( 10 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 10 ) ); logfont.lfPitchAndFamily = FF_DONTCARE; - logfont.lfHeight = ( ISNIL( 3 ) ? _s->fontHeight : hb_parni( 3 ) ); - logfont.lfWidth = ( ISNIL( 4 ) ? ( _s->fontWidth < 0 ? -_s->fontWidth : _s->fontWidth ) : hb_parni( 4 ) ); + logfont.lfHeight = ( !HB_ISNUM( 3 ) ? _s->fontHeight : hb_parni( 3 ) ); + logfont.lfWidth = ( !HB_ISNUM( 4 ) ? ( _s->fontWidth < 0 ? -_s->fontWidth : _s->fontWidth ) : hb_parni( 4 ) ); - HB_TCHAR_CPTO( logfont.lfFaceName, ( ISNIL( 2 ) ? _s->fontFace : hb_parcx( 2 ) ), sizeof( logfont.lfFaceName )-1 ); + HB_TCHAR_CPTO( logfont.lfFaceName, ( !HB_ISCHAR( 2 ) ? _s->fontFace : hb_parcx( 2 ) ), sizeof( logfont.lfFaceName )-1 ); hFont = CreateFontIndirect( &logfont ); if ( hFont ) @@ -3075,9 +3075,9 @@ HB_FUNC( WVT_LOADPEN ) HPEN hPen; int iSlot = hb_parni( 1 ) - 1; - iPenStyle = ISNIL( 2 ) ? 0 : hb_parni( 2 ) ; - iPenWidth = ISNIL( 3 ) ? 0 : hb_parni( 3 ); - crColor = ISNIL( 4 ) ? RGB( 0,0,0 ) : ( COLORREF ) hb_parnl( 4 ); + iPenStyle = hb_parni( 2 ) ; + iPenWidth = hb_parni( 3 ); + crColor = !HB_ISNUM( 4 ) ? RGB( 0,0,0 ) : ( COLORREF ) hb_parnl( 4 ); hPen = CreatePen( iPenStyle, iPenWidth, crColor ); @@ -3151,7 +3151,7 @@ HB_FUNC( WVT_RESTSCREEN ) HDC hCompDC; BOOL bResult = FALSE; - BOOL bDoNotDestroyBMP = ISNIL( 6 ) ? FALSE : hb_parl( 6 ); + BOOL bDoNotDestroyBMP = hb_parl( 6 ); xy = hb_wvt_gtGetXYFromColRow( ( USHORT ) hb_parni( 2 ), ( USHORT ) hb_parni( 1 ) );; iTop = xy.y; diff --git a/harbour/contrib/gtwvg/wvgcuig.c b/harbour/contrib/gtwvg/wvgcuig.c index 912b52c83d..cb92e8f03f 100644 --- a/harbour/contrib/gtwvg/wvgcuig.c +++ b/harbour/contrib/gtwvg/wvgcuig.c @@ -279,13 +279,13 @@ HB_FUNC( WVG_SETGOBJDATA ) gObj->bDestroyBrush = TRUE; break; case GOBJ_OBJDATA_COLORTEXT: - if( !ISNIL( 3 ) ) + if( HB_ISNUM( 3 ) ) gObj->crRGBText = ( COLORREF ) ( HB_PTRDIFF ) hb_parnint( 3 ); else bSuccess = FALSE; break; case GOBJ_OBJDATA_COLORBK: - gObj->crRGBBk = ISNUM( 3 ) ? ( COLORREF ) ( HB_PTRDIFF ) hb_parnint( 3 ) : ( COLORREF ) 0; + gObj->crRGBBk = HB_ISNUM( 3 ) ? ( COLORREF ) ( HB_PTRDIFF ) hb_parnint( 3 ) : ( COLORREF ) 0; break; case GOBJ_OBJDATA_BLOCK: if( gObj->bBlock ) @@ -587,21 +587,21 @@ HB_FUNC( WVG_LABEL ) LOGFONT lf; HFONT hFont; - lf.lfEscapement = ( ISNIL( 6 ) ? 0 : ( hb_parni( 6 ) * 10 ) ); + lf.lfEscapement = ( !HB_ISNUM( 6 ) ? 0 : ( hb_parni( 6 ) * 10 ) ); lf.lfOrientation = 0; - lf.lfWeight = ( ISNIL( 12 ) ? 0 : hb_parni( 12 ) ); - lf.lfItalic = ( ISNIL( 15 ) ? 0 : ( BYTE ) hb_parl( 15 ) ); - lf.lfUnderline = ( ISNIL( 16 ) ? 0 : ( BYTE ) hb_parl( 16 ) ); - lf.lfStrikeOut = ( ISNIL( 17 ) ? 0 : ( BYTE ) hb_parl( 17 ) ); - lf.lfCharSet = ( ISNIL( 14 ) ? ( BYTE ) pWVT->CodePage : ( BYTE ) hb_parni( 14 ) ); + lf.lfWeight = ( !HB_ISNUM( 12 ) ? 0 : hb_parni( 12 ) ); + lf.lfItalic = ( !HB_ISNUM( 15 ) ? 0 : ( BYTE ) hb_parl( 15 ) ); + lf.lfUnderline = ( !HB_ISNUM( 16 ) ? 0 : ( BYTE ) hb_parl( 16 ) ); + lf.lfStrikeOut = ( !HB_ISNUM( 17 ) ? 0 : ( BYTE ) hb_parl( 17 ) ); + lf.lfCharSet = ( !HB_ISNUM( 14 ) ? ( BYTE ) pWVT->CodePage : ( BYTE ) hb_parni( 14 ) ); lf.lfOutPrecision = 0; lf.lfClipPrecision = 0; - lf.lfQuality = ( ISNIL( 13 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 13 ) ); + lf.lfQuality = ( !HB_ISNUM( 13 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 13 ) ); lf.lfPitchAndFamily = FF_DONTCARE; - lf.lfHeight = ( ISNIL( 10 ) ? pWVT->fontHeight : hb_parni( 10 ) ); - lf.lfWidth = ( ISNIL( 11 ) ? (pWVT->fontWidth < 0 ? -pWVT->fontWidth : pWVT->fontWidth ) : hb_parni( 11 ) ); + lf.lfHeight = ( !HB_ISNUM( 10 ) ? pWVT->fontHeight : hb_parni( 10 ) ); + lf.lfWidth = ( !HB_ISNUM( 11 ) ? (pWVT->fontWidth < 0 ? -pWVT->fontWidth : pWVT->fontWidth ) : hb_parni( 11 ) ); // - HB_TCHAR_CPTO( lf.lfFaceName, ( ISNIL( 9 ) ? pWVT->fontFace : hb_parc( 9 ) ), sizeof( lf.lfFaceName )-1 ); + HB_TCHAR_CPTO( lf.lfFaceName, ( !HB_ISCHAR( 9 ) ? pWVT->fontFace : hb_parc( 9 ) ), sizeof( lf.lfFaceName )-1 ); hFont = CreateFontIndirect( &lf ); if( hFont ) @@ -627,9 +627,9 @@ HB_FUNC( WVG_LABEL ) HB_TCHAR_CPTO( gObj->lpText, hb_parc( 4 ), strlen( hb_parc( 4 ) ) ); #endif - gObj->iAlign = ISNUM( 5 ) ? hb_parni( 5 ) : TA_LEFT; + gObj->iAlign = HB_ISNUM( 5 ) ? hb_parni( 5 ) : TA_LEFT; gObj->crRGBText = ( COLORREF ) hb_parnint( 7 ); - gObj->crRGBBk = ISNUM( 8 ) ? ( COLORREF ) hb_parnint( 8 ) : ( COLORREF ) 0; + gObj->crRGBBk = HB_ISNUM( 8 ) ? ( COLORREF ) hb_parnint( 8 ) : ( COLORREF ) 0; gObj->hFont = hFont; gObj->bDestroyFont = TRUE; @@ -665,9 +665,9 @@ HB_FUNC( WVG_LABELEX ) HB_TCHAR_CPTO( gObj->lpText, hb_parc( 4 ), strlen( hb_parc( 4 ) ) ); #endif - gObj->iAlign = ISNUM( 5 ) ? hb_parni( 5 ) : TA_LEFT; + gObj->iAlign = HB_ISNUM( 5 ) ? hb_parni( 5 ) : TA_LEFT; gObj->crRGBText = ( COLORREF ) hb_parnint( 6 ); - gObj->crRGBBk = ISNUM( 7 ) ? ( COLORREF ) hb_parnint( 7 ) : ( COLORREF ) 0; + gObj->crRGBBk = HB_ISNUM( 7 ) ? ( COLORREF ) hb_parnint( 7 ) : ( COLORREF ) 0; gObj->hFont = pWVT->pGUI->hUserFonts[ hb_parni( 8 ) - 1 ]; gObj->bDestroyFont = FALSE; @@ -719,9 +719,9 @@ HB_FUNC( WVG_OUTLINE ) gObj->aOffset.iBottom = hb_parni( 5,3 ); gObj->aOffset.iRight = hb_parni( 5,4 ); - gObj->iWidth = ISNIL( 6 ) ? 0 : hb_parni( 6 ); /* iThick */ - gObj->iStyle = ISNIL( 7 ) ? 0 : hb_parni( 7 ); /* iShape */ - gObj->crRGB = ISNIL( 8 ) ? 0 : ( COLORREF ) hb_parnl( 8 ); + gObj->iWidth = hb_parni( 6 ); /* iThick */ + gObj->iStyle = hb_parni( 7 ); /* iShape */ + gObj->crRGB = !HB_ISNUM( 8 ) ? 0 : ( COLORREF ) hb_parnl( 8 ); if ( gObj->iWidth > 0 ) { @@ -812,13 +812,13 @@ HB_FUNC( WVG_LINE ) gObj->aOffset.iBottom = hb_parni( 5,3 ); gObj->aOffset.iRight = hb_parni( 5,4 ); - gObj->iOrient = ISNIL( 6 ) ? 0 : hb_parni( 6 ); - gObj->iFormat = ISNIL( 7 ) ? 0 : hb_parni( 7 ); - gObj->iAlign = ISNIL( 8 ) ? 0 : hb_parni( 8 ); + gObj->iOrient = hb_parni( 6 ); + gObj->iFormat = hb_parni( 7 ); + gObj->iAlign = hb_parni( 8 ); - gObj->iStyle = ISNIL( 9 ) ? 0 : hb_parni( 9 ); - gObj->iWidth = ISNIL(10 ) ? 0 : hb_parni(10 ); /* iThick */ - gObj->crRGB = ISNIL(11 ) ? 0 : ( COLORREF ) hb_parnl( 11 ); + gObj->iStyle = hb_parni( 9 ); + gObj->iWidth = hb_parni(10 ); /* iThick */ + gObj->crRGB = ( COLORREF ) hb_parnl( 11 ); gObj->hPen = CreatePen( gObj->iStyle, gObj->iWidth, gObj->crRGB ); gObj->bDestroyPen = TRUE; @@ -847,9 +847,9 @@ HB_FUNC( WVG_LINEEX ) gObj->aOffset.iBottom = hb_parni( 5,3 ); gObj->aOffset.iRight = hb_parni( 5,4 ); - gObj->iOrient = ISNIL( 6 ) ? 0 : hb_parni( 6 ); - gObj->iFormat = ISNIL( 7 ) ? 0 : hb_parni( 7 ); - gObj->iAlign = ISNIL( 8 ) ? 0 : hb_parni( 8 ); + gObj->iOrient = hb_parni( 6 ); + gObj->iFormat = hb_parni( 7 ); + gObj->iAlign = hb_parni( 8 ); gObj->hPen = pWVT->pGUI->hUserPens[ hb_parni( 9 ) - 1 ]; gObj->bDestroyPen = FALSE; @@ -1160,7 +1160,7 @@ HB_FUNC( WVG_SHADEDRECT ) gObj->aOffset.iBottom = hb_parni( 5,3 ); gObj->aOffset.iRight = hb_parni( 5,4 ); - gObj->iData = ISNIL( 6 ) ? GRADIENT_FILL_RECT_H : hb_parni( 6 ) ; + gObj->iData = !HB_ISNUM( 6 ) ? GRADIENT_FILL_RECT_H : hb_parni( 6 ) ; gObj->vert[ 0 ].x = 0; gObj->vert[ 0 ].y = 0; @@ -1239,7 +1239,7 @@ HB_FUNC( WVG_TEXTBOX ) gObj->iAlign = iAlignH; gObj->crRGBText = ( COLORREF ) hb_parnint( 9 ); - gObj->crRGBBk = ISNUM( 10 ) ? ( COLORREF ) hb_parnint( 10 ) : ( COLORREF ) 0; + gObj->crRGBBk = HB_ISNUM( 10 ) ? ( COLORREF ) hb_parnint( 10 ) : ( COLORREF ) 0; gObj->hFont = ( HFONT ) ( HB_PTRDIFF ) hb_parnint( 11 ); gObj->bDestroyFont = FALSE; diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 48044ea9e9..31effa772f 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -139,21 +139,21 @@ HB_FUNC( WVT_CHOOSEFONT ) LOGFONT lf; /* = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; */ LONG PointSize = 0; - if ( ! ISNIL( 2 ) ) + if ( HB_ISNUM( 2 ) ) { PointSize = -MulDiv( ( LONG ) hb_parnl( 2 ), GetDeviceCaps( _s->hdc, LOGPIXELSY ), 72 ) ; } lf.lfHeight = PointSize; - lf.lfWidth = ISNIL( 3 ) ? 0 : hb_parni( 3 ); - lf.lfWeight = ISNIL( 4 ) ? 0 : hb_parni( 4 ); - lf.lfItalic = ISNIL( 6 ) ? 0 : ( BYTE ) hb_parl( 6 ); - lf.lfUnderline = ISNIL( 7 ) ? 0 : ( BYTE ) hb_parl( 7 ); - lf.lfStrikeOut = ISNIL( 8 ) ? 0 : ( BYTE ) hb_parl( 8 ); + lf.lfWidth = hb_parni( 3 ); + lf.lfWeight = hb_parni( 4 ); + lf.lfItalic = !HB_ISNUM( 6 ) ? 0 : ( BYTE ) hb_parl( 6 ); + lf.lfUnderline = !HB_ISNUM( 7 ) ? 0 : ( BYTE ) hb_parl( 7 ); + lf.lfStrikeOut = !HB_ISNUM( 8 ) ? 0 : ( BYTE ) hb_parl( 8 ); lf.lfCharSet = DEFAULT_CHARSET; - lf.lfQuality = ISNIL( 5 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 5 ); + lf.lfQuality = !HB_ISNUM( 5 ) ? DEFAULT_QUALITY : ( BYTE ) hb_parni( 5 ); lf.lfPitchAndFamily = FF_DONTCARE; - if ( ISCHAR( 1 ) ) + if ( HB_ISCHAR( 1 ) ) { HB_TCHAR_CPTO( lf.lfFaceName, hb_parc( 1 ), sizeof( lf.lfFaceName ) - 1 ); } @@ -224,14 +224,14 @@ HB_FUNC( WVT_CHOOSECOLOR ) for( i = 0 ; i < 16 ; i++ ) { - crCustClr[ i ] = ( ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ) ; + crCustClr[ i ] = ( HB_ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ) ; } cc.lStructSize = sizeof( CHOOSECOLOR ) ; cc.hwndOwner = _s->hWnd ; - cc.rgbResult = ISNIL( 1 ) ? 0 : ( COLORREF ) hb_parnl( 1 ) ; + cc.rgbResult = HB_ISNUM( 1 ) ? ( COLORREF ) hb_parnl( 1 ) : 0; cc.lpCustColors = crCustClr ; - cc.Flags = ( WORD ) ( ISNIL( 3 ) ? CC_ANYCOLOR | CC_RGBINIT | CC_FULLOPEN : hb_parnl( 3 ) ); + cc.Flags = ( WORD ) ( HB_ISNUM( 3 ) ? hb_parnl( 3 ) : CC_ANYCOLOR | CC_RGBINIT | CC_FULLOPEN ); if ( ChooseColor( &cc ) ) { @@ -253,7 +253,7 @@ HB_FUNC( WVT_MESSAGEBOX ) LPTSTR title = HB_TCHAR_CONVTO( hb_parc( 1 ) ); LPTSTR msg = HB_TCHAR_CONVTO( hb_parc( 2 ) ); - hb_retni( MessageBox( _s->hWnd, title, msg, ISNIL( 3 ) ? MB_OK : hb_parni( 3 ) ) ) ; + hb_retni( MessageBox( _s->hWnd, title, msg, HB_ISNUM( 3 ) ? hb_parni( 3 ) : MB_OK ) ) ; HB_TCHAR_FREE( title ); HB_TCHAR_FREE( msg ); } @@ -270,7 +270,7 @@ HB_FUNC( WVT_SETTOOLTIPACTIVE ) BOOL bActive = _s->bToolTipActive; - if ( ! ISNIL( 1 ) ) + if ( HB_ISLOG( 1 ) ) { _s->bToolTipActive = hb_parl( 1 ); } @@ -427,9 +427,9 @@ HB_FUNC( WVT_SETTOOLTIPTITLE ) int iIcon; - if ( ! ISNIL( 2 ) ) + if ( HB_ISCHAR( 2 ) ) { - iIcon = ISNIL( 1 ) ? 0 : hb_parni( 1 ); + iIcon = hb_parni( 1 ); if ( iIcon > 3 ) { iIcon = 0 ; @@ -1059,7 +1059,7 @@ HB_FUNC( WVT_CREATEDIALOGMODAL ) int iIndex; int iResource = hb_parni( 4 ); HB_PTRDIFF iResult = 0; - HWND hParent = ISNIL( 5 ) ? _s->hWnd : ( HWND ) ( HB_PTRDIFF ) hb_parnint( 5 ); + HWND hParent = HB_ISNUM( 5 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 5 ) : _s->hWnd; /* check if we still have room for a new dialog */ for ( iIndex = 0; iIndex < WVT_DLGMD_MAX; iIndex++ ) @@ -1512,13 +1512,13 @@ HB_FUNC( WVT__GETOPENFILENAME ) ofn.hInstance = GetModuleHandle( NULL ) ; ofn.lStructSize = sizeof( ofn ); - ofn.hwndOwner = ISNIL(1) ? GetActiveWindow() : (HWND) ( HB_PTRDIFF ) hb_parnint( 1 ) ; + ofn.hwndOwner = HB_ISNUM( 1 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) : GetActiveWindow(); ofn.lpstrTitle = lpstrTitle; ofn.lpstrFilter = lpstrFilter; - ofn.Flags = ISNIL(5) ? OFN_SHOWHELP|OFN_NOCHANGEDIR : hb_parnl( 5 ) ; + ofn.Flags = HB_ISNUM( 5 ) ? hb_parnl( 5 ) : OFN_SHOWHELP|OFN_NOCHANGEDIR; ofn.lpstrInitialDir = lpstrInitialDir; ofn.lpstrDefExt = lpstrDefExt; - ofn.nFilterIndex = ISNIL(8) ? 0 : (int) hb_parni( 8 ); + ofn.nFilterIndex = hb_parni( 8 ); ofn.lpstrFile = lpFileName; ofn.nMaxFile = size; @@ -1559,10 +1559,10 @@ HB_FUNC( WVT__GETSAVEFILENAME ) ofn.hInstance = GetModuleHandle( NULL ); ofn.lStructSize = sizeof( ofn ); - ofn.hwndOwner = ISNIL (1) ? GetActiveWindow() : (HWND) ( HB_PTRDIFF ) hb_parnint( 1 ); + ofn.hwndOwner = HB_ISNUM( 1 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) : GetActiveWindow(); ofn.lpstrTitle = lpstrTitle; ofn.lpstrFilter = lpstrFilter; - ofn.Flags = (ISNIL (5) ? OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_NOCHANGEDIR : hb_parnl( 5 ) ); + ofn.Flags = ( HB_ISNUM( 5 ) ? hb_parnl( 5 ) : OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_NOCHANGEDIR ); ofn.lpstrInitialDir = lpstrInitialDir; ofn.lpstrDefExt = lpstrDefExt; ofn.nFilterIndex = hb_parni(8); diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 3eacaa979c..7facf058a6 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -141,9 +141,9 @@ HB_FUNC( WIN_SENDMESSAGE ) hb_retnl( ( ULONG ) SendMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( UINT ) hb_parni( 2 ), - ( ISNIL( 3 ) ? 0 : ( WPARAM ) hb_parnint( 3 ) ), + ( !HB_ISNUM( 3 ) ? 0 : ( WPARAM ) hb_parnint( 3 ) ), ( ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM ) ( LPSTR ) cText : - ( ISCHAR( 4 ) ? ( LPARAM )( LPSTR ) hb_parc( 4 ) : + ( HB_ISCHAR( 4 ) ? ( LPARAM )( LPSTR ) hb_parc( 4 ) : ( LPARAM ) hb_parnint( 4 ) ) ) ) ) ); @@ -339,11 +339,11 @@ HB_FUNC( WIN_GETDLGITEM ) HB_FUNC( WIN_MESSAGEBOX ) { - HWND hWnd = ISNIL( 1 ) ? GetActiveWindow() : ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ); + HWND hWnd = HB_ISNUM( 1 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) : GetActiveWindow(); LPTSTR lpMsg = HB_TCHAR_CONVTO( hb_parcx( 2 ) ); - LPTSTR lpTitle = HB_TCHAR_CONVTO( ISCHAR( 3 ) ? hb_parc( 3 ) : "Info" ); + LPTSTR lpTitle = HB_TCHAR_CONVTO( HB_ISCHAR( 3 ) ? hb_parc( 3 ) : "Info" ); - hb_retni( MessageBox( hWnd, lpMsg, lpTitle, ISNIL( 4 ) ? MB_OK : hb_parni( 4 ) ) ); + hb_retni( MessageBox( hWnd, lpMsg, lpTitle, HB_ISNUM( 4 ) ? hb_parni( 4 ) : MB_OK ) ); HB_TCHAR_FREE( lpTitle ); HB_TCHAR_FREE( lpMsg ); @@ -376,7 +376,7 @@ HB_FUNC( WIN_LOADICON ) { HICON hIcon; - if( ISNUM( 1 ) ) + if( HB_ISNUM( 1 ) ) { hIcon = LoadIcon( ( HINSTANCE ) wvg_hInstance(), MAKEINTRESOURCE( hb_parni( 1 ) ) ); } @@ -468,8 +468,8 @@ HB_FUNC( WIN_CREATEBRUSH ) LOGBRUSH lb = { 0,0,0 }; lb.lbStyle = hb_parni( 1 ); - lb.lbColor = ISNIL( 2 ) ? RGB( 0, 0, 0 ) : ( COLORREF ) hb_parnl( 2 ); - lb.lbHatch = ISNIL( 3 ) ? 0 : hb_parni( 3 ); + lb.lbColor = HB_ISNUM( 2 ) ? ( COLORREF ) hb_parnl( 2 ) : RGB( 0, 0, 0 ); + lb.lbHatch = hb_parni( 3 ); #if ! defined( HB_OS_WIN_CE ) hb_retnint( ( HB_PTRDIFF ) CreateBrushIndirect( &lb ) ); #else @@ -653,14 +653,14 @@ HB_FUNC( WIN_NOT ) HB_FUNC( WIN_TRACKPOPUPMENU ) { HMENU hMenu = ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 1 ); - UINT uFlags = ISNIL( 2 ) ? TPM_CENTERALIGN | TPM_RETURNCMD : hb_parnl( 2 ); - int x = ISNIL( 3 ) ? 0 : hb_parni( 3 ); - int y = ISNIL( 4 ) ? 0 : hb_parni( 4 ); - HWND hWnd = ISNIL( 5 ) ? GetActiveWindow() : ( HWND ) ( HB_PTRDIFF ) hb_parnint( 5 ); + UINT uFlags = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : TPM_CENTERALIGN | TPM_RETURNCMD; + int x = hb_parni( 3 ); + int y = hb_parni( 4 ); + HWND hWnd = HB_ISNUM( 5 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 5 ) : GetActiveWindow(); POINT xy = { 0,0 }; - if( ISNIL( 3 ) ) + if( !HB_ISNUM( 3 ) ) { GetCursorPos( &xy ); } @@ -685,10 +685,10 @@ HB_FUNC( WIN_CHOOSECOLOR ) crCustClr[ i ] = ( ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ); cc.lStructSize = sizeof( CHOOSECOLOR ); - cc.hwndOwner = ISNIL( 4 ) ? NULL : ( HWND ) ( HB_PTRDIFF ) hb_parnint( 4 ); - cc.rgbResult = ISNIL( 1 ) ? 0 : ( COLORREF ) hb_parnl( 1 ); + cc.hwndOwner = HB_ISNUM( 4 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 4 ) : NULL; + cc.rgbResult = ( COLORREF ) ( HB_ISNUM( 1 ) ? hb_parnl( 1 ) : 0 ); cc.lpCustColors = crCustClr; - cc.Flags = ( WORD ) ( ISNIL( 3 ) ? CC_ANYCOLOR | CC_RGBINIT | CC_FULLOPEN : hb_parnl( 3 ) ); + cc.Flags = ( WORD ) ( HB_ISNUM( 3 ) ? hb_parnl( 3 ) : CC_ANYCOLOR | CC_RGBINIT | CC_FULLOPEN ); if( ChooseColor( &cc ) ) hb_retnl( cc.rgbResult ); @@ -880,8 +880,8 @@ HB_FUNC( WIN_CREATEWINDOWEX ) hb_parni( 5 ), hb_parni( 6 ), hb_parni( 7 ), hb_parni( 8 ), ( HWND ) ( HB_PTRDIFF ) hb_parnint( 9 ), - ISNIL( 10 ) ? NULL : ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 10 ), - ISNIL( 11 ) ? ( HINSTANCE ) wvg_hInstance() : ( HINSTANCE ) ( HB_PTRDIFF ) hb_parnint( 11 ), + HB_ISNUM( 10 ) ? ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 10 ) : NULL, + HB_ISNUM( 11 ) ? ( HINSTANCE ) ( HB_PTRDIFF ) hb_parnint( 11 ) : ( HINSTANCE ) wvg_hInstance(), NULL ); HB_TCHAR_FREE( szClassName ); @@ -1303,7 +1303,7 @@ HB_FUNC( WVG_STATUSBARSETTEXT ) if( hWndSB && IsWindow( hWndSB ) ) { - int iPart = ISNUM( 2 ) ? hb_parni( 2 ) : 1; + int iPart = HB_ISNUM( 2 ) ? hb_parni( 2 ) : 1; TCHAR szText[ 1024 ]; int iFlags; TCHAR *szCaption; @@ -1577,7 +1577,7 @@ HB_FUNC( WVG_TREEVIEW_ADDITEM ) TVIS_OVERLAYMASK | TVIS_STATEIMAGEMASK | TVIS_USERMASK; tvis.item.state = 0; /* TVI_BOLD */ - tvis.hParent = ISNIL( 2 ) ? NULL : ( HTREEITEM ) wvg_parhandle( 2 ); + tvis.hParent = HB_ISNUM( 2 ) ? ( HTREEITEM ) wvg_parhandle( 2 ) : NULL; tvis.item.pszText = text; hb_retnint( ( HB_PTRDIFF ) TreeView_InsertItem( wvg_parhwnd( 1 ), &tvis ) ); @@ -1875,7 +1875,7 @@ HB_FUNC( WVG_CHOOSEFONT ) { HB_TCHAR_CPTO( lf.lfFaceName, hb_parcx( 3 ), sizeof( lf.lfFaceName ) - 1 ); } - if( ( ! ISNIL( 4 ) ) && hb_parnl( 4 ) ) + if( HB_ISNUM( 4 ) && hb_parnl( 4 ) ) { HDC hdc = GetDC( hWnd ); PointSize = -MulDiv( ( LONG ) hb_parnl( 4 ), GetDeviceCaps( hdc, LOGPIXELSY ), 72 ); @@ -2008,11 +2008,11 @@ HB_FUNC( WVG_FONTCREATE ) */ HB_FUNC( WVG_POINTSIZETOHEIGHT ) { - HDC hdc = ISNIL( 1 ) ? GetDC( GetDesktopWindow() ) : wvg_parhdc( 1 ); + HDC hdc = HB_ISNUM( 1 ) ? wvg_parhdc( 1 ) : GetDC( GetDesktopWindow() ); hb_retnl( ( LONG ) -MulDiv( ( LONG ) hb_parnl( 2 ), GetDeviceCaps( hdc, LOGPIXELSY ), 72 ) ); - if( ISNIL( 1 ) ) + if( !HB_ISNUM( 1 ) ) ReleaseDC( GetDesktopWindow(), hdc ); } @@ -2022,11 +2022,11 @@ HB_FUNC( WVG_POINTSIZETOHEIGHT ) */ HB_FUNC( WVG_HEIGHTTOPOINTSIZE ) { - HDC hdc = ISNIL( 1 ) ? GetDC( GetDesktopWindow() ) : wvg_parhdc( 1 ); + HDC hdc = HB_ISNUM( 1 ) ? wvg_parhdc( 1 ) : GetDC( GetDesktopWindow() ); hb_retnl( ( LONG ) -MulDiv( hb_parnl( 2 ), 72, GetDeviceCaps( hdc, LOGPIXELSY ) ) ); - if( ISNIL( 1 ) ) + if( !HB_ISNUM( 1 ) ) ReleaseDC( GetDesktopWindow(), hdc ); } @@ -2062,7 +2062,7 @@ HB_FUNC( WIN_SETLAYEREDWINDOWATTRIBUTES ) if( pfnLayered ) { HWND hWnd = wapi_par_HWND( 1 ); - COLORREF cr = ISNIL( 2 ) ? RGB( 255,255,255 ) : wapi_par_COLORREF( 2 ); + COLORREF cr = HB_ISNUM( 2 ) ? wapi_par_COLORREF( 2 ) : RGB( 255,255,255 ); SetWindowLong( hWnd, GWL_EXSTYLE, GetWindowLong( hWnd, GWL_EXSTYLE ) | WS_EX_LAYERED );