From 390543ea06c6d3478646ac3b5ea75be4ca16c14d Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 18 Jun 2009 16:26:30 +0000 Subject: [PATCH] 2009-06-18 18:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/gtwvg/wvgscrlb.prg * contrib/gtwvg/wvgclass.prg * contrib/gtwvg/wvgdlg.prg * contrib/gtwvg/wvgax.prg * contrib/gtwvg/wvgpaint.prg * contrib/gtwvg/wvgdarea.prg * contrib/gtwvg/wvgmle.prg * contrib/gtwvg/wvglistb.prg * contrib/gtwvg/wvgtoolb.prg * contrib/gtwvg/wvgpushb.prg * contrib/gtwvg/wvgsle.prg * contrib/gtwvg/wvgtreev.prg * contrib/gtwvg/wvgwin.c * contrib/gtwvg/tests/demoxbp.prg * contrib/gtwvg/tests/demowvg.prg * contrib/gtwvg/wvgcrt.prg * contrib/gtwvg/wvgwnd.prg * contrib/gtwvg/wvgutils.c * contrib/gtwvg/wvgdatar.prg * contrib/gtwvg/wvgradio.prg * contrib/gtwvg/wvgsysw.prg * contrib/gtwvg/wvgmenub.prg * contrib/gtwvg/wvgphdlr.prg * contrib/gtwvg/wvgbitmp.prg * contrib/gtwvg/wvgcheck.prg * contrib/gtwvg/wvgstatb.prg * contrib/gtwvg/wvgstatc.prg * contrib/gtwvg/wvgtabpg.prg * contrib/gtwvg/wvg3stat.prg * Reverted to r11403 for Pritpal. --- harbour/ChangeLog | 32 ++ harbour/contrib/gtwvg/Makefile | 2 +- harbour/contrib/gtwvg/gtwvg.c | 2 +- harbour/contrib/gtwvg/tests/demowvg.prg | 375 +++++++----------------- harbour/contrib/gtwvg/tests/demoxbp.prg | 16 +- harbour/contrib/gtwvg/wincallb.c | 14 +- harbour/contrib/gtwvg/wvg3stat.prg | 12 +- harbour/contrib/gtwvg/wvgax.prg | 10 +- harbour/contrib/gtwvg/wvgbitmp.prg | 6 +- harbour/contrib/gtwvg/wvgcheck.prg | 16 +- harbour/contrib/gtwvg/wvgclass.prg | 6 +- harbour/contrib/gtwvg/wvgcore.c | 16 +- harbour/contrib/gtwvg/wvgcrt.prg | 6 +- harbour/contrib/gtwvg/wvgcuig.c | 12 +- harbour/contrib/gtwvg/wvgdarea.prg | 4 +- harbour/contrib/gtwvg/wvgdatar.prg | 8 +- harbour/contrib/gtwvg/wvgdlg.prg | 10 +- harbour/contrib/gtwvg/wvglistb.prg | 14 +- harbour/contrib/gtwvg/wvgmenub.prg | 28 +- harbour/contrib/gtwvg/wvgmle.prg | 6 +- harbour/contrib/gtwvg/wvgpaint.prg | 20 +- harbour/contrib/gtwvg/wvgphdlr.prg | 6 +- harbour/contrib/gtwvg/wvgpushb.prg | 6 +- harbour/contrib/gtwvg/wvgradio.prg | 4 +- harbour/contrib/gtwvg/wvgscrlb.prg | 2 +- harbour/contrib/gtwvg/wvgsle.prg | 6 +- harbour/contrib/gtwvg/wvgstatb.prg | 6 +- harbour/contrib/gtwvg/wvgstatc.prg | 16 +- harbour/contrib/gtwvg/wvgsysw.prg | 38 +-- harbour/contrib/gtwvg/wvgtabpg.prg | 2 +- harbour/contrib/gtwvg/wvgtoolb.prg | 8 +- harbour/contrib/gtwvg/wvgtreev.prg | 8 +- harbour/contrib/gtwvg/wvgutils.c | 26 +- harbour/contrib/gtwvg/wvgwin.c | 252 ++++++++-------- harbour/contrib/gtwvg/wvgwnd.prg | 60 ++-- 35 files changed, 458 insertions(+), 597 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index febce1d2ea..915cd9fbe4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,38 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-18 18:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/gtwvg/wvgscrlb.prg + * contrib/gtwvg/wvgclass.prg + * contrib/gtwvg/wvgdlg.prg + * contrib/gtwvg/wvgax.prg + * contrib/gtwvg/wvgpaint.prg + * contrib/gtwvg/wvgdarea.prg + * contrib/gtwvg/wvgmle.prg + * contrib/gtwvg/wvglistb.prg + * contrib/gtwvg/wvgtoolb.prg + * contrib/gtwvg/wvgpushb.prg + * contrib/gtwvg/wvgsle.prg + * contrib/gtwvg/wvgtreev.prg + * contrib/gtwvg/wvgwin.c + * contrib/gtwvg/tests/demoxbp.prg + * contrib/gtwvg/tests/demowvg.prg + * contrib/gtwvg/wvgcrt.prg + * contrib/gtwvg/wvgwnd.prg + * contrib/gtwvg/wvgutils.c + * contrib/gtwvg/wvgdatar.prg + * contrib/gtwvg/wvgradio.prg + * contrib/gtwvg/wvgsysw.prg + * contrib/gtwvg/wvgmenub.prg + * contrib/gtwvg/wvgphdlr.prg + * contrib/gtwvg/wvgbitmp.prg + * contrib/gtwvg/wvgcheck.prg + * contrib/gtwvg/wvgstatb.prg + * contrib/gtwvg/wvgstatc.prg + * contrib/gtwvg/wvgtabpg.prg + * contrib/gtwvg/wvg3stat.prg + * Reverted to r11403 for Pritpal. + 2009-06-18 18:18 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg + Added -skip option support to .hbm files. diff --git a/harbour/contrib/gtwvg/Makefile b/harbour/contrib/gtwvg/Makefile index 7e5a90e422..9b75ac1f2a 100644 --- a/harbour/contrib/gtwvg/Makefile +++ b/harbour/contrib/gtwvg/Makefile @@ -17,7 +17,7 @@ endif ifeq ($(HB_COMPILER),msvc) HB_WITH_GTWVG=yes endif -ifeq ($(HB_COMPILER),watcom) +ifeq ($(HB_COMPILER),owatcom) HB_WITH_GTWVG=yes endif ifeq ($(HB_COMPILER),pocc) diff --git a/harbour/contrib/gtwvg/gtwvg.c b/harbour/contrib/gtwvg/gtwvg.c index e3338f921a..d50834a080 100644 --- a/harbour/contrib/gtwvg/gtwvg.c +++ b/harbour/contrib/gtwvg/gtwvg.c @@ -4531,7 +4531,7 @@ PHB_GTWVT hb_wvt_gtGetWVT( void ) HB_FUNC( HB_GTINFOEX ) { - if( HB_ISPOINTER( 1 ) && HB_ISNUM( 2 ) ) + if( ISPOINTER( 1 ) && ISNUM( 2 ) ) { PHB_GT pGT = hb_gt_ItemBase( hb_param( 1, HB_IT_ANY ) ); diff --git a/harbour/contrib/gtwvg/tests/demowvg.prg b/harbour/contrib/gtwvg/tests/demowvg.prg index e61221388b..3933715db2 100644 --- a/harbour/contrib/gtwvg/tests/demowvg.prg +++ b/harbour/contrib/gtwvg/tests/demowvg.prg @@ -25,12 +25,12 @@ //-------------------------------------------------------------------// //-------------------------------------------------------------------// -#include "inkey.ch" -#include "common.ch" -#include "wvtwin.ch" -#include "hbgtinfo.ch" -#include "hbgtwvg.ch" -#include "wvgparts.ch" +#include "inkey.ch" +#include "common.ch" +#include "wvtwin.ch" +#include "hbgtinfo.ch" +#include "hbgtwvg.ch" +#include "wvgparts.ch" REQUEST DbfCdx REQUEST DbfNtx @@ -805,29 +805,10 @@ FUNCTION WvtMyBrowse_X( oCrt ) cFileDbf := "test.dbf" cFileIndex := "test.z01" - SET EXCLUSIVE OFF - - #if 1 - USE ( cFileDbf ) NEW EXCLUSIVE VIA ( cRDD ) ALIAS 'TEST' - IF NetErr() - Alert( 'Cannot open in exclusive mode!' ) - ELSE - USE - ENDIF - #endif - - USE ( cFileDbf ) NEW SHARED VIA ( cRDD ) ALIAS 'TEST' + USE ( cFileDbf ) NEW SHARED VIA ( cRDD ) if NetErr() return nil - ENDIF - - #if 0 - do WHILE !dbRelease( 'TEST' ) - ENDDO - alert( 'Released' ) - RETURN nil - #endif - + endif if fLock() INDEX ON Test->FIRST TAG "001" TO ( cFileIndex ) INDEX ON Test->LAST TAG "002" TO ( cFileIndex ) @@ -2052,72 +2033,72 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) Switch ( nMsg ) case WM_TIMER - WVG_SetDlgItemText( hDlg, ID_EDT_TIME, Time() ) + Win_SetDlgItemText( hDlg, ID_EDT_TIME, Time() ) exit case WM_COMMAND do case case wParam == ID_CHK_SATIS - lClicked := ( WVG_IsDlgButtonChecked( hDlg,ID_CHK_SATIS ) == 1 ) - WVG_MessageBox( hDlg, iif( lClicked, "Satisfied", "UnSatisfied" ), "CheckBoxStatus" ) + lClicked := ( Win_IsDlgButtonChecked( hDlg,ID_CHK_SATIS ) == 1 ) + Win_MessageBox( hDlg, iif( lClicked, "Satisfied", "UnSatisfied" ), "CheckBoxStatus" ) case wParam == ID_RDO_XH - WVG_MessageBox( hDlg, "(x)Harbour", "Compiler" ) + Win_MessageBox( hDlg, "(x)Harbour", "Compiler" ) case wParam == ID_RDO_CLIP - WVG_MessageBox( hDlg, "Clipper", "Compiler" ) + Win_MessageBox( hDlg, "Clipper", "Compiler" ) case wParam == ID_RDO_XBASE - WVG_MessageBox( hDlg, "Xbase++", "Compiler" ) + Win_MessageBox( hDlg, "Xbase++", "Compiler" ) case wParam == ID_MNU_FILE - WVG_MessageBox( hDlg, "Execute Menu Action!", "File" ) + Win_MessageBox( hDlg, "Execute Menu Action!", "File" ) case wParam == ID_MNU_CONTROL - WVG_MessageBox( hDlg, "Controls are from Windows!", "Controls" ) + Win_MessageBox( hDlg, "Controls are from Windows!", "Controls" ) - case WVG_LoWord( wParam ) == ID_LST_LIST - if WVG_HiWord( wParam ) == LBN_SELCHANGE - nIndex := WVG_SendMessage( WVG_GetDlgItem( hDlg, ID_LST_LIST ), LB_GETCURSEL, 0, 0 ) + case Win_LoWord( wParam ) == ID_LST_LIST + if Win_HiWord( wParam ) == LBN_SELCHANGE + nIndex := Win_SendMessage( Win_GetDlgItem( hDlg, ID_LST_LIST ), LB_GETCURSEL, 0, 0 ) cPrompt := space( 20 ) - WVG_SendMessage( WVG_GetDlgItem( hDlg, ID_LST_LIST ), LB_GETTEXT, nIndex, @cPrompt ) - WVG_MessageBox( hDlg, cPrompt, "ListBox" ) + Win_SendMessage( Win_GetDlgItem( hDlg, ID_LST_LIST ), LB_GETTEXT, nIndex, @cPrompt ) + Win_MessageBox( hDlg, cPrompt, "ListBox" ) endif - case WVG_LoWord( wParam ) == ID_CMB_COMBO - if WVG_HiWord( wParam ) == CBN_SELCHANGE - nIndex := WVG_SendMessage( WVG_GetDlgItem( hDlg, ID_CMB_COMBO ), CB_GETCURSEL, 0, 0 ) + case Win_LoWord( wParam ) == ID_CMB_COMBO + if Win_HiWord( wParam ) == CBN_SELCHANGE + nIndex := Win_SendMessage( Win_GetDlgItem( hDlg, ID_CMB_COMBO ), CB_GETCURSEL, 0, 0 ) cPrompt := space( 20 ) - WVG_SendMessage( WVG_GetDlgItem( hDlg, ID_CMB_COMBO ), CB_GETLBTEXT, nIndex, @cPrompt ) - WVG_MessageBox( hDlg, cPrompt, "Combo Box" ) + Win_SendMessage( Win_GetDlgItem( hDlg, ID_CMB_COMBO ), CB_GETLBTEXT, nIndex, @cPrompt ) + Win_MessageBox( hDlg, cPrompt, "Combo Box" ) endif endcase exit case WM_CTLCOLOREDIT - if ( WVG_GetDlgItem( hDlg,ID_MLE ) == lParam ) - WVG_SetTextColor( wParam, RGB( 0,0,255 ) ) - WVG_SetBkColor( wParam, RGB( 255,255,200 ) ) + if ( Win_GetDlgItem( hDlg,ID_MLE ) == lParam ) + Win_SetTextColor( wParam, RGB( 0,0,255 ) ) + Win_SetBkColor( wParam, RGB( 255,255,200 ) ) return ( 1 ) - elseif ( WVG_GetDlgItem( hDlg,ID_EDT_TEXT ) == lParam ) - WVG_SetTextColor( wParam, RGB( 255,255,255 ) ) - WVG_SetBkColor( wParam, RGB( 10,200,45 ) ) + elseif ( Win_GetDlgItem( hDlg,ID_EDT_TEXT ) == lParam ) + Win_SetTextColor( wParam, RGB( 255,255,255 ) ) + Win_SetBkColor( wParam, RGB( 10,200,45 ) ) Return ( 1 ) endif exit case WM_CTLCOLORSTATIC - if ( WVG_GetDlgItem( hDlg,ID_STA_TEXT ) == lParam ) - WVG_SetTextColor( wParam, RGB( 255,255,255 ) ) + if ( Win_GetDlgItem( hDlg,ID_STA_TEXT ) == lParam ) + Win_SetTextColor( wParam, RGB( 255,255,255 ) ) Return ( 1 ) endif exit case WM_INITDIALOG - WVG_SetTimer( hDlg, 5001, 1000 ) // 1 sec + Win_SetTimer( hDlg, 5001, 1000 ) // 1 sec if empty( t_ahFonts ) if ( hFont := Wvt_CreateFont( "Times New Roman", 18 ) ) != 0 @@ -2126,28 +2107,28 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) endif if len( t_ahFonts ) > 0 - WVG_SendMessage( WVG_GetDlgItem( hDlg, ID_MLE ), WM_SETFONT, t_ahFonts[ 1 ], 0 ) + Win_SendMessage( Win_GetDlgItem( hDlg, ID_MLE ), WM_SETFONT, t_ahFonts[ 1 ], 0 ) endif if t_hIcon == nil - t_hIcon := WVG_LoadIcon( "vr_1.ico" ) + t_hIcon := Win_LoadIcon( "vr_1.ico" ) endif if t_hIcon != nil .or. t_hIcon != 0 - WVG_SendMessage( WVG_GetDlgItem( hDlg, ID_ICO_VOUCH ), STM_SETIMAGE, IMAGE_ICON, t_hIcon ) + Win_SendMessage( Win_GetDlgItem( hDlg, ID_ICO_VOUCH ), STM_SETIMAGE, IMAGE_ICON, t_hIcon ) endif /* if t_hImage == nil - t_hImage := WVG_LoadImage( "vouch1.bmp", 2 ) + t_hImage := Win_LoadImage( "vouch1.bmp", 2 ) endif if t_hImage != nil .and. t_hImage != 0 - WVG_SendMessage( WVG_GetDlgItem( hDlg, ID_STA_IMAGE ), STM_SETIMAGE, IMAGE_BITMAP, t_hImage ) + Win_SendMessage( Win_GetDlgItem( hDlg, ID_STA_IMAGE ), STM_SETIMAGE, IMAGE_BITMAP, t_hImage ) endif */ - WVG_SetDlgItemText( hDlg, ID_MLE , GetEditText() ) - WVG_CheckDlgButton( hDlg, ID_CHK_SATIS, .t. ) + Win_SetDlgItemText( hDlg, ID_MLE , GetEditText() ) + Win_CheckDlgButton( hDlg, ID_CHK_SATIS, .t. ) - WVG_CheckRadioButton( hDlg, ID_RDO_XH, ID_RDO_XBASE, ID_RDO_XH ) + Win_CheckRadioButton( hDlg, ID_RDO_XH, ID_RDO_XBASE, ID_RDO_XH ) Wvt_LBAddString( hDlg, ID_LST_LIST, "(x)Harbour" ) Wvt_LBAddString( hDlg, ID_LST_LIST, "Gtwvt" ) @@ -2166,7 +2147,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) Wvt_CBSetCurSel( hDlg, ID_CMB_COMBO, 1 ) - WVG_InvalidateRect( hDlg ) + Win_InvalidateRect( hDlg ) exit @@ -2174,7 +2155,7 @@ Function DynDlgProc_2( hDlg, nMsg, wParam, lParam ) // Do whatevert you want to do with cText // Each box will retrieve its own text. // - cText := WVG_GetDlgItemText( hDlg, ID_MLE ) + cText := Win_GetDlgItemText( hDlg, ID_MLE ) cText := nil exit @@ -2220,15 +2201,15 @@ EXIT PROCEDURE CleanHandles() LOCAL i for i := 1 to len( t_ahFonts ) - WVG_DeleteObject( t_ahFonts[ i ] ) + Win_DeleteObject( t_ahFonts[ i ] ) next if t_hIcon != nil - WVG_DeleteObject( t_hIcon ) + Win_DeleteObject( t_hIcon ) endif if t_hImage != nil - WVG_DeleteObject( t_hImage ) + Win_DeleteObject( t_hImage ) endif Return @@ -2283,14 +2264,14 @@ FUNCTION DlgSlideShowProc( hDlg, nMsg, wParam, lParam ) FUNCTION DrawSlide( hDlg, nSlide ) LOCAL hDC, aRect - hDC := WVG_GetDC( hDlg ) - aRect := WVG_GetClientRect( hDlg ) + hDC := Win_GetDC( hDlg ) + aRect := Win_GetClientRect( hDlg ) - WVG_Rectangle( hDC, aRect[ 1 ]+10, aRect[ 2 ]+10, aRect[ 3 ]-10, aRect[ 4 ]-10 ) - WVG_DrawImage( hDC, aRect[ 1 ]+10, aRect[ 2 ]+10, aRect[ 3 ] - aRect[ 1 ] -20, ; + Win_Rectangle( hDC, aRect[ 1 ]+10, aRect[ 2 ]+10, aRect[ 3 ]-10, aRect[ 4 ]-10 ) + Win_DrawImage( hDC, aRect[ 1 ]+10, aRect[ 2 ]+10, aRect[ 3 ] - aRect[ 1 ] -20, ; aRect[ 4 ] - aRect[ 2 ] - 20, t_aSlides[ nSlide ] ) - WVG_ReleaseDC( hDlg,hDC ) + Win_ReleaseDC( hDlg,hDC ) Return nil //----------------------------------------------------------------------// @@ -2308,7 +2289,7 @@ Static Function MyFunction( nMode ) tone( MUSIC_WAITON[1], 1 ) case nMode == 3 - WVG_MessageBox( , "Button clicked!" ) + Win_MessageBox( , "Button clicked!" ) case nMode == 101 // Charge Eval( {|| tone(523,2),tone(698,2),tone(880,2),tone(1046,4),tone(880,2),tone(1046,8) } ) @@ -2443,7 +2424,7 @@ Function ExecuteActiveX( nActiveX, xParam ) //--------------------------- StatusBar ---------------------------\\ oSBar := WvgStatusBar():new( oDA ):create( , , , , , .t. ) - oSBar:panelClick := {|oPanel| WVG_MessageBox( , oPanel:caption ) } + oSBar:panelClick := {|oPanel| Win_MessageBox( , oPanel:caption ) } oPanel := oSBar:getItem( 1 ) oPanel:caption := 'My Root Panel' oPanel1 := oSBar:addItem() @@ -2477,7 +2458,7 @@ Function ExecuteActiveX( nActiveX, xParam ) oRadio := WvgRadioButton():new( oStatic2,, { 10,10 }, { 100,15 } ) oRadio:caption := "Com 1" oRadio:selection := .T. - oRadio:selected := {|m1,m2,obj| m1:=m1, m2:=m2, WVG_MessageBox( , obj:caption + IF( obj:selection, '< S >', '< N >' ) ) } + oRadio:selected := {|m1,m2,obj| m1:=m1, m2:=m2, Win_MessageBox( , obj:caption + IF( obj:selection, '< S >', '< N >' ) ) } oRadio:create() oRadio := WvgRadioButton():new( oStatic2,, { 10,35 }, { 100,15 } ) @@ -2487,7 +2468,7 @@ Function ExecuteActiveX( nActiveX, xParam ) oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. ) oCheck:caption := 'Checkbox A' oCheck:create() - oCheck:selected := {|m1,m2,o| m1:=m1,m2:=m2, WVG_MessageBox( , IF( o:getData(), 'I am selected','I am not selected' ) ) } + oCheck:selected := {|m1,m2,o| m1:=m1,m2:=m2, Win_MessageBox( , IF( o:getData(), 'I am selected','I am not selected' ) ) } // Create first 3State button, passing the position to :create() oXbp := Wvg3State():new( oStatic2 ) @@ -2501,7 +2482,7 @@ Function ExecuteActiveX( nActiveX, xParam ) oXbp:caption := "3 State B" oXbp:create( oStatic2 ) // Determine current state using :getData() - oXbp:selected := {| m1,m2,oBtn | m1:=m1,m2:=m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) } + oXbp:selected := {| m1,m2,oBtn | m1:=m1,m2:=m2, Win_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) } // Create first SLE, specify position using :create() // On :typeOut set the focus to the second SLE @@ -2560,7 +2541,7 @@ Function ExecuteActiveX( nActiveX, xParam ) aadd( aParts, 'DataRef' ) aeval( aParts, {|e| oListBox:addItem( e ) } ) - oListBox:itemSelected := {|| WVG_MessageBox( , oListBox:getCurItem() ) } + oListBox:itemSelected := {|| Win_MessageBox( , oListBox:getCurItem() ) } oListBox:setData( 3 ) //--------------------------- PushButton --------------------------\\ @@ -2579,7 +2560,7 @@ Function ExecuteActiveX( nActiveX, xParam ) oTree:create() oTree:setColorBG( RGB( 120,15,240 ) ) oTree:setColorFG( RGB( 15,240,120 ) ) - oTree:itemSelected := {|oItem| IF( oItem <> NIL, WVG_MessageBox( , oItem:caption ), NIL ) } + oTree:itemSelected := {|oItem| IF( oItem <> NIL, Win_MessageBox( , oItem:caption ), NIL ) } oItem1 := oTree:rootItem:addItem( "First level A" ) @@ -2762,8 +2743,8 @@ STATIC FUNCTION BuildActiveXControl( nActiveX, oDA ) oCom:mapEvent( evBtnUp, {|nBtn| if( nBtn == 2, oCom:oParent:sendMessage( WM_CLOSE,0,0 ), NIL ) } ) case nActiveX == 3 - hb_gtInfo( HB_GTI_WINTITLE, 'file://C:\harbour\contrib\gtwvg\tests\myharu.pdf' ) - oCom:CLSID := 'file://C:\harbour\contrib\gtwvg\tests\myharu.pdf' + hb_gtInfo( HB_GTI_WINTITLE, 'file://' + hb_DirBase() + 'myharu.pdf' ) + oCom:CLSID := 'file://' + hb_DirBase() + 'myharu.pdf' oCom:mapEvent( 269, {|| QOut( ' E X P L O R E R - 2 6 9' ) } ) case nActiveX == 4 @@ -2793,7 +2774,7 @@ Static Function ExeActiveX( nActiveX, oCom, xParam ) // if nActiveX == 1 oCom:AddressBar := .t. - hb_gtInfo( HB_GTI_WINTITLE, IF( empty( xParam ), 'http://www.harbour.vouch.info', xParam ) ) + hb_gtInfo( HB_GTI_WINTITLE, IIF( empty( xParam ), 'http://www.harbour.vouch.info', xParam ) ) oCom:Navigate( IF( empty( xParam ), 'http://www.harbour.vouch.info', xParam ) ) elseif nActiveX == 4 @@ -2802,7 +2783,7 @@ Static Function ExeActiveX( nActiveX, oCom, xParam ) oCom:Draw2Clipboard() elseif nActiveX == 5 - oCom:loadMultiPage( 'c:\myharu.pdf', 2 ) + oCom:loadMultiPage( hb_DirBase() + 'myharu.pdf', 2 ) oCom:addGradientBorder( 10, RGB( 12,20,233 ), RGB( 100,255,20 ), 0 ) oCom:drawText( 10,10,'Vouch' ) //oCom:emboss( 3,0 ) @@ -3077,7 +3058,7 @@ FUNCTION demoxbp() //--------------------------- StatusBar ---------------------------\\ #if 0 oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .t. ) - oSBar:panelClick := {|oPanel| WVG_MessageBox( , oPanel:caption ) } + oSBar:panelClick := {|oPanel| Win_MessageBox( , oPanel:caption ) } oPanel := oSBar:getItem( 1 ) oPanel:caption := 'My Root Panel' oPanel1 := oSBar:addItem() @@ -3117,7 +3098,7 @@ FUNCTION demoxbp() oRadio := WvgRadioButton():new( oStatic2,, { 10,10 }, { 100,15 } ) oRadio:caption := "Com 1" oRadio:selection := .T. - oRadio:selected := {|m1,m2,obj| m1:=m1, m2:=m2, WVG_MessageBox( , obj:caption + IF( obj:selection, '< S >', '< N >' ) ) } + oRadio:selected := {|m1,m2,obj| m1:=m1, m2:=m2, Win_MessageBox( , obj:caption + IF( obj:selection, '< S >', '< N >' ) ) } oRadio:create() oRadio := WvgRadioButton():new( oStatic2,, { 10,35 }, { 100,15 } ) @@ -3127,7 +3108,7 @@ FUNCTION demoxbp() oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. ) oCheck:caption := 'Checkbox A' oCheck:create() - oCheck:selected := {|m1,m2,o| m1:=m1,m2:=m2, WVG_MessageBox( , IF( o:getData(), 'I am selected','I am not selected' ) ) } + oCheck:selected := {|m1,m2,o| m1:=m1,m2:=m2, Win_MessageBox( , IF( o:getData(), 'I am selected','I am not selected' ) ) } // Create first 3State button, passing the position to :create() oXbp := Wvg3State():new() @@ -3141,7 +3122,7 @@ FUNCTION demoxbp() oXbp:caption := "3 State B" oXbp:create( oStatic2 ) // Determine current state using :getData() - oXbp:selected := {| m1,m2,oBtn | m1:=m1,m2:=m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) } + oXbp:selected := {| m1,m2,oBtn | m1:=m1,m2:=m2, Win_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) } // Create first SLE, specify position using :create() // On :typeOut set the focus to the second SLE @@ -3207,7 +3188,7 @@ FUNCTION demoxbp() aadd( aParts, 'DataRef' ) aeval( aParts, {|e| oListBox:addItem( e ) } ) - oListBox:itemSelected := {|| WVG_MessageBox( , oListBox:getCurItem() ) } + oListBox:itemSelected := {|| Win_MessageBox( , oListBox:getCurItem() ) } oListBox:setData( 3 ) // show selected 'XbpToolBar' //--------------------------- PushButton --------------------------\\ @@ -3232,7 +3213,7 @@ FUNCTION demoxbp() oTree:create() oTree:setColorBG( RGB( 120,15,240 ) ) oTree:setColorFG( RGB( 15,240,120 ) ) - oTree:itemSelected := {|oItem| IF( oItem <> NIL, WVG_MessageBox( , oItem:caption ), NIL ) } + oTree:itemSelected := {|oItem| IF( oItem <> NIL, Win_MessageBox( , oItem:caption ), NIL ) } oItem1 := oTree:rootItem:addItem( "First level A" ) @@ -3408,15 +3389,15 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt ) oTBar:create() - oTBar:addItem( "New" , 'c:\harbour\contrib\gtwvg\tests\v_new.bmp' ) - oTBar:addItem( "Select" , 'c:\harbour\contrib\gtwvg\tests\v_selct1.bmp' ) + oTBar:addItem( "New" , hb_DirBase() + 'v_new.bmp' ) + oTBar:addItem( "Select" , hb_DirBase() + 'v_selct1.bmp' ) oTBar:addItem( ) - oTBar:addItem( "FontDlg" , 'c:\harbour\contrib\gtwvg\tests\v_calend.bmp' ) - oTBar:addItem( "Tools" , 'c:\harbour\contrib\gtwvg\tests\v_lock.bmp' ) - oTBar:addItem( "Index" , 'c:\harbour\contrib\gtwvg\tests\v_index.bmp' ) + oTBar:addItem( "FontDlg" , hb_DirBase() + 'v_calend.bmp' ) + oTBar:addItem( "Tools" , hb_DirBase() + 'v_lock.bmp' ) + oTBar:addItem( "Index" , hb_DirBase() + 'v_index.bmp' ) oTBar:addItem( ) - oTBar:addItem( "Show" , 'c:\harbour\contrib\gtwvg\tests\v_clclt.bmp' ) - oTBar:addItem( "Hide" , 'c:\harbour\contrib\gtwvg\tests\v_notes1.bmp' ) + oTBar:addItem( "Show" , hb_DirBase() + 'v_clclt.bmp' ) + oTBar:addItem( "Hide" , hb_DirBase() + 'v_notes1.bmp' ) RETURN oTBar //----------------------------------------------------------------------// @@ -3435,7 +3416,7 @@ Static Function MyFunctionXbp( nMode ) tone( MUSIC_WAITON[1], 1 ) case nMode == 3 - WVG_MessageBox( , "Button clicked!" ) + Win_MessageBox( , "Button clicked!" ) case nMode == 101 // Charge Eval( {|| tone(523,2),tone(698,2),tone(880,2),tone(1046,4),tone(880,2),tone(1046,8) } ) @@ -3467,7 +3448,7 @@ STATIC FUNCTION ExeFontDialog( oCrt ) oFontDlg:familyName := "Courier New" oFontDlg:strikeout := .T. oFontDlg:underscore := .f. - //oFontDlg:activateOk := {|| WVG_MessageBox( , 'activateOK Event Handelled in Windows!' ) } + //oFontDlg:activateOk := {|| Win_MessageBox( , 'activateOK Event Handelled in Windows!' ) } oFontDlg:nominalPointSize := 12 //oFontDlg:size := .f. @@ -3515,7 +3496,7 @@ FUNCTION demoxbp() //--------------------------- StatusBar ---------------------------\\ oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .t. ) - oSBar:panelClick := {|oPanel| WVG_MessageBox( , oPanel:caption ) } + oSBar:panelClick := {|oPanel| Win_MessageBox( , oPanel:caption ) } oPanel := oSBar:getItem( 1 ) oPanel:caption := 'My Root Panel' oPanel1 := oSBar:addItem() @@ -3564,7 +3545,7 @@ FUNCTION demoxbp() aadd( aParts, 'DataRef' ) aeval( aParts, {|e| oListBox:addItem( e ) } ) - oListBox:itemSelected := {|| WVG_MessageBox( , oListBox:getCurItem() ) } + oListBox:itemSelected := {|| Win_MessageBox( , oListBox:getCurItem() ) } oListBox:setData( 3 ) // show selected 'XbpToolBar' //--------------------------- PushButton --------------------------\\ @@ -3584,7 +3565,7 @@ FUNCTION demoxbp() oTree:create() oTree:setColorBG( RGB( 120,15,240 ) ) oTree:setColorFG( RGB( 15,240,120 ) ) - oTree:itemSelected := {|oItem| IF( oItem <> NIL, WVG_MessageBox( , oItem:caption ), NIL ) } + oTree:itemSelected := {|oItem| IF( oItem <> NIL, Win_MessageBox( , oItem:caption ), NIL ) } oItem1 := oTree:rootItem:addItem( "First level A" ) @@ -3615,7 +3596,6 @@ FUNCTION demoxbp() oCom := WvgHTMLViewer():New( oDA, , { 0, 0 }, { 100, 100 }, , .t. ) oCom:beforeNavigate := {|cURL, x, oHTML| x := x, oHTML := oHTML, oPanel:caption := cURL } oCom:statusTextChange := {|cText| oPanel:caption := cText } - oCom:mapEvent( 112, {|| oPanel:caption := ' E X P L O R E R - 2 6 9' } ) #endif oCom:create() oCom:Navigate( 'http://www.harbour.vouch.info' ) @@ -3648,7 +3628,7 @@ FUNCTION demoxbp() oRadio := WvgRadioButton():new( oStatic2,, { 10,10 }, { 100,15 } ) oRadio:caption := "Com 1" oRadio:selection := .T. - oRadio:selected := {|m1,m2,obj| m1:=m1, m2:=m2, WVG_MessageBox( , obj:caption + IF( obj:selection, '< S >', '< N >' ) ) } + oRadio:selected := {|m1,m2,obj| m1:=m1, m2:=m2, Win_MessageBox( , obj:caption + IF( obj:selection, '< S >', '< N >' ) ) } oRadio:create() oRadio := WvgRadioButton():new( oStatic2,, { 10,35 }, { 100,15 } ) @@ -3658,7 +3638,7 @@ FUNCTION demoxbp() oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. ) oCheck:caption := 'Checkbox A' oCheck:create() - oCheck:selected := {|m1,m2,o| m1:=m1,m2:=m2, WVG_MessageBox( , IF( o:getData(), 'I am selected','I am not selected' ) ) } + oCheck:selected := {|m1,m2,o| m1:=m1,m2:=m2, Win_MessageBox( , IF( o:getData(), 'I am selected','I am not selected' ) ) } // Create first 3State button, passing the position to :create() oXbp := Wvg3State():new() @@ -3672,7 +3652,7 @@ FUNCTION demoxbp() oXbp:caption := "3 State B" oXbp:create( oStatic2 ) // Determine current state using :getData() - oXbp:selected := {| m1,m2,oBtn | m1:=m1,m2:=m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) } + oXbp:selected := {| m1,m2,oBtn | m1:=m1,m2:=m2, Win_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) } // Create first SLE, specify position using :create() // On :typeOut set the focus to the second SLE @@ -3696,7 +3676,7 @@ FUNCTION demoxbp() oXbp:killInputFocus := { |x,y,oSLE| x:=x,y:=y, oSLE:getData(), oPanel:caption := "cVarB =" + cVarB } // Read file into LOCAL variable - cText := MemoRead( 'gtwvg.hbp' ) + cText := MemoRead( 'gtwvg.hbc' ) // Create MLE, specify position using :create() and // assign data code block accessing LOCAL variable oMLE := WvgMLE():new() @@ -3818,15 +3798,15 @@ STATIC FUNCTION ActiveXBuildToolBarXbp( oCrt ) oTBar:create() - oTBar:addItem( "New" , 'c:\harbour\contrib\gtwvg\tests\v_new.bmp' ) - oTBar:addItem( "Select" , 'c:\harbour\contrib\gtwvg\tests\v_selct1.bmp' ) + oTBar:addItem( "New" , hb_DirBase() + 'v_new.bmp' ) + oTBar:addItem( "Select" , hb_DirBase() + 'v_selct1.bmp' ) oTBar:addItem( ) - oTBar:addItem( "FontDlg" , 'c:\harbour\contrib\gtwvg\tests\v_calend.bmp' ) - oTBar:addItem( "Tools" , 'c:\harbour\contrib\gtwvg\tests\v_lock.bmp' ) - oTBar:addItem( "Index" , 'c:\harbour\contrib\gtwvg\tests\v_index.bmp' ) + oTBar:addItem( "FontDlg" , hb_DirBase() + 'v_calend.bmp' ) + oTBar:addItem( "Tools" , hb_DirBase() + 'v_lock.bmp' ) + oTBar:addItem( "Index" , hb_DirBase() + 'v_index.bmp' ) oTBar:addItem( ) - oTBar:addItem( "Show" , 'c:\harbour\contrib\gtwvg\tests\v_clclt.bmp' ) - oTBar:addItem( "Hide" , 'c:\harbour\contrib\gtwvg\tests\v_notes1.bmp' ) + oTBar:addItem( "Show" , hb_DirBase() + 'v_clclt.bmp' ) + oTBar:addItem( "Hide" , hb_DirBase() + 'v_notes1.bmp' ) RETURN oTBar @@ -3844,7 +3824,7 @@ Static Function MyFunctionXbp( nMode ) tone( MUSIC_WAITON[1], 1 ) case nMode == 3 - WVG_MessageBox( , "Button clicked!" ) + Win_MessageBox( , "Button clicked!" ) case nMode == 101 // Charge Eval( {|| tone(523,2),tone(698,2),tone(880,2),tone(1046,4),tone(880,2),tone(1046,8) } ) @@ -3876,7 +3856,7 @@ STATIC FUNCTION ExeFontDialogXbp( oCrt ) oFontDlg:familyName := "Courier New" oFontDlg:strikeout := .T. oFontDlg:underscore := .f. - //oFontDlg:activateOk := {|| WVG_MessageBox( , 'activateOK Event Handelled in Windows!' ) } + //oFontDlg:activateOk := {|| Win_MessageBox( , 'activateOK Event Handelled in Windows!' ) } oFontDlg:nominalPointSize := 12 //oFontDlg:size := .f. @@ -4033,9 +4013,9 @@ STATIC FUNCTION FetchText( nMode ) RETURN cText /*----------------------------------------------------------------------*/ #if 0 -#include 'memoedit.ch' -#include 'setcurs.ch' -#include 'inkey.ch' +#include "memoedit.ch" +#include "setcurs.ch" +#include "inkey.ch" Function Editmemo() Local cText := 'This is initial text' @@ -4063,17 +4043,17 @@ Function EditFunc( nMode, nRow, nCol ) DO CASE CASE nLoop == 1 // Set insert mode SetCursor( SC_SPECIAL1 ) -hb_ToOutDebug( 'nLoop %i %s', nLoop, 'ME_INIT:K_INS' ) +//hb_ToOutDebug( 'nLoop %i %s', nLoop, 'ME_INIT:K_INS' ) RETURN K_INS OTHERWISE -hb_ToOutDebug( 'nLoop %i %s', nLoop, 'ME_INIT:OTHERWISE' ) +//hb_ToOutDebug( 'nLoop %i %s', nLoop, 'ME_INIT:OTHERWISE' ) RETURN ME_DEFAULT ENDCASE CASE nMode == ME_IDLE -hb_ToOutDebug( 'nLoop %i %s', nLoop, 'ME_IDLE' ) +//hb_ToOutDebug( 'nLoop %i %s', nLoop, 'ME_IDLE' ) OTHERWISE IF nKey == K_INS @@ -4084,7 +4064,7 @@ hb_ToOutDebug( 'nLoop %i %s', nLoop, 'ME_IDLE' ) ENDIF ENDIF -hb_ToOutDebug( 'nLoop %i %s %i %i', nLoop, 'OTHERWISE', nKey, nMode ) +//hb_ToOutDebug( 'nLoop %i %s %i %i', nLoop, 'OTHERWISE', nKey, nMode ) ENDCASE @@ -4390,154 +4370,3 @@ FUNCTION Vou_CreateOCrt( nT, nL, nB, nR, cTitle, xIcon, lModal, lRowCols, lHidde RETURN oCrt /*----------------------------------------------------------------------*/ -/* - * - * Some More Solutions from my ERP Vouch - * - */ -/*----------------------------------------------------------------------*/ - -#define NTRIM( n ) ( ltrim( str( n ) ) ) - -function GetSome( msg, vrb, pass, pic, set_, wh, vl ) - Local screen, l, oWin, s, i, nMaxLen, nLenMsg, nLenVrb, vlen, pnt_, clr, r, nLen, oldCrt, oCrt - Local t := maxrow()-7 - Local b := maxrow()-3 - Local nLen1 := 1 - Local GetList := {} - Local dType := valtype(vrb) - - DEFAULT msg TO 'Please Enter Required Value' - DEFAULT wh TO {|| .t. } - DEFAULT vl TO {|| .t. } - DEFAULT pass TO .f. - DEFAULT pic TO if( dType == 'Y', 'Y', '@! ' ) - - nLen := len(msg) - nMaxLen := 80 - nLenMsg := len( msg ) - - do case - case dType == 'D' ; nLenVrb := 8 - case dType == 'N' ; nLenVrb := 17 // len(str(vrb)) - case dType == 'C' ; nLenVrb := len(vrb) - case dType == 'L' ; nLenVrb := 1 - endcase - - if nLenMsg + nLenVrb > nMaxLen // Only when vrb type c will be asked - nLenVrb := nMaxLen - nLenMsg - 7 - pic := substr(pic,1,1)+'S'+NTRIM(nLenVrb)+substr(pic,2) - endif - - pic := if( dType=='N', '@Z 999999999999.9999', if( !pass, pic, strtran( pic,'!','' ) ) ) - l := IF( maxcol() > nLenMsg+nLenVrb+6, ( ( maxcol()+1 - (nLenMsg + nLenVrb + 7 ) ) / 2 ), 0 ) - r := l + nLenMsg+nLenVrb + 6 - - oCrt := WvgCrt():new( , , { t,l }, { b-t, r-l }, , .t. ) - oCrt:lModal := .t. - oCrt:create() - hb_gtInfo( HB_GTI_ICONFILE, 'EXCLAIM' ) - hb_gtInfo( HB_GTI_WINTITLE, ' Info Required!' ) - SetColor( 'N/W' ) - CLS - - b -= t - r -= l - t := 0 - l := 0 - - if !pass - setcolor( 'GR+/B,N/GR*, , ,N/GR*' ) - else - setcolor( 'GR+/B,GR+/GR*, , ,N/GR*' ) - endif - - Wvg_BoxRecessed( t+2, l+3+nlenMsg+1, t+2, l+3+nlenMsg+nLenVrb ) - DispBox( t, l, b, r, ' ', 'N/B' ) - oCrt:refresh() - - if !pass - @ t+2, l+3 SAY msg GET vrb PICTURE pic WHEN eval(wh) VALID eval(vl) - setCursor(1) - else - @ t+2, l+3 SAY msg GET vrb PICTURE pic - SetCursor( 0 ) - endif - read - - oCrt:destroy() - - return vrb -//----------------------------------------------------------------------// -function GetRange( type, msg, dBgn, dEnd ) - local getlist := {} - local scr, nMsgRow, nGetRow, b, e,nColMsgB,nColMsgE, oCrt, oOCrt - local cBgn,cEnd,nGetCol1, nGetCol2, nLenGet, nLenWin - local cPic, nMsgCol1, nMsgCol2,nColFrom - LOCAL nT, nL, nB, nR - - DEFAULT type TO 'N' - DEFAULT msg TO if( type=='N', 'Required Range','Required Date Range' ) - - b := if( type == 'N', 0, if( dBgn==nil, date(), dBgn ) ) - e := if( type == 'N', 0, if( dEnd==nil, date(), dEnd ) ) - - cBgn := 'Begining ' + if( type == 'N', 'Value', 'Date' ) - cEnd := 'Ending ' + if( type == 'N', 'Value', 'Date' ) - nLenGet := if( type == 'N', 12, 8 ) - cPic := if( type == 'N', '@Z 99999999.999','' ) - - nLenWin := 2+len( cBgn ) + 1 + nLenGet + 2 + len( cEnd ) + 1 + nLenGet + 2 - nGetCol1 := 2+len( cBgn ) + 2 - nGetCol2 := nGetCol1 + nLenGet + 2 + len( cEnd ) - nMsgCol1 := 2 - nMsgCol2 := 2 + len( cBgn ) + 1 + nLenGet + 2 - nGetRow := 1 - - nColFrom := int( ( maxcol()-nLenWin )/2 ) - nMsgRow := 13 - nGetRow := 15 - - nGetCol1 := nColFrom+nGetCol1 ; nGetCol2 := nColFrom+nGetCol2 - nMsgCol1 := nColFrom+nMsgCol1+1 ; nMsgCol2 := nColFrom+nMsgCol2 - - nT := 12-1; nL := nColFrom; nB := 17-2; nR := nL + nLenWin+1 - - /* Create new modal dialog */ - B_CRT nT, nL, nB, nR TITLE msg MODAL INTO oCrt - - /* Realign coordinates */ - nT := 0; nL := 0; nB := maxrow(); nR := maxcol() - - nGetCol1 -= nColFrom - nGetCol2 -= nColFrom - nMsgCol1 -= nColFrom - nMsgCol2 -= nColFrom - nMsgRow -= 12+1 - nGetRow -= 12+1 - - DispBox( nT, nL, nB, nR, ' ', 'N/B' ) - SetColor( 'w+/bg,N/GR*,,,n/w*' ) - - Wvg_BoxRecessed( nGetRow, nGetCol1, nGetRow, nGetCol1+7 ) - Wvg_BoxRecessed( nGetRow, nGetCol2, nGetRow, nGetCol2+7 ) - - DispOutAt( nGetRow, nMsgCol1, cBgn, 'gr+/b' ) - DispOutAt( nGetRow, nMsgCol2, cEnd, 'gr+/b' ) - - SetCursor( 1 ) - - @ nGetRow,nGetCol1 GET b VALID !empty(b) PICTURE cPic - @ nGetRow,nGetCol2 GET e VALID e >= b PICTURE cPic - - read - - if LastKey() == K_ESC - b := if( type == 'N', 0, ctod( '' ) ) - e := b - endif - - oCrt:destroy() - - return { b, e } -/*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/gtwvg/tests/demoxbp.prg b/harbour/contrib/gtwvg/tests/demoxbp.prg index 924234db2c..91c8e987ba 100644 --- a/harbour/contrib/gtwvg/tests/demoxbp.prg +++ b/harbour/contrib/gtwvg/tests/demoxbp.prg @@ -53,7 +53,7 @@ FUNCTION Main() //--------------------------- StatusBar ---------------------------\\ oSBar := WvgStatusBar():new( oCrt ):create( , , , , , .t. ) - oSBar:panelClick := {|oPanel| WVG_MessageBox( , oPanel:caption ) } + oSBar:panelClick := {|oPanel| Win_MessageBox( , oPanel:caption ) } oPanel := oSBar:getItem( 1 ) oPanel:caption := 'My Root Panel' oPanel1 := oSBar:addItem() @@ -102,7 +102,7 @@ FUNCTION Main() aadd( aParts, 'DataRef' ) aeval( aParts, {|e| oListBox:addItem( e ) } ) - oListBox:itemSelected := {|| WVG_MessageBox( , oListBox:getCurItem() ) } + oListBox:itemSelected := {|| Win_MessageBox( , oListBox:getCurItem() ) } oListBox:setData( 3 ) // show selected 'XbpToolBar' //--------------------------- PushButton --------------------------\\ @@ -122,7 +122,7 @@ FUNCTION Main() oTree:create() oTree:setColorBG( RGB( 120,15,240 ) ) oTree:setColorFG( RGB( 15,240,120 ) ) - oTree:itemSelected := {|oItem| IF( oItem <> NIL, WVG_MessageBox( , oItem:caption ), NIL ) } + oTree:itemSelected := {|oItem| IF( oItem <> NIL, Win_MessageBox( , oItem:caption ), NIL ) } oItem1 := oTree:rootItem:addItem( "First level A" ) @@ -185,7 +185,7 @@ FUNCTION Main() oRadio := WvgRadioButton():new( oStatic2,, { 10,10 }, { 100,15 } ) oRadio:caption := "Com 1" oRadio:selection := .T. - oRadio:selected := {|m1,m2,obj| m1:=m1, m2:=m2, WVG_MessageBox( , obj:caption + IF( obj:selection, '< S >', '< N >' ) ) } + oRadio:selected := {|m1,m2,obj| m1:=m1, m2:=m2, Win_MessageBox( , obj:caption + IF( obj:selection, '< S >', '< N >' ) ) } oRadio:create() oRadio := WvgRadioButton():new( oStatic2,, { 10,35 }, { 100,15 } ) @@ -195,7 +195,7 @@ FUNCTION Main() oCheck := WvgCheckBox():New( oStatic2, , { 10,70 }, { 100,15 }, , .t. ) oCheck:caption := 'Checkbox A' oCheck:create() - oCheck:selected := {|m1,m2,o| m1:=m1,m2:=m2, WVG_MessageBox( , IF( o:getData(), 'I am selected','I am not selected' ) ) } + oCheck:selected := {|m1,m2,o| m1:=m1,m2:=m2, Win_MessageBox( , IF( o:getData(), 'I am selected','I am not selected' ) ) } // Create first 3State button, passing the position to :create() oXbp := Wvg3State():new() @@ -209,7 +209,7 @@ FUNCTION Main() oXbp:caption := "3 State B" oXbp:create( oStatic2 ) // Determine current state using :getData() - oXbp:selected := {| m1,m2,oBtn | m1:=m1,m2:=m2, WVG_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) } + oXbp:selected := {| m1,m2,oBtn | m1:=m1,m2:=m2, Win_MessageBox( , "3State B", aState[ oBtn:getData()+1 ] ) } // Create first SLE, specify position using :create() // On :typeOut set the focus to the second SLE @@ -383,7 +383,7 @@ Static Function MyFunctionXbp( nMode ) tone( MUSIC_WAITON[1], 1 ) case nMode == 3 - WVG_MessageBox( , "Button clicked!" ) + Win_MessageBox( , "Button clicked!" ) case nMode == 101 // Charge Eval( {|| tone(523,2),tone(698,2),tone(880,2),tone(1046,4),tone(880,2),tone(1046,8) } ) @@ -415,7 +415,7 @@ STATIC FUNCTION ExeFontDialog( oCrt ) oFontDlg:familyName := "Courier New" oFontDlg:strikeout := .T. oFontDlg:underscore := .f. - //oFontDlg:activateOk := {|| WVG_MessageBox( , 'activateOK Event Handelled in Windows!' ) } + //oFontDlg:activateOk := {|| Win_MessageBox( , 'activateOK Event Handelled in Windows!' ) } oFontDlg:nominalPointSize := 12 //oFontDlg:size := .f. diff --git a/harbour/contrib/gtwvg/wincallb.c b/harbour/contrib/gtwvg/wincallb.c index 51c4d811ec..654b8e8113 100644 --- a/harbour/contrib/gtwvg/wincallb.c +++ b/harbour/contrib/gtwvg/wincallb.c @@ -144,21 +144,21 @@ HB_FUNC( _ASCALLBACK ) int i, iParam; - if( HB_ISBLOCK( 1 ) ) + if( ISBLOCK( 1 ) ) { Callback.pDynSym = hb_dynsymGet( "EVAL" ); Callback.pSelf = hb_itemNew( hb_param( 1, HB_IT_BLOCK ) ); } else { - if( HB_ISOBJECT( 2 ) ) + if( ISOBJECT( 2 ) ) Callback.pSelf = hb_itemNew( hb_param( 2, HB_IT_OBJECT ) ); else Callback.pSelf = NULL; - if( HB_ISCHAR( 1 ) ) + if( ISCHAR( 1 ) ) Callback.pDynSym = hb_dynsymGet( hb_parc( 1 ) ); - else if( HB_ISPOINTER( 1 ) ) + else if( ISPOINTER( 1 ) ) Callback.pDynSym = ( ( PHB_SYMB ) hb_parptr( 1 ) )->pDynSym; else { @@ -175,8 +175,8 @@ HB_FUNC( _ASCALLBACK ) return; } - Callback.iFormalParams = HB_ISNUM( 3 ) ? hb_parni( 3 ) : 4 ; /* default to 4 formal parameters */ - Callback.bVoid = HB_ISLOG( 4 ) ? hb_parl ( 4 ) : FALSE; /* default to non-void function */ + Callback.iFormalParams = ISNUM( 3 ) ? hb_parni( 3 ) : 4 ; /* default to 4 formal parameters */ + Callback.bVoid = ISLOG( 4 ) ? hb_parl ( 4 ) : FALSE; /* default to non-void function */ Callback.iCargoParams = hb_pcount() - 4; Callback.pParams = ( PHB_ITEM * ) hb_xgrab( Callback.iCargoParams * sizeof( PHB_ITEM ) ); @@ -190,7 +190,7 @@ HB_FUNC( _ASCALLBACK ) /* debugging only */ /* to see what was generated */ - if ( HB_ISBYREF( 5 ) ) + if ( ISBYREF( 5 ) ) hb_storclen( ( char * ) pMem, 128, 5 ); } /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/gtwvg/wvg3stat.prg b/harbour/contrib/gtwvg/wvg3stat.prg index e1ab22502f..3b5613b22a 100644 --- a/harbour/contrib/gtwvg/wvg3stat.prg +++ b/harbour/contrib/gtwvg/wvg3stat.prg @@ -140,7 +140,7 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS Wvg3S ::show() ENDIF - ::editBuffer := WVG_Button_GetCheck( ::hWnd ) + ::editBuffer := Win_Button_GetCheck( ::hWnd ) RETURN Self @@ -154,7 +154,7 @@ METHOD handleEvent( nMessage, aNM ) CLASS Wvg3State CASE nMessage == HB_GTE_COMMAND IF aNM[ NMH_code ] == BN_CLICKED - ::editBuffer := WVG_Button_GetCheck( ::hWnd ) + ::editBuffer := Win_Button_GetCheck( ::hWnd ) IF hb_isBlock( ::sl_lbClick ) eval( ::sl_lbClick, ::editBuffer, NIL, self ) @@ -165,13 +165,13 @@ METHOD handleEvent( nMessage, aNM ) CLASS Wvg3State CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( aNM[ 1 ], ::clr_FG ) + Win_SetTextColor( aNM[ 1 ], ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ELSE - RETURN WVG_GetCurrentBrush( aNM[ 1 ] ) + RETURN Win_GetCurrentBrush( aNM[ 1 ] ) ENDIF ENDCASE @@ -202,7 +202,7 @@ METHOD setCaption( xCaption ) CLASS Wvg3State IF hb_isChar( xCaption ) ::caption := xCaption - WVG_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) + Win_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) ENDIF RETURN Self diff --git a/harbour/contrib/gtwvg/wvgax.prg b/harbour/contrib/gtwvg/wvgax.prg index 42971213a4..665a6e0de3 100644 --- a/harbour/contrib/gtwvg/wvgax.prg +++ b/harbour/contrib/gtwvg/wvgax.prg @@ -77,7 +77,7 @@ /*----------------------------------------------------------------------*/ -CLASS WvgActiveXControl FROM WIN_OleAuto, WvgWindow +CLASS WvgActiveXControl FROM win_OleAuto, WvgWindow DATA CLSID INIT "" DATA server INIT NIL @@ -165,7 +165,7 @@ METHOD Create( oParent, oOwner, aPos, aSize, aPresParams, lVisible, cCLSID, cLic Wvg_AxInit() - hWnd := Wvg_AxCreateWindow( WIN_N2P( ::hContainer ), ::CLSID, ::nID, ; + hWnd := Wvg_AxCreateWindow( Win_N2P( ::hContainer ), ::CLSID, ::nID, ; ::aPos[ 1 ], ::aPos[ 2 ], ::aSize[ 1 ], ::aSize[ 2 ], ; ::style, ::exStyle ) IF empty( hWnd ) @@ -180,7 +180,7 @@ METHOD Create( oParent, oOwner, aPos, aSize, aPresParams, lVisible, cCLSID, cLic Wvg_AxDoVerb( hWnd, -4 ) ::__hObj := hObj - ::hWnd := WIN_P2N( hWnd ) + ::hWnd := Win_P2N( hWnd ) ::oParent:addChild( SELF ) @@ -241,8 +241,8 @@ METHOD handleEvent( nEvent, aInfo ) CLASS WvgActiveXControl METHOD Destroy() CLASS WvgActiveXControl IF !empty( ::__hObj ) - IF WVG_IsWindow( ::hWnd ) - WVG_DestroyWindow( ::hWnd ) + IF Win_IsWindow( ::hWnd ) + Win_DestroyWindow( ::hWnd ) ENDIF IF ::nEventHandler == "AdviseEvents" diff --git a/harbour/contrib/gtwvg/wvgbitmp.prg b/harbour/contrib/gtwvg/wvgbitmp.prg index 7d5c1baedf..454e804747 100644 --- a/harbour/contrib/gtwvg/wvgbitmp.prg +++ b/harbour/contrib/gtwvg/wvgbitmp.prg @@ -125,7 +125,7 @@ METHOD new() CLASS WvgBitmap METHOD create( oPScompat ) CLASS WvgBitmap IF oPScompat == NIL - ::hDCComp := WVG_GetDC() + ::hDCComp := Win_GetDC() ::lDCToDestroy := .t. ELSE ::hDCComp := oPScompat:hDC @@ -138,10 +138,10 @@ METHOD create( oPScompat ) CLASS WvgBitmap METHOD destroy() CLASS WvgBitmap IF ::hBitmap <> nil - WVG_DeleteObject( ::hBitmap ) + Win_DeleteObject( ::hBitmap ) ENDIF IF ::lDCtoDestroy - WVG_ReleaseDC( ::hDCcompat ) + Win_ReleaseDC( ::hDCcompat ) ENDIF RETURN Self diff --git a/harbour/contrib/gtwvg/wvgcheck.prg b/harbour/contrib/gtwvg/wvgcheck.prg index 407bcd4300..235b29a1b5 100644 --- a/harbour/contrib/gtwvg/wvgcheck.prg +++ b/harbour/contrib/gtwvg/wvgcheck.prg @@ -95,8 +95,8 @@ CLASS WvgCheckBox INHERIT WvgWindow, DataRef METHOD destroy() #if 0 - METHOD editBuffer() INLINE ( WVG_Button_GetCheck( ::hWnd ) == BST_CHECKED ) - METHOD getData() INLINE ( WVG_Button_GetCheck( ::hWnd ) == BST_CHECKED ) + METHOD editBuffer() INLINE ( Win_Button_GetCheck( ::hWnd ) == BST_CHECKED ) + METHOD getData() INLINE ( Win_Button_GetCheck( ::hWnd ) == BST_CHECKED ) METHOD setData( lCheck ) INLINE ::sendMessage( BM_SETCHECK, IF( lCheck, BST_CHECKED, BST_UNCHECKED ), 0 ) #endif METHOD setCaption( cCaption ) @@ -141,7 +141,7 @@ METHOD create( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS WvgCh ::sendMessage( BM_SETCHECK, BST_CHECKED, 0 ) ENDIF - ::editBuffer := ( WVG_Button_GetCheck( ::hWnd ) == BST_CHECKED ) + ::editBuffer := ( Win_Button_GetCheck( ::hWnd ) == BST_CHECKED ) RETURN Self @@ -155,7 +155,7 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgCheckBox CASE nMessage == HB_GTE_COMMAND IF aNM[ NMH_code ] == BN_CLICKED - ::editBuffer := ( WVG_Button_GetCheck( ::hWnd ) == BST_CHECKED ) + ::editBuffer := ( Win_Button_GetCheck( ::hWnd ) == BST_CHECKED ) IF hb_isBlock( ::sl_lbClick ) eval( ::sl_lbClick, ::editBuffer, NIL, self ) @@ -166,13 +166,13 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgCheckBox CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( aNM[ 1 ], ::clr_FG ) + Win_SetTextColor( aNM[ 1 ], ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ELSE - RETURN WVG_GetCurrentBrush( aNM[ 1 ] ) + RETURN Win_GetCurrentBrush( aNM[ 1 ] ) ENDIF ENDCASE @@ -203,7 +203,7 @@ METHOD setCaption( xCaption ) CLASS WvgCheckBox IF hb_isChar( xCaption ) ::caption := xCaption - WVG_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) + Win_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) ENDIF RETURN Self diff --git a/harbour/contrib/gtwvg/wvgclass.prg b/harbour/contrib/gtwvg/wvgclass.prg index 34d479272e..88c30b2258 100644 --- a/harbour/contrib/gtwvg/wvgclass.prg +++ b/harbour/contrib/gtwvg/wvgclass.prg @@ -955,7 +955,7 @@ METHOD Create() CLASS WvtObject METHOD Destroy() CLASS WvtObject if ::hFont <> nil - WVG_DeleteObject( ::hFont ) + Win_DeleteObject( ::hFont ) ::hFont := nil endif @@ -1615,7 +1615,7 @@ METHOD Configure() CLASS WvtLabel ::nBackColorHoverOff := ::nBackColor if ::hFont <> 0 - WVG_DeleteObject( ::hFont ) + Win_DeleteObject( ::hFont ) endif ::hFont := Wvt_CreateFont( ::cFont, ::nFontHeight, ::nFontWidth, ::nFontWeight, ::lItalic,; @@ -2961,7 +2961,7 @@ METHOD Create() CLASS WvtBanner METHOD Destroy() CLASS WvtBanner - WVG_DeleteObject( ::oLabel:hFont ) + Win_DeleteObject( ::oLabel:hFont ) RETURN nil diff --git a/harbour/contrib/gtwvg/wvgcore.c b/harbour/contrib/gtwvg/wvgcore.c index 48d10910e2..967046b5bd 100644 --- a/harbour/contrib/gtwvg/wvgcore.c +++ b/harbour/contrib/gtwvg/wvgcore.c @@ -938,11 +938,11 @@ static COLORREF hb_wvt_BgColorParam( int iParam ) COLORREF color; - if( HB_ISNUM( iParam ) ) + if( ISNUM( iParam ) ) color = ( COLORREF ) hb_parnl( iParam ); else { - int iColor = HB_ISCHAR( iParam ) ? hb_gtColorToN( hb_parc( iParam ) ) : - 1; + int iColor = ISCHAR( iParam ) ? hb_gtColorToN( hb_parc( iParam ) ) : - 1; if( iColor == -1 ) iColor = hb_gtGetCurrColor(); color = _s->COLORS[ ( ( iColor >> 4 ) & 0x0f ) ]; @@ -959,11 +959,11 @@ static COLORREF hb_wvt_FgColorParam( int iParam ) COLORREF color; - if( HB_ISNUM( iParam ) ) + if( ISNUM( iParam ) ) color = ( COLORREF ) hb_parnl( iParam ); else { - int iColor = HB_ISCHAR( iParam ) ? hb_gtColorToN( hb_parc( iParam ) ) : - 1; + int iColor = ISCHAR( iParam ) ? hb_gtColorToN( hb_parc( iParam ) ) : - 1; if( iColor == -1 ) iColor = hb_gtGetCurrColor(); color = _s->COLORS[ ( ( iColor >> 4 ) & 0x0f ) ]; @@ -1182,7 +1182,7 @@ HB_FUNC( WVT_DRAWIMAGE ) iBottom = xy.y - 1 + hb_parni( 6,3 ); iRight = xy.x - 1 + hb_parni( 6,4 ); - if ( HB_ISNUM( 5 ) ) + if ( ISNUM( 5 ) ) { hb_wvt_gtRenderPicture( iLeft, iTop, ( iRight - iLeft ) + 1, ( iBottom - iTop ) + 1, _s->pGUI->iPicture[ hb_parni( 5 )-1 ] ); } @@ -1294,7 +1294,7 @@ HB_FUNC( WVT_DRAWOUTLINE ) hOldPenGUI = hOldPen = 0; - if ( HB_ISNUM( 5 ) ) + if ( ISNUM( 5 ) ) { hPen = CreatePen( hb_parni( 5 ), 0, ( !HB_ISNUM( 7 ) ? 0 : ( COLORREF ) hb_parnl( 7 ) ) ); if ( hPen ) @@ -1809,7 +1809,7 @@ HB_FUNC( WVT_DRAWBUTTON ) LOGBRUSH lb = { 0,0,0 }; HBRUSH hBrush; - BOOL bText = HB_ISCHAR( 5 ); + BOOL bText = ISCHAR( 5 ); 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 ) ; @@ -1938,7 +1938,7 @@ HB_FUNC( WVT_DRAWBUTTON ) int iImageWidth = ( iRight - iLeft + 1 - 8 ); int iImageHeight = ( iBottom - iTop + 1 - 8 - iTextHeight ); - if ( HB_ISNUM( 6 ) ) + if ( ISNUM( 6 ) ) { IPicture *iPicture = _s->pGUI->iPicture[ hb_parni( 6 ) - 1 ]; hb_wvt_gtRenderPicture( iLeft+4, iTop+4, iImageWidth, iImageHeight, iPicture ); diff --git a/harbour/contrib/gtwvg/wvgcrt.prg b/harbour/contrib/gtwvg/wvgcrt.prg index e6ea3e5496..8bfffc7657 100644 --- a/harbour/contrib/gtwvg/wvgcrt.prg +++ b/harbour/contrib/gtwvg/wvgcrt.prg @@ -453,10 +453,10 @@ METHOD enable() CLASS WvgCrt METHOD getFrameState() CLASS WvgCrt - IF WVG_IsIconic( ::hWnd ) + IF Win_IsIconic( ::hWnd ) RETURN WVGDLG_FRAMESTAT_MINIMIZED ENDIF - IF WVG_IsZoomed( ::hWnd ) + IF Win_IsZoomed( ::hWnd ) RETURN WVGDLG_FRAMESTAT_MAXIMIZED ENDIF @@ -651,7 +651,7 @@ METHOD toBack() CLASS WvgCrt /*----------------------------------------------------------------------*/ METHOD toFront() CLASS WvgCrt - RETURN WVG_SetWindowPosToTop( ::hWnd ) + RETURN Win_SetWindowPosToTop( ::hWnd ) /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/gtwvg/wvgcuig.c b/harbour/contrib/gtwvg/wvgcuig.c index 769179cf7a..cb92e8f03f 100644 --- a/harbour/contrib/gtwvg/wvgcuig.c +++ b/harbour/contrib/gtwvg/wvgcuig.c @@ -184,7 +184,7 @@ HB_FUNC( WVG_SETGOBJSTATE ) { iOState = gObj->iState; - if( HB_ISNUM( 2 ) ) + if( ISNUM( 2 ) ) { int iState = hb_parni( 2 ); if( iOState != iState && iState > 0 && iState <= 4 ) @@ -227,19 +227,19 @@ HB_FUNC( WVG_SETGOBJDATA ) case GOBJ_OBJDATA_TEXT: if( gObj->lpText ) HB_TCHAR_FREE( gObj->lpText ); - gObj->lpText = HB_TCHAR_CONVTO( HB_ISCHAR( 3 ) ? hb_parc( 3 ) : "" ); + gObj->lpText = HB_TCHAR_CONVTO( ISCHAR( 3 ) ? hb_parc( 3 ) : "" ); break; #if ! defined( HB_OS_WIN_CE ) case GOBJ_OBJDATA_PICTURE: - if( HB_ISNUM( 3 ) && hb_parni( 3 ) <= WVT_PICTURES_MAX ) + if( ISNUM( 3 ) && hb_parni( 3 ) <= WVT_PICTURES_MAX ) gObj->iPicture = pWVT->pGUI->iPicture[ hb_parni( 3 ) - 1 ]; break; case GOBJ_OBJDATA_IMAGE: { IPicture * iPicture = NULL; - if( HB_ISNUM( 3 ) ) + if( ISNUM( 3 ) ) { if( hb_parni( 3 ) <= WVT_PICTURES_MAX ) iPicture = pWVT->pGUI->iPicture[ hb_parni( 3 ) - 1 ]; @@ -1276,7 +1276,7 @@ static void hb_wvg_TextBox( PHB_GTWVT pWVT, PHB_GOBJS gObj, int iLeft, int iTop, HB_FUNC( WVG_PICTURE ) { #if ! defined( HB_OS_WIN_CE ) - if( HB_ISNUM( 6 ) && hb_parni( 6 ) <= WVT_PICTURES_MAX ) + if( ISNUM( 6 ) && hb_parni( 6 ) <= WVT_PICTURES_MAX ) { PHB_GTWVT pWVT = hb_wvt_gtGetWVT(); HB_GOBJS *gObj = hb_wvg_ObjectNew( pWVT ); @@ -1327,7 +1327,7 @@ HB_FUNC( WVG_IMAGE ) switch( iSource ) { case GOBJ_IMAGESOURCE_SLOT: - if( HB_ISNUM( 7 ) && hb_parni( 7 ) <= WVT_PICTURES_MAX ) + if( ISNUM( 7 ) && hb_parni( 7 ) <= WVT_PICTURES_MAX ) { iPicture = pWVT->pGUI->iPicture[ hb_parni( 7 ) - 1 ]; } diff --git a/harbour/contrib/gtwvg/wvgdarea.prg b/harbour/contrib/gtwvg/wvgdarea.prg index b1974f2611..056f0ea015 100644 --- a/harbour/contrib/gtwvg/wvgdarea.prg +++ b/harbour/contrib/gtwvg/wvgdarea.prg @@ -148,10 +148,10 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgDrawingArea hDC := aNM[ 1 ] IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( hDC, ::clr_FG ) + Win_SetTextColor( hDC, ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( hDC, 1 ) + Win_SetBkMode( hDC, 1 ) Wvg_FillRect( hDC, { 0,0,::currentSize()[1],::currentSize()[1]}, ::hBrushBG ) RETURN ( 0 ) diff --git a/harbour/contrib/gtwvg/wvgdatar.prg b/harbour/contrib/gtwvg/wvgdatar.prg index 39cf8a3206..c7f3086fc4 100644 --- a/harbour/contrib/gtwvg/wvgdatar.prg +++ b/harbour/contrib/gtwvg/wvgdatar.prg @@ -119,7 +119,7 @@ METHOD getData() CLASS DataRef DO CASE CASE ::className == "EDIT" - ::sl_editBuffer := WVG_GetMessageText( ::hWnd, WM_GETTEXT, ::bufferLength + 1 ) + ::sl_editBuffer := Win_GetMessageText( ::hWnd, WM_GETTEXT, ::bufferLength + 1 ) ENDCASE IF hb_isBlock( ::dataLink ) @@ -149,18 +149,18 @@ METHOD setData( xValue, mp2 ) CLASS DataRef CASE ::className == "LISTBOX" /* Single Selection */ IF !empty( ::sl_editBuffer ) - RETURN WVG_LbSetCurSel( ::hWnd, ::sl_editBuffer - 1 ) >= 0 + RETURN Win_LbSetCurSel( ::hWnd, ::sl_editBuffer - 1 ) >= 0 ENDIF RETURN .f. CASE ::className == "SysTreeView32" IF ::sl_editBuffer <> NIL .and. ::sl_editBuffer:hItem <> NIL - WVG_TreeView_SelectItem( ::hWnd, ::sl_editBuffer:hItem ) + Win_TreeView_SelectItem( ::hWnd, ::sl_editBuffer:hItem ) ENDIF CASE ::className == "EDIT" IF hb_isChar( ::sl_editBuffer ) - WVG_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::sl_editBuffer ) + Win_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::sl_editBuffer ) ENDIF CASE ::className == "SCROLLBAR" diff --git a/harbour/contrib/gtwvg/wvgdlg.prg b/harbour/contrib/gtwvg/wvgdlg.prg index faaff380fd..71e5fc86d1 100644 --- a/harbour/contrib/gtwvg/wvgdlg.prg +++ b/harbour/contrib/gtwvg/wvgdlg.prg @@ -95,9 +95,9 @@ CLASS WvgDialog FROM WvgWindow METHOD menuBar() METHOD setFrameState( nState ) METHOD getFrameState() - METHOD calcClientRect() INLINE ::aRect := WVG_GetClientRect( ::hWnd ), ; + METHOD calcClientRect() INLINE ::aRect := Win_GetClientRect( ::hWnd ), ; { 0, 0, ::aRect[ 3 ], ::aRect[ 4 ] } - METHOD calcFrameRect() INLINE ::aRect := WVG_GetWindowRect( ::hWnd ),; + METHOD calcFrameRect() INLINE ::aRect := Win_GetWindowRect( ::hWnd ),; { ::aRect[ 1 ], ::aRect[ 2 ], ; ::aRect[ 3 ]-::aRect[ 1 ], ::aRect[ 4 ]-::aRect[ 2 ] } ENDCLASS @@ -189,7 +189,7 @@ METHOD destroy() CLASS WvgDialog ENDIF IF !empty( ::hBrushBG ) - WVG_DeleteObject( ::hBrushBG ) + Win_DeleteObject( ::hBrushBG ) ENDIF ::pGT := NIL @@ -217,10 +217,10 @@ METHOD setFrameState( nState ) CLASS WvgDialog /*----------------------------------------------------------------------*/ METHOD getFrameState() CLASS WvgDialog - IF WVG_IsIconic( ::hWnd ) + IF Win_IsIconic( ::hWnd ) RETURN WVGDLG_FRAMESTAT_MINIMIZED ENDIF - IF WVG_IsZoomed( ::hWnd ) + IF Win_IsZoomed( ::hWnd ) RETURN WVGDLG_FRAMESTAT_MAXIMIZED ENDIF diff --git a/harbour/contrib/gtwvg/wvglistb.prg b/harbour/contrib/gtwvg/wvglistb.prg index c710b8b2df..db8c435a0f 100644 --- a/harbour/contrib/gtwvg/wvglistb.prg +++ b/harbour/contrib/gtwvg/wvglistb.prg @@ -105,12 +105,12 @@ CLASS WvgListBox INHERIT WvgWindow, DataRef METHOD setItemsHeight( nPixel ) INLINE ::sendMessage( LB_SETITEMHEIGHT, 0, nPixel ) METHOD setTopItem( nIndex ) INLINE ::sendMessage( LB_SETTOPINDEX, nIndex-1, 0 ) - METHOD addItem( cItem ) INLINE WVG_SendMessageText( ::hWnd, LB_ADDSTRING, 0, cItem ) + METHOD addItem( cItem ) INLINE Win_SendMessageText( ::hWnd, LB_ADDSTRING, 0, cItem ) METHOD clear() VIRTUAL METHOD delItem( nIndex ) INLINE ::sendMessage( LB_DELETESTRING, nIndex-1, 0 ) - METHOD getItem( nIndex ) INLINE WVG_LbGetText( ::hWnd, nIndex-1 ) + METHOD getItem( nIndex ) INLINE Win_LbGetText( ::hWnd, nIndex-1 ) METHOD getTabstops() VIRTUAL - METHOD insItem( nIndex, cItem ) INLINE WVG_SendMessageText( ::hWnd, LB_INSERTSTRING, nIndex-1, cItem ) + METHOD insItem( nIndex, cItem ) INLINE Win_SendMessageText( ::hWnd, LB_INSERTSTRING, nIndex-1, cItem ) METHOD setColumnWidth() VIRTUAL METHOD setItem( nIndex, cItem ) INLINE ::delItem( nIndex ), ::insItem( nIndex, cItem ) METHOD setTabstops() VIRTUAL @@ -195,7 +195,7 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgListBox CASE nMessage == HB_GTE_COMMAND IF aNM[ 1 ] == LBN_SELCHANGE - ::nCurSelected := WVG_LbGetCurSel( ::hWnd )+ 1 + ::nCurSelected := Win_LbGetCurSel( ::hWnd )+ 1 IF hb_isBlock( ::sl_itemMarked ) eval( ::sl_itemMarked, NIL, NIL, self ) @@ -215,13 +215,13 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgListBox CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( aNM[ 1 ], ::clr_FG ) + Win_SetTextColor( aNM[ 1 ], ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ELSE - RETURN WVG_GetCurrentBrush( aNM[ 1 ] ) + RETURN Win_GetCurrentBrush( aNM[ 1 ] ) ENDIF ENDCASE diff --git a/harbour/contrib/gtwvg/wvgmenub.prg b/harbour/contrib/gtwvg/wvgmenub.prg index f586586c8c..4449d435c6 100644 --- a/harbour/contrib/gtwvg/wvgmenub.prg +++ b/harbour/contrib/gtwvg/wvgmenub.prg @@ -164,7 +164,7 @@ METHOD create( oParent, aPresParams, lVisible ) CLASS wvgMenuBar ::wvgWindow:create( ::oParent, , , , ::aPresParams, ::visible ) - ::hMenu := WVG_CreateMenu() + ::hMenu := Win_CreateMenu() if ::hMenu <> 0 /* check for if the parent already has a menu @@ -173,14 +173,14 @@ METHOD create( oParent, aPresParams, lVisible ) CLASS wvgMenuBar */ /* finally set the menu */ #if 0 - WVG_SetMenu( ::oParent:getHWND(), ::hMenu ) + Win_SetMenu( ::oParent:getHWND(), ::hMenu ) #endif /* how to make menu invisible ? */ if ( ::visible ) #if 0 - WVG_ShowWindow( ::oParent:getHWND(), SW_MINIMIZE ) - WVG_ShowWindow( ::oParent:getHWND(), SW_NORMAL ) + Win_ShowWindow( ::oParent:getHWND(), SW_MINIMIZE ) + Win_ShowWindow( ::oParent:getHWND(), SW_NORMAL ) #endif endif @@ -210,7 +210,7 @@ METHOD destroy() CLASS wvgMenuBar IF !empty( ::hMenu ) ::DelAllItems() - IF ! WVG_DestroyMenu( ::hMenu ) + IF !Win_DestroyMenu( ::hMenu ) #if 0 Throw( ErrorNew( "wvtMenu", 1000, "wvtMenu:Destroy()", "Destroy menu FAILED", {},"wvt.prg" ) ) #endif @@ -244,7 +244,7 @@ METHOD delItem( nItemNum ) CLASS wvgMenuBar ::aMenuItems[ nItemNum,WVT_MENU_MENUOBJ ]:Destroy() ENDIF - IF ( lResult:= WVG_DeleteMenu( ::hMenu, nItemNum-1, MF_BYPOSITION ) ) /* Remember ZERO base */ + IF ( lResult:= Win_DeleteMenu( ::hMenu, nItemNum-1, MF_BYPOSITION ) ) /* Remember ZERO base */ ADEL( ::aMenuItems, nItemNum ) ASIZE( ::aMenuItems, LEN( ::aMenuItems ) - 1 ) ELSE @@ -310,15 +310,15 @@ METHOD addItem( aItem, p2, p3, p4 ) CLASS wvgMenuBar end aadd( ::aMenuItems, aItem ) - WVG_AppendMenu( ::hMenu, aItem[ 1 ], aItem[ 2 ], aItem[ 3 ] ) + Win_AppendMenu( ::hMenu, aItem[ 1 ], aItem[ 2 ], aItem[ 3 ] ) IF ++::nPass == 1 IF ::oParent:className $ "WVGCRT,WVGDIALOG" - WVG_SetMenu( ::oParent:getHWND(), ::hMenu ) + Win_SetMenu( ::oParent:getHWND(), ::hMenu ) ENDIF ELSE IF ::oParent:className $ "WVGCRT,WVGDIALOG" - WVG_DrawMenubar( ::oParent:getHWND() ) + Win_DrawMenubar( ::oParent:getHWND() ) ENDIF ENDIF @@ -378,7 +378,7 @@ METHOD checkItem( nItemNum, lCheck ) CLASS wvgMenuBar DEFAULT lCheck TO .T. IF !empty( ::hMenu ) .AND. !empty( nItemNum ) - nRet := WVG_CheckMenuItem( ::hMenu, nItemNum, MF_BYPOSITION + IF( lCheck, MF_CHECKED, MF_UNCHECKED ) ) + nRet := Win_CheckMenuItem( ::hMenu, nItemNum, MF_BYPOSITION + IF( lCheck, MF_CHECKED, MF_UNCHECKED ) ) ENDIF RETURN IF( nRet == -1, .F., .T. ) @@ -389,7 +389,7 @@ METHOD enableItem( nItemNum ) CLASS wvgMenuBar LOCAL lSuccess := .f. IF !empty( ::hMenu ) .AND. !empty( nItemNum ) - lSuccess := WVG_EnableMenuItem( ::hMenu, nItemNum-1, MF_BYPOSITION + MF_ENABLED ) + lSuccess := Win_EnableMenuItem( ::hMenu, nItemNum-1, MF_BYPOSITION + MF_ENABLED ) ENDIF RETURN ( lSuccess ) @@ -400,7 +400,7 @@ METHOD disableItem( nItemNum ) CLASS wvgMenuBar LOCAL lSuccess := .f. IF !empty( ::hMenu ) .AND. !empty( nItemNum ) - lSuccess := WVG_EnableMenuItem( ::hMenu, nItemNum-1, MF_BYPOSITION + MF_GRAYED ) + lSuccess := Win_EnableMenuItem( ::hMenu, nItemNum-1, MF_BYPOSITION + MF_GRAYED ) ENDIF RETURN ( lSuccess ) @@ -571,7 +571,7 @@ METHOD create( oParent, aPresParams, lVisible ) CLASS wvgMenu ::className := "POPUPMENU" - ::hMenu := WVG_CreatePopupMenu() + ::hMenu := Win_CreatePopupMenu() RETURN Self @@ -595,7 +595,7 @@ METHOD popUp( oXbp, aPos, nDefaultItem, nControl ) CLASS wvgMenu HB_SYMBOL_UNUSED( nDefaultItem ) HB_SYMBOL_UNUSED( nControl ) - nCmd := WVG_TrackPopupMenu( ::hMenu, TPM_LEFTALIGN + TPM_TOPALIGN + TPM_RETURNCMD, aPos[ 1 ], aPos[ 2 ], oXbp:hWnd ) + nCmd := Win_TrackPopupMenu( ::hMenu, TPM_LEFTALIGN + TPM_TOPALIGN + TPM_RETURNCMD, aPos[ 1 ], aPos[ 2 ], oXbp:hWnd ) aMenuItem := ::findMenuItemById( nCmd ) IF hb_isArray( aMenuItem ) .and. hb_isBlock( aMenuItem[ 2 ] ) diff --git a/harbour/contrib/gtwvg/wvgmle.prg b/harbour/contrib/gtwvg/wvgmle.prg index 0d56a35454..8ca9d99e99 100644 --- a/harbour/contrib/gtwvg/wvgmle.prg +++ b/harbour/contrib/gtwvg/wvgmle.prg @@ -225,13 +225,13 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgMLE CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( aNM[ 1 ], ::clr_FG ) + Win_SetTextColor( aNM[ 1 ], ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ELSE - RETURN WVG_GetCurrentBrush( aNM[ 1 ] ) + RETURN Win_GetCurrentBrush( aNM[ 1 ] ) ENDIF ENDCASE diff --git a/harbour/contrib/gtwvg/wvgpaint.prg b/harbour/contrib/gtwvg/wvgpaint.prg index ef00a4a69b..df8df146cf 100644 --- a/harbour/contrib/gtwvg/wvgpaint.prg +++ b/harbour/contrib/gtwvg/wvgpaint.prg @@ -275,9 +275,9 @@ FUNCTION Wvt_MakeDlgTemplate( nTop, nLeft, nRows, nCols, aOffSet, cTitle, nStyle DEFAULT aOffSet[ 3 ] TO 0 DEFAULT aOffSet[ 4 ] TO 0 - nBaseUnits := WVG_GetDialogBaseUnits() - nBaseUnitsX := WVG_LoWord( nBaseUnits ) - nBaseUnitsY := WVG_HiWord( nBaseUnits ) + nBaseUnits := Win_GetDialogBaseUnits() + nBaseUnitsX := Win_LoWord( nBaseUnits ) + nBaseUnitsY := Win_HiWord( nBaseUnits ) nW := aFont[ 7 ] * nCols + aOffSet[ 4 ] nH := aFont[ 6 ] * nRows + aOffSet[ 3 ] @@ -349,9 +349,9 @@ Function Wvt_AddDlgItem( aDlg, nTop, nLeft, nRows, nCols, aOffSet,; DEFAULT aOffSet[ 3 ] TO 0 DEFAULT aOffSet[ 4 ] TO 0 - nBaseUnits := WVG_GetDialogBaseUnits() - nBaseUnitsX := WVG_LoWord( nBaseUnits ) - nBaseUnitsY := WVG_HiWord( nBaseUnits ) + nBaseUnits := Win_GetDialogBaseUnits() + nBaseUnitsX := Win_LoWord( nBaseUnits ) + nBaseUnitsY := Win_HiWord( nBaseUnits ) aXY := Wvt_GetXYFromRowCol( nTop, nLeft ) nX := aXY[ 1 ] + aOffSet[ 2 ] @@ -414,12 +414,12 @@ Function Wvt_CreateDialog( acnDlg, lOnTop, cbDlgProc, ncIcon, nTimerTicks, hMenu endif if valtype( nTimerTicks ) == "N" - WVG_SetTimer( hDlg, 1001, nTimerTicks ) + Win_SetTimer( hDlg, 1001, nTimerTicks ) endif if hMenu <> nil - WVG_SetMenu( hDlg, hMenu ) + Win_SetMenu( hDlg, hMenu ) endif @@ -482,7 +482,7 @@ FUNCTION WVT_GetOpenFileName( hWnd, cPath, cTitle, aFilter, nFlags, cIniDir, cDe c += aFilter[n][1] + chr(0) + aFilter[n][2] + chr(0) NEXT ENDIF - if WVG_AND( nFlags,OFN_ALLOWMULTISELECT ) > 0 + if WIN_AND( nFlags,OFN_ALLOWMULTISELECT ) > 0 cFile := space( 32000 ) ELSE cFile := padr( trim( cPath ), 255, chr( 0 ) ) @@ -490,7 +490,7 @@ FUNCTION WVT_GetOpenFileName( hWnd, cPath, cTitle, aFilter, nFlags, cIniDir, cDe cRet := WVT__GetOpenFileName( hWnd, @cFile, cTitle, c, nFlags, cIniDir, cDefExt, @nIndex ) - if WVG_AND( nFlags,OFN_ALLOWMULTISELECT ) > 0 + if WIN_AND( nFlags,OFN_ALLOWMULTISELECT ) > 0 n := AT( CHR(0)+ CHR(0), cFile ) cFile := LEFT( cFile,n ) aFiles := {} diff --git a/harbour/contrib/gtwvg/wvgphdlr.prg b/harbour/contrib/gtwvg/wvgphdlr.prg index 4f06e3fb0f..914cc571d0 100644 --- a/harbour/contrib/gtwvg/wvgphdlr.prg +++ b/harbour/contrib/gtwvg/wvgphdlr.prg @@ -334,7 +334,7 @@ METHOD notifier( nEvent, xParams ) CLASS WvgPartHandler ENDIF CASE nEvent == HB_GTE_SETFOCUS - /* aeval( ::aChildren, {|o| WVG_InvalidateRect( o:hWnd ) } ) */ + /* aeval( ::aChildren, {|o| Win_InvalidateRect( o:hWnd ) } ) */ IF hb_isBlock( ::sl_setInputFocus ) eval( ::sl_setInputFocus, NIL, NIL, Self ) @@ -348,13 +348,13 @@ METHOD notifier( nEvent, xParams ) CLASS WvgPartHandler ::lHasInputFocus := .f. CASE nEvent == HB_GTE_PAINT - /* aeval( ::aChildren, {|o| WVG_InvalidateRect( o:hWnd ) } ) */ + /* aeval( ::aChildren, {|o| Win_InvalidateRect( o:hWnd ) } ) */ CASE nEvent == HB_GTE_GUIPARTS /* Eventally every window be checked if it falls within returned rectangle or not * then it will avoid a lot of flickering */ - aeval( ::aChildren, {|o| WVG_InvalidateRect( o:hWnd ) } ) + aeval( ::aChildren, {|o| Win_InvalidateRect( o:hWnd ) } ) CASE nEvent == HB_GTE_CLOSE IF hb_isBlock( ::close ) diff --git a/harbour/contrib/gtwvg/wvgpushb.prg b/harbour/contrib/gtwvg/wvgpushb.prg index dfa8cf9866..dece8a5a99 100644 --- a/harbour/contrib/gtwvg/wvgpushb.prg +++ b/harbour/contrib/gtwvg/wvgpushb.prg @@ -165,10 +165,10 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgPushButton CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( aNM[ 1 ], ::clr_FG ) + Win_SetTextColor( aNM[ 1 ], ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ENDIF @@ -202,7 +202,7 @@ METHOD setCaption( xCaption, cDll ) CLASS WvgPushButton IF hb_isChar( xCaption ) ::caption := xCaption - WVG_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) + Win_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) ENDIF RETURN Self diff --git a/harbour/contrib/gtwvg/wvgradio.prg b/harbour/contrib/gtwvg/wvgradio.prg index afc55db54c..6a66f9a003 100644 --- a/harbour/contrib/gtwvg/wvgradio.prg +++ b/harbour/contrib/gtwvg/wvgradio.prg @@ -148,7 +148,7 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgRadioButton CASE HB_GTE_COMMAND IF aNM[ NMH_code ] == BN_CLICKED - ::editBuffer := ( WVG_Button_GetCheck( ::hWnd ) == BST_CHECKED ) + ::editBuffer := ( Win_Button_GetCheck( ::hWnd ) == BST_CHECKED ) IF hb_isBlock( ::sl_lbClick ) eval( ::sl_lbClick, ::editBuffer, NIL, self ) @@ -185,7 +185,7 @@ METHOD setCaption( xCaption ) CLASS WvgRadioButton IF hb_isChar( xCaption ) ::caption := xCaption - WVG_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) + Win_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) ENDIF RETURN Self diff --git a/harbour/contrib/gtwvg/wvgscrlb.prg b/harbour/contrib/gtwvg/wvgscrlb.prg index 6594155643..ec32bcf660 100644 --- a/harbour/contrib/gtwvg/wvgscrlb.prg +++ b/harbour/contrib/gtwvg/wvgscrlb.prg @@ -206,7 +206,7 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgScrollBar CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ENDIF diff --git a/harbour/contrib/gtwvg/wvgsle.prg b/harbour/contrib/gtwvg/wvgsle.prg index b9b8b2a14a..3a60c231b8 100644 --- a/harbour/contrib/gtwvg/wvgsle.prg +++ b/harbour/contrib/gtwvg/wvgsle.prg @@ -210,13 +210,13 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgSLE CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( aNM[ 1 ], ::clr_FG ) + Win_SetTextColor( aNM[ 1 ], ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ELSE - RETURN WVG_GetCurrentBrush( aNM[ 1 ] ) + RETURN Win_GetCurrentBrush( aNM[ 1 ] ) ENDIF ENDCASE diff --git a/harbour/contrib/gtwvg/wvgstatb.prg b/harbour/contrib/gtwvg/wvgstatb.prg index 40f7edd456..e3f9c16455 100644 --- a/harbour/contrib/gtwvg/wvgstatb.prg +++ b/harbour/contrib/gtwvg/wvgstatb.prg @@ -184,13 +184,13 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgStatusBar CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( aNM[ 1 ], ::clr_FG ) + Win_SetTextColor( aNM[ 1 ], ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ELSE - RETURN WVG_GetCurrentBrush( aNM[ 1 ] ) + RETURN Win_GetCurrentBrush( aNM[ 1 ] ) ENDIF ENDCASE diff --git a/harbour/contrib/gtwvg/wvgstatc.prg b/harbour/contrib/gtwvg/wvgstatc.prg index 73738096d1..226b3f8442 100644 --- a/harbour/contrib/gtwvg/wvgstatc.prg +++ b/harbour/contrib/gtwvg/wvgstatc.prg @@ -260,13 +260,13 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgStatic CASE nMessage == HB_GTE_CTLCOLOR IF hb_isNumeric( ::clr_FG ) - WVG_SetTextColor( aNM[ 1 ], ::clr_FG ) + Win_SetTextColor( aNM[ 1 ], ::clr_FG ) ENDIF IF hb_isNumeric( ::hBrushBG ) - WVG_SetBkMode( aNM[ 1 ], 1 ) + Win_SetBkMode( aNM[ 1 ], 1 ) RETURN ( ::hBrushBG ) ELSE - RETURN WVG_GetCurrentBrush( aNM[ 1 ] ) + RETURN Win_GetCurrentBrush( aNM[ 1 ] ) ENDIF ENDCASE @@ -280,7 +280,7 @@ METHOD destroy() CLASS WvgStatic hb_ToOutDebug( " %s:destroy()", __objGetClsName() ) IF ::hBitmap <> nil - WVG_DeleteObject( ::hBitmap ) + Win_DeleteObject( ::hBitmap ) ENDIF ::wvgWindow:destroy() @@ -306,16 +306,16 @@ METHOD setCaption( xCaption, cDll ) DO CASE CASE ::type == WVGSTATIC_TYPE_TEXT - WVG_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) + Win_SendMessageText( ::hWnd, WM_SETTEXT, 0, ::caption ) CASE ::type == WVGSTATIC_TYPE_BITMAP IF ::hBitmap <> nil - WVG_DeleteObject( ::hBitmap ) + Win_DeleteObject( ::hBitmap ) ENDIF - ::hBitmap := WVG_LoadImage( ::caption, IF( hb_isNUmeric( ::caption ), 1, 2 ) ) + ::hBitmap := Win_LoadImage( ::caption, IF( hb_isNUmeric( ::caption ), 1, 2 ) ) - WVG_SendMessage( ::hWnd, STM_SETIMAGE, IMAGE_BITMAP, ::hBitmap ) + Win_SendMessage( ::hWnd, STM_SETIMAGE, IMAGE_BITMAP, ::hBitmap ) ENDCASE diff --git a/harbour/contrib/gtwvg/wvgsysw.prg b/harbour/contrib/gtwvg/wvgsysw.prg index 607f79f913..6913933ce1 100644 --- a/harbour/contrib/gtwvg/wvgsysw.prg +++ b/harbour/contrib/gtwvg/wvgsysw.prg @@ -188,7 +188,7 @@ METHOD show() CLASS WvgSysWindow METHOD setPos( aPos ) CLASS WvgSysWindow - WVG_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .f. ) + Win_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .f. ) RETURN Self @@ -197,7 +197,7 @@ METHOD setPos( aPos ) CLASS WvgSysWindow METHOD currentPos() CLASS WvgSysWindow LOCAL aRect - aRect := WVG_GetWindowRect( ::hWnd ) + aRect := Win_GetWindowRect( ::hWnd ) RETURN { aRect[ 1 ], aRect[ 2 ] } @@ -206,7 +206,7 @@ METHOD currentPos() CLASS WvgSysWindow METHOD currentSize() CLASS WvgSysWindow LOCAL aRect - aRect := WVG_GetClientRect( ::hWnd ) + aRect := Win_GetClientRect( ::hWnd ) RETURN { aRect[ 3 ] - aRect[ 1 ], aRect[ 4 ] - aRect[ 2 ] } @@ -355,43 +355,43 @@ METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog ::hWnd := hWnd IF !empty( ::title ) - WVG_setWindowText( ::hWnd, ::title ) + Win_setWindowText( ::hWnd, ::title ) ENDIF IF !( ::buttonCancel ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,IDCANCEL ), .f. ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,IDCANCEL ), .f. ) ENDIF IF !( ::buttonApply ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1026 ), .f. ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1026 ), .f. ) ENDIF IF !( ::buttonHelp ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1038 ), .f. ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1038 ), .f. ) ENDIF IF !( ::strikeOut ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1040 ), .f. ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1040 ), .f. ) ENDIF IF !( ::underscore ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1041 ), .f. ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1041 ), .f. ) ENDIF IF !( ::name ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1136 ), .f. ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1136 ), .f. ) ENDIF IF !( ::style ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1137 ), .f. ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1137 ), .f. ) ENDIF IF !( ::size ) - WVG_EnableWindow( WVG_GetDlgItem( ::hWnd,1138 ), .f. ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1138 ), .f. ) ENDIF IF ::aPos[ 1 ] > 0 .OR. ::aPos[ 2 ] > 0 - aRect := WVG_GetWindowRect( ::hWnd ) - WVG_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[3]-aRect[1], aRect[4]-aRect[2], .f. ) + aRect := Win_GetWindowRect( ::hWnd ) + Win_MoveWindow( ::hWnd, ::aPos[ 1 ], ::aPos[ 2 ], aRect[3]-aRect[1], aRect[4]-aRect[2], .f. ) ENDIF RETURN 1 CASE nMessage == WM_COMMAND - nL := WVG_LoWord( nwParam ) - nH := WVG_HiWord( nwParam ) + nL := Win_LoWord( nwParam ) + nH := Win_HiWord( nwParam ) HB_SYMBOL_UNUSED( nH ) @@ -429,7 +429,7 @@ METHOD display( nMode ) CLASS WvgFontDialog IF nMode == 0 hWnd := ::oParent:hWnd ELSE - hWnd := WVG_GetDesktopWindow() + hWnd := Win_GetDesktopWindow() ENDIF ::ok := .f. @@ -573,7 +573,7 @@ METHOD configure( cFontName ) CLASS WvgFont METHOD destroy() CLASS WvgFont IF ::hFont <> NIL - WVG_DeleteObject( ::hFont ) + Win_DeleteObject( ::hFont ) ENDIF RETURN Self @@ -591,7 +591,7 @@ METHOD createFont() CLASS WvgFont LOCAL aFont IF ::hFont <> NIL - WVG_DeleteObject( ::hFont ) + Win_DeleteObject( ::hFont ) ::hFont := NIL ENDIF diff --git a/harbour/contrib/gtwvg/wvgtabpg.prg b/harbour/contrib/gtwvg/wvgtabpg.prg index 4aac618c63..c37b6587ba 100644 --- a/harbour/contrib/gtwvg/wvgtabpg.prg +++ b/harbour/contrib/gtwvg/wvgtabpg.prg @@ -185,7 +185,7 @@ METHOD handleEvent( nMessage, aNM ) CLASS WvgTabPage ENDCASE CASE nMessage == HB_GTE_CTLCOLOR - RETURN WVG_GetStockObject( NULL_BRUSH ) + RETURN Win_GetStockObject( NULL_BRUSH ) ENDCASE diff --git a/harbour/contrib/gtwvg/wvgtoolb.prg b/harbour/contrib/gtwvg/wvgtoolb.prg index e239353b24..9f6c982bd9 100644 --- a/harbour/contrib/gtwvg/wvgtoolb.prg +++ b/harbour/contrib/gtwvg/wvgtoolb.prg @@ -264,13 +264,13 @@ METHOD destroy() CLASS WvgToolBar IF ( nItems := Len( ::aItems ) ) > 0 FOR i := 1 TO nItems IF ::aItems[ i,2 ]:image <> NIL - WVG_DeleteObject( ::aItems[ i,2 ]:image ) + Win_DeleteObject( ::aItems[ i,2 ]:image ) ENDIF IF ::aItems[ i,2 ]:disabledImage <> NIL - WVG_DeleteObject( ::aItems[ i,2 ]:disabledImage ) + Win_DeleteObject( ::aItems[ i,2 ]:disabledImage ) ENDIF IF ::aItems[ i,2 ]:hotImage <> NIL - WVG_DeleteObject( ::aItems[ i,2 ]:hotImage ) + Win_DeleteObject( ::aItems[ i,2 ]:hotImage ) ENDIF NEXT ENDIF @@ -295,7 +295,7 @@ METHOD configure( oParent, oOwner, aPos, aSize, aPresParams, lVisible ) CLASS Wv METHOD sendToolbarMessage( nMsg, p1, p2 ) CLASS WvgToolBar - RETURN WVG_SendToolbarMessage( ::pWnd, nMsg, p1, p2 ) + RETURN Win_SendToolbarMessage( ::pWnd, nMsg, p1, p2 ) /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/gtwvg/wvgtreev.prg b/harbour/contrib/gtwvg/wvgtreev.prg index 9ecbe037ee..510e81416c 100644 --- a/harbour/contrib/gtwvg/wvgtreev.prg +++ b/harbour/contrib/gtwvg/wvgtreev.prg @@ -118,9 +118,9 @@ CLASS WvgTreeView INHERIT WvgWindow, DataRef DATA textParentSelected INIT "" DATA textItemSelected INIT "" - METHOD setColorFG( nRGB ) INLINE WVG_TreeView_SetTextColor( ::hWnd, nRGB ) - METHOD setColorBG( nRGB ) INLINE WVG_TreeView_SetBkColor( ::hWnd, nRGB ) - METHOD setColorLines( nRGB ) INLINE WVG_TreeView_SetLineColor( ::hWnd, nRGB ) + METHOD setColorFG( nRGB ) INLINE Win_TreeView_SetTextColor( ::hWnd, nRGB ) + METHOD setColorBG( nRGB ) INLINE Win_TreeView_SetBkColor( ::hWnd, nRGB ) + METHOD setColorLines( nRGB ) INLINE Win_TreeView_SetLineColor( ::hWnd, nRGB ) METHOD handleEvent( nMessage, aInfo ) @@ -332,7 +332,7 @@ CLASS WvgTreeViewItem METHOD configure() METHOD destroy() - METHOD expand( lExpand ) INLINE WVG_TreeView_Expand( ::hTree, ::hItem, ; + METHOD expand( lExpand ) INLINE Win_TreeView_Expand( ::hTree, ::hItem, ; IF( hb_isLogical( lExpand ), lExpand, .t. ) ) METHOD isExpanded() METHOD setCaption( cCaption ) diff --git a/harbour/contrib/gtwvg/wvgutils.c b/harbour/contrib/gtwvg/wvgutils.c index 5415c1161d..31effa772f 100644 --- a/harbour/contrib/gtwvg/wvgutils.c +++ b/harbour/contrib/gtwvg/wvgutils.c @@ -373,7 +373,7 @@ HB_FUNC( WVT_SETTOOLTIPWIDTH ) int iTipWidth = ( int ) SendMessage( _s->hWndTT, TTM_GETMAXTIPWIDTH, 0, 0 ); - if ( HB_ISNUM( 1 ) ) + if ( ISNUM( 1 ) ) { SendMessage( _s->hWndTT, TTM_SETMAXTIPWIDTH, 0, ( LPARAM ) ( HB_PTRDIFF ) hb_parnint( 1 ) ); } @@ -391,7 +391,7 @@ HB_FUNC( WVT_SETTOOLTIPBKCOLOR ) COLORREF cr = ( COLORREF ) SendMessage( _s->hWndTT, TTM_GETTIPBKCOLOR, 0, 0 ); - if ( HB_ISNUM( 1 ) ) + if ( ISNUM( 1 ) ) { SendMessage( _s->hWndTT, TTM_SETTIPBKCOLOR, ( WPARAM ) ( COLORREF ) hb_parnl( 1 ), 0 ); } @@ -408,7 +408,7 @@ HB_FUNC( WVT_SETTOOLTIPTEXTCOLOR ) COLORREF cr = ( COLORREF ) SendMessage( _s->hWndTT, TTM_GETTIPTEXTCOLOR, 0, 0 ); - if ( HB_ISNUM( 1 ) ) + if ( ISNUM( 1 ) ) { SendMessage( _s->hWndTT, TTM_SETTIPTEXTCOLOR, ( WPARAM ) ( COLORREF ) hb_parnl( 1 ), 0 ); } @@ -481,7 +481,7 @@ HB_FUNC( WVT_SETGUI ) BOOL bGui = _s->bGui; - if ( HB_ISLOG( 1 ) ) + if ( ISLOG( 1 ) ) { _s->bGui = hb_parl( 1 ); } @@ -621,7 +621,7 @@ HB_FUNC( WVT_SETMOUSEMOVE ) BOOL bMouseMove = _s->MouseMove; - if( HB_ISLOG( 1 ) ) + if( ISLOG( 1 ) ) _s->MouseMove = hb_parl( 1 ); hb_retl( bMouseMove ); @@ -730,11 +730,11 @@ HB_FUNC( WVT_CREATEPOPUPMENU ) /*----------------------------------------------------------------------*/ -HB_FUNC_EXTERN( WVG_APPENDMENU ); +HB_FUNC_EXTERN( WIN_APPENDMENU ); HB_FUNC( WVT_APPENDMENU ) { - HB_FUNC_EXEC( WVG_APPENDMENU ); + HB_FUNC_EXEC( WIN_APPENDMENU ); } /*----------------------------------------------------------------------*/ @@ -774,7 +774,7 @@ HB_FUNC( WVT_SETLASTMENUEVENT ) PHB_GTWVT _s = hb_wvt_gtGetWVT(); int iEvent = _s->LastMenuEvent; - if ( HB_ISNUM( 1 ) ) + if ( ISNUM( 1 ) ) _s->LastMenuEvent = hb_parni( 1 ); hb_retni( iEvent ); @@ -788,7 +788,7 @@ HB_FUNC( WVT_SETMENUKEYEVENT ) int iOldEvent = _s->MenuKeyEvent; - if( HB_ISNUM( 1 ) ) + if( ISNUM( 1 ) ) _s->MenuKeyEvent = hb_parni( 1 ); hb_retni( iOldEvent ) ; @@ -811,7 +811,7 @@ HB_FUNC( WVT_ENABLESHORTCUTS ) BOOL bWas = _s->EnableShortCuts; - if( HB_ISLOG( 1 ) ) + if( ISLOG( 1 ) ) _s->EnableShortCuts = hb_parl( 1 ); hb_retl( bWas ); @@ -966,7 +966,7 @@ HB_FUNC( WVT_CREATEDIALOGDYNAMIC ) } { - if ( HB_ISNUM( 3 ) ) + if ( ISNUM( 3 ) ) { LPTSTR lpTemplate = HB_TCHAR_CONVTO( hb_parc( 1 ) ); hDlg = CreateDialogIndirect( ( HINSTANCE ) wvg_hInstance(), @@ -1342,7 +1342,7 @@ HB_FUNC( WVT_DLGSETICON ) { HICON hIcon; - if ( HB_ISNUM( 2 ) ) + if ( ISNUM( 2 ) ) { hIcon = LoadIcon( ( HINSTANCE ) wvg_hInstance(), MAKEINTRESOURCE( hb_parni( 2 ) ) ); } @@ -1491,7 +1491,7 @@ void wvt_Size2ArrayEx( SIZE *siz, PHB_ITEM aSize ) /*----------------------------------------------------------------------*/ -#define HB_PARTSTR( n ) ( HB_ISCHAR( n ) ? HB_TCHAR_CONVTO( hb_parc(n) ) : NULL ) +#define HB_PARTSTR( n ) ( ISCHAR( n ) ? HB_TCHAR_CONVTO( hb_parc(n) ) : NULL ) #define HB_PARTFREE( p ) do { if( p ) HB_TCHAR_FREE( p ); } while( 0 ) HB_FUNC( WVT__GETOPENFILENAME ) diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 6e8be597e5..7facf058a6 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -68,7 +68,7 @@ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ /* - * Direct WinApi Functions - Prefixed WVG_*() + * Direct WinApi Functions - Prefixed WIN_*() */ /*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/ @@ -93,7 +93,7 @@ # define GCLP_HBRBACKGROUND -10 #endif -#define WVG_STATUSBAR_MAX_PARTS 256 +#define WIN_STATUSBAR_MAX_PARTS 256 /*----------------------------------------------------------------------*/ @@ -135,14 +135,14 @@ HB_FUNC( WVG_HINSTANCE ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SENDMESSAGE ) +HB_FUNC( WIN_SENDMESSAGE ) { - LPTSTR cText = HB_ISBYREF( 4 ) ? HB_TCHAR_CONVTO( hb_parcx( 4 ) ) : NULL; + LPTSTR cText = ISBYREF( 4 ) ? HB_TCHAR_CONVTO( hb_parcx( 4 ) ) : NULL; hb_retnl( ( ULONG ) SendMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( UINT ) hb_parni( 2 ), ( !HB_ISNUM( 3 ) ? 0 : ( WPARAM ) hb_parnint( 3 ) ), - ( HB_ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM ) ( LPSTR ) cText : + ( ISNIL( 4 ) ? 0 : ( cText ? ( LPARAM ) ( LPSTR ) cText : ( HB_ISCHAR( 4 ) ? ( LPARAM )( LPSTR ) hb_parc( 4 ) : ( LPARAM ) hb_parnint( 4 ) ) ) ) ) ); @@ -158,7 +158,7 @@ HB_FUNC( WVG_SENDMESSAGE ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SENDDLGITEMMESSAGE ) +HB_FUNC( WIN_SENDDLGITEMMESSAGE ) { PHB_ITEM pText = hb_param( 5, HB_IT_STRING ); char * cText = NULL; @@ -174,7 +174,7 @@ HB_FUNC( WVG_SENDDLGITEMMESSAGE ) hb_retnl( ( LONG ) SendDlgItemMessage( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) , ( int ) hb_parni( 2 ) , ( UINT ) hb_parni( 3 ) , - ( HB_ISNUM( 4 ) ? ( WPARAM ) hb_parnint( 4 ) : 0 ), + ( ISNUM( 4 ) ? ( WPARAM ) hb_parnint( 4 ) : 0 ), ( cText ? ( LPARAM ) cText : ( LPARAM ) hb_parnint( 5 ) ) ) ); @@ -187,93 +187,93 @@ HB_FUNC( WVG_SENDDLGITEMMESSAGE ) /*----------------------------------------------------------------------*/ /* - * WVG_SetTimer( hWnd, nIdentifier, nTimeOut ) + * WIN_SetTimer( hWnd, nIdentifier, nTimeOut ) */ -HB_FUNC( WVG_SETTIMER ) +HB_FUNC( WIN_SETTIMER ) { hb_retl( SetTimer( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ), hb_parni( 3 ), NULL ) != 0 ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETFOCUS ) +HB_FUNC( WIN_SETFOCUS ) { SetFocus( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETTEXTCOLOR ) +HB_FUNC( WIN_SETTEXTCOLOR ) { hb_retnl( ( ULONG ) SetTextColor( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( COLORREF ) hb_parnl( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETBKCOLOR ) +HB_FUNC( WIN_SETBKCOLOR ) { hb_retnl( ( ULONG ) SetBkColor( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( COLORREF ) hb_parnl( 2 ) ) ); } /*----------------------------------------------------------------------*/ - -HB_FUNC( WVG_SETBKMODE ) +#if 0 +HB_FUNC( WIN_SETBKMODE ) { hb_retni( ( int ) SetBkMode( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ) ) ); } - +#endif /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETSTOCKOBJECT ) +HB_FUNC( WIN_GETSTOCKOBJECT ) { hb_retnint( ( HB_PTRDIFF ) GetStockObject( hb_parni( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_DELETEOBJECT ) +HB_FUNC( WIN_DELETEOBJECT ) { hb_retl( DeleteObject( ( HGDIOBJ ) ( HB_PTRDIFF ) hb_parnint( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SELECTOBJECT ) +HB_FUNC( WIN_SELECTOBJECT ) { hb_retnint( ( HB_PTRDIFF ) SelectObject( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( HGDIOBJ ) ( HB_PTRDIFF ) hb_parnint( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_LOWORD ) +HB_FUNC( WIN_LOWORD ) { hb_retnl( LOWORD( hb_parnl( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_HIWORD ) +HB_FUNC( WIN_HIWORD ) { hb_retnl( HIWORD( hb_parnl( 1 ) ) ); } /*----------------------------------------------------------------------*/ #if 0 -HB_FUNC( WVG_MULDIV ) +HB_FUNC( WIN_MULDIV ) { hb_retni( MulDiv( hb_parni( 1 ), hb_parni( 2 ), hb_parni( 3 ) ) ); } #endif /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETDIALOGBASEUNITS ) +HB_FUNC( WIN_GETDIALOGBASEUNITS ) { hb_retnl( ( LONG ) GetDialogBaseUnits() ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETDLGITEMTEXT ) +HB_FUNC( WIN_SETDLGITEMTEXT ) { LPTSTR lpBuffer = HB_TCHAR_CONVTO( hb_parcx( 3 ) ); SetDlgItemText( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ), lpBuffer ); @@ -282,7 +282,7 @@ HB_FUNC( WVG_SETDLGITEMTEXT ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETDLGITEMTEXT ) +HB_FUNC( WIN_GETDLGITEMTEXT ) { USHORT iLen = ( USHORT ) SendMessage( GetDlgItem( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ) ), WM_GETTEXTLENGTH, 0, 0 ) + 1; LPTSTR cText = ( LPTSTR ) hb_xgrab( iLen * sizeof( TCHAR ) ); @@ -304,22 +304,22 @@ HB_FUNC( WVG_GETDLGITEMTEXT ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CHECKDLGBUTTON ) +HB_FUNC( WIN_CHECKDLGBUTTON ) { hb_retl( CheckDlgButton( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ), - ( UINT )( HB_ISNUM( 3 ) ? hb_parni( 3 ) : hb_parl( 3 ) ) ) ); + ( UINT )( ISNUM( 3 ) ? hb_parni( 3 ) : hb_parl( 3 ) ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_ISDLGBUTTONCHECKED ) +HB_FUNC( WIN_ISDLGBUTTONCHECKED ) { hb_retni( IsDlgButtonChecked( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CHECKRADIOBUTTON ) +HB_FUNC( WIN_CHECKRADIOBUTTON ) { hb_retl( CheckRadioButton( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), /* handle of dialog box */ hb_parni( 2 ), /* identifier of first radio button in group */ @@ -330,14 +330,14 @@ HB_FUNC( WVG_CHECKRADIOBUTTON ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETDLGITEM ) +HB_FUNC( WIN_GETDLGITEM ) { hb_retnint( ( HB_PTRDIFF ) GetDlgItem( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_MESSAGEBOX ) +HB_FUNC( WIN_MESSAGEBOX ) { HWND hWnd = HB_ISNUM( 1 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) : GetActiveWindow(); LPTSTR lpMsg = HB_TCHAR_CONVTO( hb_parcx( 2 ) ); @@ -351,9 +351,9 @@ HB_FUNC( WVG_MESSAGEBOX ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_INVALIDATERECT ) +HB_FUNC( WIN_INVALIDATERECT ) { - if( HB_ISARRAY( 2 ) ) + if( ISARRAY( 2 ) ) { RECT rc = { 0, 0, 0, 0 }; @@ -370,9 +370,9 @@ HB_FUNC( WVG_INVALIDATERECT ) /*----------------------------------------------------------------------*/ /* - * WVG_LoadIcon( ncIcon ) + * Win_LoadIcon( ncIcon ) */ -HB_FUNC( WVG_LOADICON ) +HB_FUNC( WIN_LOADICON ) { HICON hIcon; @@ -392,12 +392,12 @@ HB_FUNC( WVG_LOADICON ) /*----------------------------------------------------------------------*/ /* - * WVG_LoadImage( ncImage, nSource ) -> hImage + * Win_LoadImage( ncImage, nSource ) -> hImage * nSource == 0 ResourceIdByNumber * nSource == 1 ResourceIdByName * nSource == 2 ImageFromDiskFile */ -HB_FUNC( WVG_LOADIMAGE ) +HB_FUNC( WIN_LOADIMAGE ) { HBITMAP hImage = 0; LPTSTR lpBuffer = HB_TCHAR_CONVTO( hb_parcx( 1 ) ); @@ -424,7 +424,7 @@ HB_FUNC( WVG_LOADIMAGE ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETCLIENTRECT ) +HB_FUNC( WIN_GETCLIENTRECT ) { RECT rc = { 0,0,0,0 }; PHB_ITEM info = hb_itemArrayNew( 4 ); @@ -441,9 +441,9 @@ HB_FUNC( WVG_GETCLIENTRECT ) /*----------------------------------------------------------------------*/ /* - * WVG_DrawImage( hdc, nLeft, nTop, nWidth, nHeight, cImage ) in Pixels + * Win_DrawImage( hdc, nLeft, nTop, nWidth, nHeight, cImage ) in Pixels */ -HB_FUNC( WVG_DRAWIMAGE ) +HB_FUNC( WIN_DRAWIMAGE ) { hb_retl( hb_wvt_DrawImage( ( HDC ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), hb_parc( 6 ) ) ); @@ -451,19 +451,19 @@ HB_FUNC( WVG_DRAWIMAGE ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETDC ) +HB_FUNC( WIN_GETDC ) { hb_retnint( ( HB_PTRDIFF ) GetDC( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_RELEASEDC ) +HB_FUNC( WIN_RELEASEDC ) { hb_retl( ReleaseDC( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( HDC ) ( HB_PTRDIFF ) hb_parnint( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CREATEBRUSH ) +HB_FUNC( WIN_CREATEBRUSH ) { LOGBRUSH lb = { 0,0,0 }; @@ -478,9 +478,9 @@ HB_FUNC( WVG_CREATEBRUSH ) } /*----------------------------------------------------------------------*/ /* - * WVG_DrawText( hDC, cText, aRect, nFormat ) + * Win_DrawText( hDC, cText, aRect, nFormat ) */ -HB_FUNC( WVG_DRAWTEXT ) +HB_FUNC( WIN_DRAWTEXT ) { RECT rc = { 0,0,0,0 }; LPTSTR lpBuffer = HB_TCHAR_CONVTO( hb_parcx( 2 ) ); @@ -496,7 +496,7 @@ HB_FUNC( WVG_DRAWTEXT ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETWINDOWRECT ) +HB_FUNC( WIN_GETWINDOWRECT ) { RECT rc; PHB_ITEM info = hb_itemArrayNew( 4 ); @@ -513,44 +513,44 @@ HB_FUNC( WVG_GETWINDOWRECT ) /*----------------------------------------------------------------------*/ /* - * WVG_MoveWindow( hWnd, nLeft, nTop, nWidth, nHeight, lRePaint ) + * Win_MoveWindow( hWnd, nLeft, nTop, nWidth, nHeight, lRePaint ) */ -HB_FUNC( WVG_MOVEWINDOW ) +HB_FUNC( WIN_MOVEWINDOW ) { MoveWindow( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parnl( 2 ), hb_parnl( 3 ), hb_parnl( 4 ), hb_parnl( 5 ), hb_parl( 6 ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETDESKTOPWINDOW ) +HB_FUNC( WIN_GETDESKTOPWINDOW ) { wvg_rethandle( GetDesktopWindow() ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETPARENT ) +HB_FUNC( WIN_SETPARENT ) { hb_retnint( ( HB_PTRDIFF ) SetParent( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( HWND ) ( HB_PTRDIFF ) hb_parnint( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_BRINGWINDOWTOTOP ) +HB_FUNC( WIN_BRINGWINDOWTOTOP ) { hb_retl( BringWindowToTop( wvg_parhwnd( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETFOREGROUNDWINDOW ) +HB_FUNC( WIN_SETFOREGROUNDWINDOW ) { hb_retl( BringWindowToTop( wvg_parhwnd( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETWINDOWTEXT ) +HB_FUNC( WIN_SETWINDOWTEXT ) { LPTSTR text = HB_TCHAR_CONVTO( hb_parcx( 2 ) ); SetWindowText( wvg_parhwnd( 1 ), text ); @@ -559,35 +559,35 @@ HB_FUNC( WVG_SETWINDOWTEXT ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETWINDOWLONG ) +HB_FUNC( WIN_SETWINDOWLONG ) { hb_retnl( SetWindowLong( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ), hb_parnl( 3 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_ISWINDOW ) +HB_FUNC( WIN_ISWINDOW ) { hb_retl( IsWindow( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_ENABLEWINDOW ) +HB_FUNC( WIN_ENABLEWINDOW ) { hb_retl( EnableWindow( wvg_parhwnd( 1 ), hb_parl( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_DESTROYWINDOW ) +HB_FUNC( WIN_DESTROYWINDOW ) { hb_retl( DestroyWindow( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CLIENTTOSCREEN ) +HB_FUNC( WIN_CLIENTTOSCREEN ) { POINT Point; PHB_ITEM pArray = hb_param( 2 , HB_IT_ARRAY ); @@ -608,7 +608,7 @@ HB_FUNC( WVG_CLIENTTOSCREEN ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SCREENTOCLIENT ) +HB_FUNC( WIN_SCREENTOCLIENT ) { POINT Point; PHB_ITEM pArray = hb_param( 2 , HB_IT_ARRAY ); @@ -629,28 +629,28 @@ HB_FUNC( WVG_SCREENTOCLIENT ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_AND ) +HB_FUNC( WIN_AND ) { hb_retnl( hb_parnl(1) & hb_parnl(2) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_OR ) +HB_FUNC( WIN_OR ) { hb_retnl( hb_parnl(1) | hb_parnl(2) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_NOT ) +HB_FUNC( WIN_NOT ) { hb_retnl( ~( hb_parnl(1) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_TRACKPOPUPMENU ) +HB_FUNC( WIN_TRACKPOPUPMENU ) { HMENU hMenu = ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 1 ); UINT uFlags = HB_ISNUM( 2 ) ? hb_parnl( 2 ) : TPM_CENTERALIGN | TPM_RETURNCMD; @@ -675,14 +675,14 @@ HB_FUNC( WVG_TRACKPOPUPMENU ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CHOOSECOLOR ) +HB_FUNC( WIN_CHOOSECOLOR ) { CHOOSECOLOR cc; COLORREF crCustClr[ 16 ]; int i; for( i = 0; i < ( int ) HB_SIZEOFARRAY( crCustClr ); i++ ) - crCustClr[ i ] = ( HB_ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ); + crCustClr[ i ] = ( ISARRAY( 2 ) ? ( COLORREF ) hb_parnl( 2, i+1 ) : GetSysColor( COLOR_BTNFACE ) ); cc.lStructSize = sizeof( CHOOSECOLOR ); cc.hwndOwner = HB_ISNUM( 4 ) ? ( HWND ) ( HB_PTRDIFF ) hb_parnint( 4 ) : NULL; @@ -698,7 +698,7 @@ HB_FUNC( WVG_CHOOSECOLOR ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_FINDWINDOW ) +HB_FUNC( WIN_FINDWINDOW ) { HWND hwnd; LPTSTR lpStr; @@ -715,7 +715,7 @@ HB_FUNC( WVG_FINDWINDOW ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SLEEP ) +HB_FUNC( WIN_SLEEP ) { Sleep( hb_parni( 1 ) ); } @@ -724,7 +724,7 @@ HB_FUNC( WVG_SLEEP ) /* Menu Manipulations */ /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETMENU ) +HB_FUNC( WIN_SETMENU ) { HWND hWnd = ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ); @@ -756,26 +756,26 @@ HB_FUNC( WVG_SETMENU ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CREATEMENU ) +HB_FUNC( WIN_CREATEMENU ) { hb_retnint( ( HB_PTRDIFF ) CreateMenu() ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CREATEPOPUPMENU ) +HB_FUNC( WIN_CREATEPOPUPMENU ) { hb_retnint( ( HB_PTRDIFF ) CreatePopupMenu() ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_APPENDMENU ) +HB_FUNC( WIN_APPENDMENU ) { LPTSTR buffer; int i, iLen; - if( HB_ISCHAR( 4 ) ) + if( ISCHAR( 4 ) ) { iLen = hb_parclen( 4 ); if( iLen > 0 && iLen < 256 ) /* Translate '~' to '&' */ @@ -811,63 +811,63 @@ HB_FUNC( WVG_APPENDMENU ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_DELETEMENU ) +HB_FUNC( WIN_DELETEMENU ) { hb_retl( DeleteMenu( ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( UINT ) hb_parni( 2 ), ( UINT ) hb_parni( 3 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_DESTROYMENU ) +HB_FUNC( WIN_DESTROYMENU ) { hb_retl( DestroyMenu( ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_ENABLEMENUITEM ) +HB_FUNC( WIN_ENABLEMENUITEM ) { hb_retl( EnableMenuItem( ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( UINT ) hb_parni( 2 ), ( UINT ) hb_parni( 3 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CHECKMENUITEM ) +HB_FUNC( WIN_CHECKMENUITEM ) { hb_retni( CheckMenuItem( ( HMENU ) ( HB_PTRDIFF ) hb_parnint( 1 ), ( UINT ) hb_parni( 2 ), ( UINT ) hb_parni( 3 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_DRAWMENUBAR ) +HB_FUNC( WIN_DRAWMENUBAR ) { DrawMenuBar( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_UPDATEWINDOW ) +HB_FUNC( WIN_UPDATEWINDOW ) { hb_retl( UpdateWindow( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SHOWWINDOW ) +HB_FUNC( WIN_SHOWWINDOW ) { hb_retl( ShowWindow( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_MAKELPARAM ) +HB_FUNC( WIN_MAKELPARAM ) { hb_retnint( MAKELPARAM( hb_parnint( 1 ), hb_parnint( 2 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CREATEWINDOWEX ) +HB_FUNC( WIN_CREATEWINDOWEX ) { HWND hWnd; LPTSTR szClassName = HB_TCHAR_CONVTO( hb_parcx( 2 ) ); @@ -1254,13 +1254,13 @@ HB_FUNC( WVG_STATUSBARCREATEPANEL ) { case 0: { - int ptArray[ WVG_STATUSBAR_MAX_PARTS ]; + int ptArray[ WIN_STATUSBAR_MAX_PARTS ]; int iParts; RECT rc = { 0, 0, 0, 0 }; int n; USHORT width; - iParts = ( int ) SendMessage( hWndSB, SB_GETPARTS, ( WPARAM ) WVG_STATUSBAR_MAX_PARTS, ( LPARAM ) ( LPINT ) ptArray ); + iParts = ( int ) SendMessage( hWndSB, SB_GETPARTS, ( WPARAM ) WIN_STATUSBAR_MAX_PARTS, ( LPARAM ) ( LPINT ) ptArray ); GetClientRect( hWndSB, &rc ); width = ( USHORT ) ( rc.right / ( iParts + 1 ) ); @@ -1278,7 +1278,7 @@ HB_FUNC( WVG_STATUSBARCREATEPANEL ) case -1: { RECT rc = { 0, 0, 0, 0 }; - int ptArray[ WVG_STATUSBAR_MAX_PARTS ]; + int ptArray[ WIN_STATUSBAR_MAX_PARTS ]; if( GetClientRect( hWndSB, &rc ) ) { @@ -1327,10 +1327,10 @@ HB_FUNC( WVG_STATUSBARREFRESH ) if( hWndSB && IsWindow( hWndSB ) ) { - int ptArray[ WVG_STATUSBAR_MAX_PARTS ]; + int ptArray[ WIN_STATUSBAR_MAX_PARTS ]; int iParts,i; - iParts = SendMessage( hWndSB, SB_GETPARTS, WVG_STATUSBAR_MAX_PARTS, ( LPARAM ) ( LPINT ) ptArray ); + iParts = SendMessage( hWndSB, SB_GETPARTS, WIN_STATUSBAR_MAX_PARTS, ( LPARAM ) ( LPINT ) ptArray ); ptArray[ iParts-1 ] = -1; @@ -1346,7 +1346,7 @@ HB_FUNC( WVG_STATUSBARREFRESH ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SENDMESSAGETEXT ) +HB_FUNC( WIN_SENDMESSAGETEXT ) { LPTSTR lpBuffer = HB_TCHAR_CONVTO( hb_parcx( 4 ) ); @@ -1357,11 +1357,11 @@ HB_FUNC( WVG_SENDMESSAGETEXT ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_GETMESSAGETEXT ) +HB_FUNC( WIN_GETMESSAGETEXT ) { TCHAR cText[ 32000 ]; - SendMessage( wvg_parhwnd( 1 ), ( UINT ) hb_parni( 2 ), wvg_parwparam( 3 ), ( LPARAM ) cText ); + SendMessage( wvg_parhwnd( 1 ), ( UINT ) hb_parni( 2 ), wvg_parwparam( 3 ), ( LPARAM ) &cText ); { char * szText = HB_TCHAR_CONVFROM( cText ); @@ -1372,7 +1372,7 @@ HB_FUNC( WVG_GETMESSAGETEXT ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETWNDPROC ) +HB_FUNC( WIN_SETWNDPROC ) { HWND hWnd = ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ); WNDPROC wndProc = ( WNDPROC ) ( HB_PTRDIFF ) hb_parnint( 2 ); @@ -1389,7 +1389,7 @@ HB_FUNC( WVG_SETWNDPROC ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_DEFWINDOWPROC ) +HB_FUNC( WIN_DEFWINDOWPROC ) { hb_retnint( DefWindowProc( wvg_parhwnd( 1 ), hb_parni( 2 ), @@ -1399,7 +1399,7 @@ HB_FUNC( WVG_DEFWINDOWPROC ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_CALLWINDOWPROC ) +HB_FUNC( WIN_CALLWINDOWPROC ) { hb_retnint( CallWindowProc( wvg_parwndproc( 1 ), wvg_parhwnd( 2 ), @@ -1485,7 +1485,7 @@ HB_FUNC( WVG_GETNMTREEVIEWINFO ) /* TreeView Functions */ /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_TREEVIEW_SETTEXTCOLOR ) +HB_FUNC( WIN_TREEVIEW_SETTEXTCOLOR ) { #if ! defined( HB_OS_WIN_CE ) hb_retl( TreeView_SetTextColor( wvg_parhwnd( 1 ), wvg_parcolor( 2 ) ) ); @@ -1493,7 +1493,7 @@ HB_FUNC( WVG_TREEVIEW_SETTEXTCOLOR ) } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_TREEVIEW_SETBKCOLOR ) +HB_FUNC( WIN_TREEVIEW_SETBKCOLOR ) { #if ! defined( HB_OS_WIN_CE ) hb_retl( TreeView_SetBkColor( wvg_parhwnd( 1 ), wvg_parcolor( 2 ) ) ); @@ -1501,7 +1501,7 @@ HB_FUNC( WVG_TREEVIEW_SETBKCOLOR ) } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_TREEVIEW_SETLINECOLOR ) +HB_FUNC( WIN_TREEVIEW_SETLINECOLOR ) { #if 0 hb_retl( TreeView_SetLineColor( wvg_parhwnd( 1 ), wvg_parcolor( 2 ) ) ); @@ -1509,7 +1509,7 @@ HB_FUNC( WVG_TREEVIEW_SETLINECOLOR ) } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_TREEVIEW_SELECTITEM ) +HB_FUNC( WIN_TREEVIEW_SELECTITEM ) { hb_retl( TreeView_SelectItem( wvg_parhwnd( 1 ), wvg_parhandle( 2 ) ) ); } @@ -1587,14 +1587,14 @@ HB_FUNC( WVG_TREEVIEW_ADDITEM ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_TREEVIEW_EXPAND ) +HB_FUNC( WIN_TREEVIEW_EXPAND ) { hb_retl( TreeView_Expand( wvg_parhwnd( 1 ), wvg_parhandle( 2 ), ( hb_parl( 3 ) ? TVE_EXPAND : TVE_COLLAPSE ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_TVIS_EXPANDED ) +HB_FUNC( WIN_TVIS_EXPANDED ) { #if 0 hb_retl( TreeView_GetItemState( wvg_parhwnd( 1 ), wvg_parhandle( 2 ), ( UINT ) TVIS_EXPANDED ) ); @@ -1657,7 +1657,7 @@ HB_FUNC( WVG_TREEVIEW_SHOWEXPANDED ) /* ListBox Functions */ /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_LBGETTEXT ) +HB_FUNC( WIN_LBGETTEXT ) { TCHAR text[ MAX_PATH + 1 ]; char * szText; @@ -1671,14 +1671,14 @@ HB_FUNC( WVG_LBGETTEXT ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_LBGETCURSEL ) +HB_FUNC( WIN_LBGETCURSEL ) { hb_retni( ListBox_GetCurSel( wvg_parhwnd( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_LBSETCURSEL ) +HB_FUNC( WIN_LBSETCURSEL ) { hb_retni( ListBox_SetCurSel( wvg_parhwnd( 1 ), hb_parni( 2 ) ) ); } @@ -1687,13 +1687,13 @@ HB_FUNC( WVG_LBSETCURSEL ) /* Buttons */ /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_BUTTON_GETCHECK ) +HB_FUNC( WIN_BUTTON_GETCHECK ) { hb_retnl( Button_GetCheck( wvg_parhwnd( 1 ) ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_ISICONIC ) +HB_FUNC( WIN_ISICONIC ) { #if ! defined( HB_OS_WIN_CE ) hb_retl( IsIconic( wvg_parhwnd( 1 ) ) ); @@ -1703,7 +1703,7 @@ HB_FUNC( WVG_ISICONIC ) } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_ISZOOMED ) +HB_FUNC( WIN_ISZOOMED ) { #if ! defined( HB_OS_WIN_CE ) hb_retl( IsZoomed( wvg_parhwnd( 1 ) ) ); @@ -1713,9 +1713,9 @@ HB_FUNC( WVG_ISZOOMED ) } /*----------------------------------------------------------------------*/ /* - * WVG_SetDCBrushColor( hDC, nRGB ) + * Win_SetDCBrushColor( hDC, nRGB ) */ -HB_FUNC( WVG_SETDCBRUSHCOLOR ) +HB_FUNC( WIN_SETDCBRUSHCOLOR ) { #if ( _WIN32_WINNT >= 0x0500 ) wvg_rethandle( SetDCBrushColor( wvg_parhdc( 1 ), wvg_parcolor( 2 ) ) ); @@ -1725,9 +1725,9 @@ HB_FUNC( WVG_SETDCBRUSHCOLOR ) } /*----------------------------------------------------------------------*/ /* - * WVG_SetDCPenColor( hDC, nRGB ) + * Win_SetDCPenColor( hDC, nRGB ) */ -HB_FUNC( WVG_SETDCPENCOLOR ) +HB_FUNC( WIN_SETDCPENCOLOR ) { #if ( _WIN32_WINNT >= 0x0500 ) wvg_rethandle( SetDCPenColor( wvg_parhdc( 1 ), wvg_parcolor( 2 ) ) ); @@ -1738,34 +1738,34 @@ HB_FUNC( WVG_SETDCPENCOLOR ) /*----------------------------------------------------------------------*/ /* - * WVG_GetCurrentObject( hDC, nObjType ) + * Win_GetCurrentObject( hDC, nObjType ) */ -HB_FUNC( WVG_GETCURRENTOBJECT ) +HB_FUNC( WIN_GETCURRENTOBJECT ) { wvg_rethandle( GetCurrentObject( wvg_parhdc( 1 ), hb_parni( 2 ) ) ); } /*----------------------------------------------------------------------*/ /* - * WVG_GetCurrentBrush( hDC ) + * Win_GetCurrentBrush( hDC ) */ -HB_FUNC( WVG_GETCURRENTBRUSH ) +HB_FUNC( WIN_GETCURRENTBRUSH ) { wvg_rethandle( GetCurrentObject( wvg_parhdc( 1 ), OBJ_BRUSH ) ); } /*----------------------------------------------------------------------*/ /* - * WVG_GetCurrentFornt( hDC ) + * Win_GetCurrentFornt( hDC ) */ -HB_FUNC( WVG_GETCURRENTFONT ) +HB_FUNC( WIN_GETCURRENTFONT ) { wvg_rethandle( GetCurrentObject( wvg_parhdc( 1 ), OBJ_FONT ) ); } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETWINDOWPOSTOBACK ) +HB_FUNC( WIN_SETWINDOWPOSTOBACK ) { hb_retl( SetWindowPos( wvg_parhwnd( 1 ), ( HWND ) HWND_BOTTOM, 0, 0, 0, 0 , SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE ) ); @@ -1773,7 +1773,7 @@ HB_FUNC( WVG_SETWINDOWPOSTOBACK ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETWINDOWPOSTOTOP ) +HB_FUNC( WIN_SETWINDOWPOSTOTOP ) { hb_retl( SetWindowPos( wvg_parhwnd( 1 ), ( HWND ) HWND_TOP, 0, 0, 0, 0 , SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE ) ); @@ -1781,7 +1781,7 @@ HB_FUNC( WVG_SETWINDOWPOSTOTOP ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETWINDOWSIZE ) +HB_FUNC( WIN_SETWINDOWSIZE ) { hb_retl( SetWindowPos( wvg_parhwnd( 1 ), NULL, 0, 0, hb_parni( 2 ), hb_parni( 3 ), hb_parl( 4 ) ? 0 : SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE ) ); @@ -1789,7 +1789,7 @@ HB_FUNC( WVG_SETWINDOWSIZE ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETWINDOWPOSITION ) +HB_FUNC( WIN_SETWINDOWPOSITION ) { hb_retl( SetWindowPos( wvg_parhwnd( 1 ), NULL, hb_parni( 2 ), hb_parni( 3 ), 0, 0, hb_parl( 4 ) ? 0 : SWP_NOREDRAW | SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE ) ); @@ -1797,7 +1797,7 @@ HB_FUNC( WVG_SETWINDOWPOSITION ) /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SETWINDOWPOSANDSIZE ) +HB_FUNC( WIN_SETWINDOWPOSANDSIZE ) { hb_retl( SetWindowPos( wvg_parhwnd( 1 ), NULL, hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ), @@ -1871,7 +1871,7 @@ HB_FUNC( WVG_CHOOSEFONT ) HWND hWnd = wvg_parhwnd( 1 ); TCHAR szStyle[ MAX_PATH + 1 ]; - if( HB_ISCHAR( 3 ) ) + if( ISCHAR( 3 ) ) { HB_TCHAR_CPTO( lf.lfFaceName, hb_parcx( 3 ), sizeof( lf.lfFaceName ) - 1 ); } @@ -1902,9 +1902,9 @@ HB_FUNC( WVG_CHOOSEFONT ) Flags = Flags | CF_NOSIMULATIONS; /* ::synthesizeFonts == .f. */ #endif - if( HB_ISLOG( 5 ) && hb_parl( 5 ) ) + if( ISLOG( 5 ) && hb_parl( 5 ) ) Flags = Flags | CF_SCREENFONTS; - if( HB_ISLOG( 6 ) && hb_parl( 6 ) ) + if( ISLOG( 6 ) && hb_parl( 6 ) ) Flags = Flags | CF_PRINTERFONTS; cf.lStructSize = sizeof( CHOOSEFONT ); @@ -2043,9 +2043,9 @@ HB_FUNC( WVG_SETCURRENTBRUSH ) } /*----------------------------------------------------------------------*/ /* - * WVG_SetLayeredWindowAttributes( hWnd, nRGB, nOpacityFactor [0-255] ) + * Win_SetLayeredWindowAttributes( hWnd, nRGB, nOpacityFactor [0-255] ) */ -HB_FUNC( WVG_SETLAYEREDWINDOWATTRIBUTES ) +HB_FUNC( WIN_SETLAYEREDWINDOWATTRIBUTES ) { #if ( _WIN32_WINNT >= 0x0500 ) HINSTANCE h; @@ -2110,7 +2110,7 @@ HB_FUNC( WVG_ADDTOOLBARBUTTON ) HB_TCHAR_FREE( szCaption ); #if 1 - if( HB_ISLOG( 6 ) && ( hb_parl( 6 ) ) ) + if( ISLOG( 6 ) && ( hb_parl( 6 ) ) ) { SendMessage( hWndTB, TB_SETMAXTEXTROWS, ( WPARAM ) 0, ( LPARAM ) 0 ); } @@ -2151,7 +2151,7 @@ HB_FUNC( WVG_ADDTOOLBARBUTTON ) } /*----------------------------------------------------------------------*/ -HB_FUNC( WVG_SENDTOOLBARMESSAGE ) +HB_FUNC( WIN_SENDTOOLBARMESSAGE ) { /* #if ! defined( HB_OS_WIN_CE ) */ HWND hTB = wapi_par_HWND( 1 ); @@ -2355,7 +2355,7 @@ HB_FUNC( WVG_REGISTERCLASS_BYNAME ) /*----------------------------------------------------------------------*/ /* - * Function with WVG_FillRect() exists in hbwin:win_parn1.c with different approach. + * Function with Win_FillRect() exists in hbwin:win_parn1.c with different approach. */ HB_FUNC( WVG_FILLRECT ) { diff --git a/harbour/contrib/gtwvg/wvgwnd.prg b/harbour/contrib/gtwvg/wvgwnd.prg index 712d07c49b..9d74e49d1f 100644 --- a/harbour/contrib/gtwvg/wvgwnd.prg +++ b/harbour/contrib/gtwvg/wvgwnd.prg @@ -353,8 +353,8 @@ METHOD destroy() CLASS WvgWindow WVG_ReleaseWindowProcBlock( ::pWnd ) #endif - IF WVG_IsWindow( ::hWnd ) - WVG_DestroyWindow( ::hWnd ) + IF Win_IsWindow( ::hWnd ) + Win_DestroyWindow( ::hWnd ) ENDIF #ifdef __BYASCALLBACK__ @@ -364,7 +364,7 @@ METHOD destroy() CLASS WvgWindow #endif IF ::hBrushBG <> NIL - WVG_DeleteObject( ::hBrushBG ) + Win_DeleteObject( ::hBrushBG ) ENDIF RETURN Self @@ -375,7 +375,7 @@ METHOD SetWindowProcCallback() CLASS WvgWindow #ifdef __BYASCALLBACK__ ::nWndProc := hb_AsCallBack( "CONTROLWNDPROC", Self ) - ::nOldProc := WVG_SetWndProc( ::hWnd, ::nWndProc ) + ::nOldProc := Win_SetWndProc( ::hWnd, ::nWndProc ) #endif #ifdef __BYSETPROP__ @@ -394,7 +394,7 @@ METHOD captureMouse() CLASS WvgWindow METHOD disable() CLASS WvgWindow - IF WVG_EnableWindow( ::hWnd, .f. ) + IF Win_EnableWindow( ::hWnd, .f. ) ::is_enabled := .f. RETURN .t. ENDIF @@ -405,7 +405,7 @@ METHOD disable() CLASS WvgWindow METHOD enable() CLASS WvgWindow - IF WVG_EnableWindow( ::hWnd, .t. ) + IF Win_EnableWindow( ::hWnd, .t. ) ::is_enabled := .t. RETURN .t. ENDIF @@ -416,8 +416,8 @@ METHOD enable() CLASS WvgWindow METHOD hide() CLASS WvgWindow - IF WVG_IsWindow( ::hWnd ) - WVG_ShowWindow( ::hWnd, SW_HIDE ) + IF Win_IsWindow( ::hWnd ) + Win_ShowWindow( ::hWnd, SW_HIDE ) ::is_hidden := .t. ENDIF @@ -427,7 +427,7 @@ METHOD hide() CLASS WvgWindow METHOD invalidateRect( aRect ) CLASS WvgWindow - RETURN WVG_InvalidateRect( ::hWnd, aRect ) + RETURN Win_InvalidateRect( ::hWnd, aRect ) /*----------------------------------------------------------------------*/ @@ -447,7 +447,7 @@ METHOD setColorBG( nRGB ) CLASS WvgWindow LOCAL hBrush IF hb_isNumeric( nRGB ) - hBrush := WVG_CreateBrush( BS_SOLID, nRGB, 0 ) + hBrush := Win_CreateBrush( BS_SOLID, nRGB, 0 ) IF hBrush <> 0 ::clr_BG := nRGB ::hBrushBG := hBrush @@ -491,7 +491,7 @@ METHOD setPos( aPos, lPaint ) CLASS WvgWindow exit OTHERWISE - WVG_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], lPaint ) + Win_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], lPaint ) EXIT END @@ -513,8 +513,8 @@ METHOD setPosAndSize( aPos, aSize, lPaint ) CLASS WvgWindow exit OTHERWISE - /*WVG_MoveWindow( ::hWnd, aPos[ 1 ], aPos[ 2 ], aSize[ 1 ], aSize[ 2 ], lPaint ) */ - WVG_SetWindowPosAndSize( ::hWnd, aPos[ 1 ], aPos[ 2 ], aSize[ 1 ], aSize[ 2 ], lPaint ) + /*Win_MoveWindow( ::hWnd, aPos[ 1 ], aPos[ 2 ], aSize[ 1 ], aSize[ 2 ], lPaint ) */ + Win_SetWindowPosAndSize( ::hWnd, aPos[ 1 ], aPos[ 2 ], aSize[ 1 ], aSize[ 2 ], lPaint ) EXIT END @@ -532,8 +532,8 @@ METHOD setSize( aSize, lPaint ) CLASS WvgWindow SWITCH ::objType CASE objTypeDialog - /*WVG_MoveWindow( ::hWnd, 0, 0, aSize[ 1 ], aSize[ 2 ], lPaint ) */ - WVG_SetWindowSize( ::hWnd, aSize[ 1 ], aSize[ 2 ], lPaint ) + /*Win_MoveWindow( ::hWnd, 0, 0, aSize[ 1 ], aSize[ 2 ], lPaint ) */ + Win_SetWindowSize( ::hWnd, aSize[ 1 ], aSize[ 2 ], lPaint ) EXIT END @@ -565,7 +565,7 @@ METHOD isDerivedFrom( cClassORoObject ) CLASS WvgWindow METHOD show() CLASS WvgWindow - WVG_ShowWindow( ::hWnd, SW_NORMAL ) + Win_ShowWindow( ::hWnd, SW_NORMAL ) ::is_hidden := .f. ::lHasInputFocus := .t. @@ -575,14 +575,14 @@ METHOD show() CLASS WvgWindow METHOD toBack() CLASS WvgWindow - RETURN WVG_SetWindowPosToBack( ::hWnd ) + RETURN Win_SetWindowPosToBack( ::hWnd ) /*----------------------------------------------------------------------*/ METHOD toFront() CLASS WvgWindow - /*RETURN WVG_SetForegroundWindow( ::hWnd ) */ - RETURN WVG_SetWindowPosToTop( ::hWnd ) + /*RETURN Win_SetForegroundWindow( ::hWnd ) */ + RETURN Win_SetWindowPosToTop( ::hWnd ) /*----------------------------------------------------------------------*/ @@ -653,7 +653,7 @@ METHOD setPresParam() CLASS WvgWindow METHOD currentPos() CLASS WvgWindow LOCAL aRect - aRect := WVG_GetWindowRect( ::hWnd ) + aRect := Win_GetWindowRect( ::hWnd ) RETURN { aRect[ 1 ], aRect[ 2 ] } @@ -662,7 +662,7 @@ METHOD currentPos() CLASS WvgWindow METHOD currentSize() CLASS WvgWindow LOCAL aRect - aRect := WVG_GetClientRect( ::hWnd ) + aRect := Win_GetClientRect( ::hWnd ) RETURN { aRect[ 3 ] - aRect[ 1 ], aRect[ 4 ] - aRect[ 2 ] } @@ -1217,7 +1217,7 @@ METHOD setFocus() CLASS WvgWindow METHOD sendMessage( nMessage, nlParam, nwParam ) CLASS WvgWindow - RETURN WVG_SendMessage( ::hWnd, nMessage, nlParam, nwParam ) + RETURN Win_SendMessage( ::hWnd, nMessage, nlParam, nwParam ) /*----------------------------------------------------------------------*/ @@ -1239,7 +1239,7 @@ METHOD createControl() CLASS WvgWindow ::nID := ::oParent:GetControlId() - hWnd := WVG_CreateWindowEx( ::exStyle, ; + hWnd := Win_CreateWindowEx( ::exStyle, ; ::className, ; "", ; /* window name */ ::style, ; @@ -1254,7 +1254,7 @@ METHOD createControl() CLASS WvgWindow IF ( hWnd <> 0 ) ::hWnd := hWnd ::pWnd := WIN_N2P( hWnd ) - ::sendMessage( WM_SETFONT, WVG_GetStockObject( DEFAULT_GUI_FONT ), 1 ) + ::sendMessage( WM_SETFONT, Win_GetStockObject( DEFAULT_GUI_FONT ), 1 ) ENDIF RETURN Self @@ -1276,8 +1276,8 @@ METHOD ControlWndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgWindow EXIT CASE WM_COMMAND - nCtrlID := WVG_LOWORD( nwParam ) - nNotifctn := WVG_HIWORD( nwParam ) + nCtrlID := Win_LOWORD( nwParam ) + nNotifctn := Win_HIWORD( nwParam ) hWndCtrl := nlParam IF hWndCtrl == 0 /* It is menu */ @@ -1325,7 +1325,7 @@ METHOD ControlWndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgWindow nReturn := oObj:handleEvent( HB_GTE_CTLCOLOR, { nwParam, nlParam } ) IF nReturn == 1 - RETURN WVG_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam ) + RETURN Win_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam ) ELSE RETURN nReturn ENDIF @@ -1333,11 +1333,11 @@ METHOD ControlWndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgWindow EXIT CASE WM_HSCROLL - ::handleEvent( HB_GTE_HSCROLL, { WVG_LoWord( nwParam ), WVG_HiWord( nwParam ), nlParam } ) + ::handleEvent( HB_GTE_HSCROLL, { Win_LoWord( nwParam ), Win_HiWord( nwParam ), nlParam } ) RETURN 0 CASE WM_VSCROLL - nReturn := ::handleEvent( HB_GTE_VSCROLL, { WVG_LoWord( nwParam ), WVG_HiWord( nwParam ), nlParam } ) + nReturn := ::handleEvent( HB_GTE_VSCROLL, { Win_LoWord( nwParam ), Win_HiWord( nwParam ), nlParam } ) IF nReturn == EVENT_HANDELLED RETURN 0 ENDIF @@ -1374,7 +1374,7 @@ METHOD ControlWndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgWindow #endif END - RETURN WVG_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam ) + RETURN Win_CallWindowProc( ::nOldProc, hWnd, nMessage, nwParam, nlParam ) /*----------------------------------------------------------------------*/