diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a8db74b45c..4873c1eb32 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,29 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-12-15 08:07 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * harbour/contrib/gtwvg/wvtwin.ch + + Added more constants. + + * harbour/contrib/gtwvg/wvgwin.c + + Added functions to manipulate ChooseFont() WINAPI. + + * harbour/contrib/gtwvg/wvgsysw.prg + + Implemented WvgFontDialog(), WvgFon() Xbase++ compatible classes. + + * harbour/contrib/gtwvg/tests/demoxbp.prg + + Incorporated WvgFontDialog() and WvgFont() functionality. + + ;IMPORTANT: XBase++ documentation describes that WvgFontDialog() + cannot be opened in modeless state under Windows. + Additionally it also states that its event blocks cannot + be implemented in Windows. It is possible only in OS/2. + + But Harbour implementation of WvgFontDialog() has + provided this important functionality in Windows also. + You can :display the font dialog in modeless state as + well as :activate* codeblocks also get fired. + 2008-12-12 12:10 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * harbour/contrib/gtwvg/wvtwin.ch + Added more constants. diff --git a/harbour/contrib/gtwvg/tests/demoxbp.prg b/harbour/contrib/gtwvg/tests/demoxbp.prg index 027e966896..92a1a16732 100644 --- a/harbour/contrib/gtwvg/tests/demoxbp.prg +++ b/harbour/contrib/gtwvg/tests/demoxbp.prg @@ -154,23 +154,28 @@ FUNCTION Main() oListBox:setColorFG( RGB( 218,61,34 ) ) //oListBox:setColorBG( RGB( 250,244,182 ) ) - aadd( aParts, 'XbpDialog' ) - aadd( aParts, 'XbpMenuBar' ) - aadd( aParts, 'XbpToolBar' ) - aadd( aParts, 'XbpStatusBar' ) - aadd( aParts, 'XbpStatic' ) - aadd( aParts, 'XbpTreeView' ) - aadd( aParts, 'XbpActiveX' ) - aadd( aParts, 'XbpListBox' ) - aadd( aParts, 'XbpPushButton' ) - aadd( aParts, 'XbpCheckBox' ) - aadd( aParts, 'XbpRadioButton') - aadd( aParts, 'Xbp3State' ) - aadd( aParts, 'XbpSLE' ) - aadd( aParts, 'XbpMLE' ) - aadd( aParts, 'XbpHTMLViewer' ) - aadd( aParts, '-------------' ) - aadd( aParts, 'DataRef' ) + aadd( aParts, 'XbpDialog' ) + aadd( aParts, 'XbpMenuBar' ) + aadd( aParts, 'XbpToolBar' ) + aadd( aParts, 'XbpToolBarButton' ) + aadd( aParts, 'XbpStatusBar' ) + aadd( aParts, 'XbpStatic' ) + aadd( aParts, 'XbpTreeView' ) + aadd( aParts, 'XbpTreeViewItem' ) + aadd( aParts, 'XbpActiveXControl') + aadd( aParts, 'XbpListBox' ) + aadd( aParts, 'XbpPushButton' ) + aadd( aParts, 'XbpCheckBox' ) + aadd( aParts, 'XbpRadioButton' ) + aadd( aParts, 'Xbp3State' ) + aadd( aParts, 'XbpSLE' ) + aadd( aParts, 'XbpMLE' ) + aadd( aParts, 'XbpHTMLViewer' ) + aadd( aParts, 'XbpSysWindow' ) + aadd( aParts, 'XbpFontDialog' ) + aadd( aParts, 'XbpFont' ) + aadd( aParts, '-------------' ) + aadd( aParts, 'DataRef' ) aeval( aParts, {|e| oListBox:addItem( e ) } ) oListBox:itemSelected := {|| Win_MessageBox( , oListBox:getCurItem() ) } @@ -242,6 +247,7 @@ FUNCTION Main() oTBar:buttonClick := {|oBtn| IF( oBtn:caption == 'Hide' , oStatic:hide(), nil ),; IF( oBtn:caption == 'Show' , oStatic:show(), nil ),; IF( oBtn:caption == 'Tools', oStatic2:show():toFront(), nil ),; + IF( oBtn:caption == 'Font Dlg', ExeFontDialog( oCrt ), nil ),; IF( oBtn:caption $ 'Hide,Show', oCrt:sendMessage( WM_SIZE, 0, 0 ), NIL ),; oPanel2:caption := "Button [ " + oBtn:caption + " ] clicked!" } oCrt:resize := {|| ResizeDialog( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr ) } @@ -260,6 +266,17 @@ FUNCTION Main() //----------------------------------------------------------------------// +STATIC FUNCTION HB_GTSYS() + + REQUEST HB_GT_GUI_DEFAULT + REQUEST HB_GT_WVG + REQUEST HB_GT_WVT + REQUEST HB_GT_WGU + + RETURN NIL + +//----------------------------------------------------------------------// + STATIC FUNCTION ResizeDialog( oCrt, oTBar, oSBar, oStatic, oCom, oTree, oAddr ) LOCAL aCrt, aTBar, aSBar, aStatic, aCom, aTree LOCAL nH, nT @@ -330,6 +347,9 @@ Static Function ActiveXBuildMenu( oCrt, oStatic, oStatic2 ) oSubMenu:addItem( { "~Hide or Show Left Panel" , {|| IF( oStatic:isVisible, ; oStatic:hide(), oStatic:show() ), oCrt:sendMessage( WM_SIZE,0,0 ) } } ) oSubMenu:addItem( { "~Show My Panel" , {|| oStatic2:show() } } ) + oSubMenu:addItem() + oSubMenu:addItem( { "~Font Dialog" , {|| ExeFontDialog( oCrt ) } } ) + oMenuBar:addItem( { oSubMenu, NIL } ) Return nil @@ -354,7 +374,7 @@ STATIC FUNCTION ActiveXBuildToolBar( oCrt ) oTBar:addItem( "New" , 'c:\harbour\contrib\gtwvg\tests\v_new.bmp' ) oTBar:addItem( "Select" , 'c:\harbour\contrib\gtwvg\tests\v_selct1.bmp' ) - oTBar:addItem( "Calendar" , 'c:\harbour\contrib\gtwvg\tests\v_calend.bmp' ) + oTBar:addItem( "Font Dlg" , '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( "Show" , 'c:\harbour\contrib\gtwvg\tests\v_clclt.bmp' ) @@ -396,14 +416,35 @@ Static Function MyFunction( nMode ) //----------------------------------------------------------------------// -Function HB_GTSYS() +STATIC FUNCTION ExeFontDialog( oCrt ) + LOCAL oFontDlg, oWvgFont - REQUEST HB_GT_GUI_DEFAULT - REQUEST HB_GT_WVG - REQUEST HB_GT_WVT - REQUEST HB_GT_WGU + STATIC nMode := 0 - Return NIL + oFontDlg := WvgFontDialog():new( oCrt ) + + oFontDlg:title := 'Select a Screen Font' + oFontDlg:aPos := { 150,150 } + oFontDlg:buttonApply := .t. + oFontDlg:activateApply := {|| NIL } + oFontDlg:familyName := "Courier New" + oFontDlg:strikeout := .T. + oFontDlg:underscore := .f. + //oFontDlg:activateOk := {|| Win_MessageBox( , 'activateOK Event Handelled in Windows!' ) } + oFontDlg:nominalPointSize := 12 + + //oFontDlg:size := .f. + //oFontDlg:style := .f. + + oFontDlg:create() + // Every 2nd FontDialog will be MODAL + oWvgFont := oFontDlg:display( ++nMode % 2 ) + oFontDlg:destroy() + + #if 0 + hb_ToOutDebug( '%s %i', oWvgFont:compoundName, oWvgFont:nominalPointSize ) + #endif + RETURN nil //----------------------------------------------------------------------// diff --git a/harbour/contrib/gtwvg/wvgsysw.prg b/harbour/contrib/gtwvg/wvgsysw.prg index 44abf48d5b..a38301ac01 100644 --- a/harbour/contrib/gtwvg/wvgsysw.prg +++ b/harbour/contrib/gtwvg/wvgsysw.prg @@ -92,7 +92,6 @@ CLASS WvgSysWindow INHERIT WvgPartHandler METHOD currentPos() METHOD currentSize() - METHOD WndProc() DATA aPos INIT { 0, 0 } @@ -187,21 +186,29 @@ METHOD show() CLASS WvgSysWindow //----------------------------------------------------------------------// -METHOD setPos() CLASS WvgSysWindow +METHOD setPos( aPos ) CLASS WvgSysWindow + + Win_SetWindowPosition( ::hWnd, aPos[ 1 ], aPos[ 2 ], .f. ) RETURN Self //----------------------------------------------------------------------// METHOD currentPos() CLASS WvgSysWindow + LOCAL aRect - RETURN Self + aRect := Win_GetWindowRect( ::hWnd ) + + RETURN { aRect[ 1 ], aRect[ 2 ] } //----------------------------------------------------------------------// METHOD currentSize() CLASS WvgSysWindow + LOCAL aRect - RETURN Self + aRect := Win_GetClientRect( ::hWnd ) + + RETURN { aRect[ 3 ] - aRect[ 1 ], aRect[ 4 ] - aRect[ 2 ] } //----------------------------------------------------------------------// //----------------------------------------------------------------------// @@ -215,36 +222,48 @@ METHOD currentSize() CLASS WvgSysWindow CLASS WvgFontDialog INHERIT WvgSysWindow - DATA bitmapOnly INIT .F. - DATA buttonApply INIT .F. - DATA buttonCancel INIT .T. - DATA buttonHelp INIT .F. - DATA buttonOk INIT .T. - DATA buttonReset INIT .F. - DATA displayFilter INIT .T. - DATA familyName INIT " " - DATA fixedOnly INIT .F. - DATA name INIT .T. - DATA nominalPointSize INIT 10 - DATA outLine INIT .T. - DATA previewBGClr INIT RGB( 255,255,255 ) - DATA previewFGClr INIT RGB( 0,0,0 ) - DATA previewString INIT ' ' - DATA printerFilter INIT .T. - DATA printerPS INIT NIL - DATA proportionalOnly INIT .T. - DATA screenPS INIT NIL - DATA size INIT .T. - DATA strikeOut INIT .T. - DATA style INIT .T. - DATA synthesizeFonts INIT .T. - DATA title INIT 'Font Dialog' - DATA underscore INIT .T. - DATA vectorOnly INIT .F. - DATA vectorSizes INIT {} - DATA viewPrinterFonts INIT .F. - DATA viewScreenFonts INIT .T. + // Appearance + // + DATA title INIT '' + DATA buttonApply INIT .F. + DATA buttonCancel INIT .T. + DATA buttonHelp INIT .F. + DATA buttonOk INIT .T. + DATA buttonReset INIT .F. + DATA strikeOut INIT .T. + DATA underscore INIT .T. + // + DATA name INIT .T. + DATA style INIT .T. + DATA size INIT .T. + // + DATA displayFilter INIT .T. + DATA printerFilter INIT .T. + DATA familyName INIT " " + DATA nominalPointSize INIT 0 + + DATA bitmapOnly INIT .F. + DATA fixedOnly INIT .F. + DATA proportionalOnly INIT .T. + + + DATA outLine INIT .T. + DATA previewBGClr INIT RGB( 255,255,255 ) + DATA previewFGClr INIT RGB( 0,0,0 ) + DATA previewString INIT ' ' + DATA printerPS INIT NIL + DATA screenPS INIT NIL + + DATA synthesizeFonts INIT .T. + + DATA vectorOnly INIT .F. + DATA vectorSizes INIT {} + + DATA viewPrinterFonts INIT .F. + DATA viewScreenFonts INIT .T. + + METHOD new() METHOD create() METHOD destroy() METHOD display( nMode ) @@ -265,13 +284,346 @@ CLASS WvgFontDialog INHERIT WvgSysWindow ACCESS activateReset INLINE ::sl_activateReset ASSIGN activateReset( bBlock ) INLINE ::sl_activateReset := bBlock - DATA hFont + DATA oScreenPS + DATA oPrinterPS + DATA aPos INIT { 0, 0 } + DATA ok INIT .f. + + METHOD WndProc() + METHOD GetWvgFont() PROTECTED ENDCLASS //----------------------------------------------------------------------// +METHOD new( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialog + DEFAULT oParent TO ::oParent + DEFAULT oOwner TO ::oOwner + DEFAULT oScreenPS TO ::oScreenPS + DEFAULT oPrinterPS TO ::oPrinterPS + DEFAULT aPos TO ::aPos + ::oParent := oParent + ::oOwner := oOwner + ::oScreenPS := oScreenPS + ::oPrinterPS := oPrinterPS + ::aPos := aPos + ::WvgSysWindow:new( oParent, oOwner ) + + RETURN Self + +//----------------------------------------------------------------------// + +METHOD create( oParent, oOwner, oScreenPS, oPrinterPS, aPos ) CLASS WvgFontDialog + + DEFAULT oParent TO ::oParent + DEFAULT oOwner TO ::oOwner + DEFAULT oScreenPS TO ::oScreenPS + DEFAULT oPrinterPS TO ::oPrinterPS + DEFAULT aPos TO ::aPos + + ::oParent := oParent + ::oOwner := oOwner + ::oScreenPS := oScreenPS + ::oPrinterPS := oPrinterPS + ::aPos := aPos + + IF ::viewPrinterFonts .and. ::oPrinterPS == NIL + ::viewPrinterFonts := .f. + ENDIF + IF ( ! ::viewScreenFonts .and. ! ::viewPrinterFonts ) + ::viewScreenFonts := .t. + ENDIF + + ::WvgSysWindow:create( oParent, oOwner ) + + ::nWndProc := hb_AsCallBack( 'WNDPROC', Self ) + + RETURN Self + +//----------------------------------------------------------------------// + +METHOD wndProc( hWnd, nMessage, nwParam, nlParam ) CLASS WvgFontDialog + LOCAL aRect, nL, nH + + HB_SYMBOL_UNUSED( nlParam ) + + DO CASE + + CASE nMessage == WM_INITDIALOG + ::hWnd := hWnd + + IF !empty( ::title ) + Win_setWindowText( ::hWnd, ::title ) + ENDIF + IF !( ::buttonCancel ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,IDCANCEL ), .f. ) + ENDIF + IF !( ::buttonApply ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1026 ), .f. ) + ENDIF + IF !( ::buttonHelp ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1038 ), .f. ) + ENDIF + IF !( ::strikeOut ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1040 ), .f. ) + ENDIF + IF !( ::underscore ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1041 ), .f. ) + ENDIF + IF !( ::name ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1136 ), .f. ) + ENDIF + IF !( ::style ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1137 ), .f. ) + ENDIF + IF !( ::size ) + Win_EnableWindow( Win_GetDlgItem( ::hWnd,1138 ), .f. ) + ENDIF + + IF ::aPos[ 1 ] > 0 .OR. ::aPos[ 2 ] > 0 + 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 := Win_LoWord( nwParam ) + nH := Win_HiWord( nwParam ) + + DO CASE + + CASE nL == IDOK + ::ok := .t. + IF hb_isBlock( ::sl_activateOk ) + eval( ::sl_activateOk, ::GetWvgFont(), NIL, Self ) + ENDIF + + CASE nL == IDCANCEL + IF hb_isBlock( ::sl_activateCancel ) + eval( ::sl_activateCancel, NIL, NIL, Self ) + ENDIF + + CASE nL == 1026 + IF hb_isBlock( ::sl_activateApply ) + eval( ::sl_activateApply, ::GetWvgFont(), NIL, Self ) + ENDIF + + CASE nL == 1038 // Help + + ENDCASE + + ENDCASE + + RETURN 0 + +//----------------------------------------------------------------------// + +METHOD display( nMode ) CLASS WvgFontDialog + LOCAL hWnd, aInfo + + IF nMode == 0 + hWnd := ::oParent:hWnd + ELSE + hWnd := Win_GetDesktopWindow() + ENDIF + + ::ok := .f. + aInfo := Wvg_ChooseFont( hWnd, ::nWndProc, ::familyName, ; + ::nominalPointSize, ::viewScreenFonts, ::viewPrinterFonts ) + + IF !( ::ok ) + RETURN NIL + ENDIF + + RETURN ::GetWvgFont( aInfo ) + +//----------------------------------------------------------------------// + +METHOD destroy() CLASS WvgFontDialog + + hb_FreeCallBack( ::nWndProc ) + + RETURN Self + +//----------------------------------------------------------------------// +// Only callable from ::activateOK and ::activateApply +// +METHOD GetWvgFont( aFont ) CLASS WvgFontDialog + LOCAL oWvgFont + + DEFAULT aFont TO Wvg_ChooseFont_GetLogFont( ::hWnd ) + + oWvgFont := WvgFont():new() + + oWvgFont:familyName := aFont[ 1 ] + oWvgFont:height := aFont[ 2 ] + oWvgFont:nominalPointSize := Wvg_HeightToPointSize( /* hdc */, oWvgFont:height ) + oWvgFont:width := aFont[ 3 ] + oWvgFont:bold := aFont[ 4 ] > 400 + oWvgFont:italic := aFont[ 5 ] + oWvgFont:underscore := aFont[ 6 ] + oWvgFont:strikeOut := aFont[ 7 ] + oWvgFont:codePage := aFont[ 8 ] + oWvgFont:setCompoundName( trim( aFont[ 1 ] +' '+ IF( oWvgFont:bold, 'Bold ', '' ) + ; + IF( oWvgFont:italic, 'Italic', '' ) ) ) + oWvgFont:create() + + RETURN oWvgFont + +//----------------------------------------------------------------------// +//----------------------------------------------------------------------// +//----------------------------------------------------------------------// +// +// Class WvgFont() +// +//----------------------------------------------------------------------// +//----------------------------------------------------------------------// +//----------------------------------------------------------------------// + +CLASS WvgFont + + DATA hFont + DATA oPS + DATA hdc + + DATA familyName INIT '' + DATA height INIT 0 + DATA nominalPointSize INIT 0 + + DATA width INIT 0 + DATA widthClass INIT .F. + + DATA bold INIT .F. + DATA weightClass INIT FW_DONTCARE + + DATA italic INIT .F. + DATA strikeout INIT .F. + DATA underscore INIT .F. + DATA codePage INIT DEFAULT_CHARSET + + DATA fixed INIT .F. + DATA antiAliased INIT .F. + + DATA compoundName INIT '' + METHOD setCompoundName( cName ) INLINE ::compoundName := cName + + DATA generic INIT .T. + + DATA baseLine INIT 0 READONLY + DATA dbcs INIT .F. + DATA kerning INIT .F. + DATA mbcs INIT .F. + DATA vector INIT .F. + DATA outlined INIT .F. + + DATA aFontInfo INIT {} + + METHOD new( oPS ) + METHOD create( cFontName ) + METHOD configure( cFontName ) + METHOD list() + METHOD createFont() + + DESTRUCTOR destroy() + + ENDCLASS + +//----------------------------------------------------------------------// + +METHOD new( oPS ) CLASS WvgFont + + DEFAULT oPS TO ::oPS + + ::oPS := oPS + + RETURN Self + +//----------------------------------------------------------------------// + +METHOD create( cFontName ) CLASS WvgFont + + DEFAULT cFontName TO ::familyName + + ::familyName := cFontName + + ::createFont() + + RETURN Self + +//----------------------------------------------------------------------// + +METHOD configure( cFontName ) CLASS WvgFont + + DEFAULT cFontName TO ::familyName + + ::familyName := cFontName + + ::createFont() + + RETURN Self + +//----------------------------------------------------------------------// + +METHOD destroy() CLASS WvgFont + + IF ::hFont <> NIL + Win_DeleteObject( ::hFont ) + ENDIF + + RETURN Self + +//----------------------------------------------------------------------// + +METHOD list() CLASS WvgFont + LOCAL aList := {} + + RETURN aList + +//----------------------------------------------------------------------// + +METHOD createFont() CLASS WvgFont + LOCAL aFont + + IF ::hFont <> NIL + Win_DeleteObject( ::hFont ) + ::hFont := NIL + ENDIF + + IF ::oPS <> NIL + ::height := Wvg_PointSizeToHeight( ::oPS:hdc, ::nominalPointSize ) + ENDIF + + ::aFontInfo := array( 15 ) + + ::aFontInfo[ 1 ] := ::familyName + ::aFontInfo[ 2 ] := ::height + ::aFontInfo[ 3 ] := ::width + ::aFontInfo[ 4 ] := IF( ::bold, FW_BOLD, 0 ) + ::aFontInfo[ 5 ] := ::italic + ::aFontInfo[ 6 ] := ::underscore + ::aFontInfo[ 7 ] := ::strikeout + ::aFontInfo[ 8 ] := ::codePage + ::aFontInfo[ 9 ] := 0 + ::aFontInfo[ 10 ] := 0 + ::aFontInfo[ 11 ] := 0 + ::aFontInfo[ 12 ] := 0 + ::aFontInfo[ 13 ] := DEFAULT_QUALITY + ::aFontInfo[ 14 ] := NIL + + aFont := Wvg_FontCreate( ::aFontInfo ) + + IF empty( aFont[ 1 ] ) + RETURN nil + ENDIF + + ::hFont := aFont[ 15 ] + ::aFontInfo := aFont + + RETURN ::hFont + +//----------------------------------------------------------------------// diff --git a/harbour/contrib/gtwvg/wvgwin.c b/harbour/contrib/gtwvg/wvgwin.c index 70c9f1293e..998782016f 100644 --- a/harbour/contrib/gtwvg/wvgwin.c +++ b/harbour/contrib/gtwvg/wvgwin.c @@ -518,6 +518,13 @@ HB_FUNC( WIN_MOVEWINDOW ) //-------------------------------------------------------------------// +HB_FUNC( WIN_GETDESKTOPWINDOW ) +{ + wvg_rethandle( GetDesktopWindow() ); +} + +//----------------------------------------------------------------------// + HB_FUNC( WIN_SETPARENT ) { hb_retnint( ( HB_PTRDIFF ) SetParent( (HWND) ( HB_PTRDIFF ) hb_parnint( 1 ), (HWND) ( HB_PTRDIFF ) hb_parnint( 2 ) ) ); @@ -539,6 +546,15 @@ HB_FUNC( WIN_SETFOREGROUNDWINDOW ) //----------------------------------------------------------------------// +HB_FUNC( WIN_SETWINDOWTEXT ) +{ + LPTSTR text = HB_TCHAR_CONVTO( hb_parc( 2 ) ); + SetWindowText( wvg_parhwnd( 1 ), text ); + HB_TCHAR_FREE( text ); +} + +//----------------------------------------------------------------------// + HB_FUNC( WIN_SETWINDOWLONG ) { hb_retnl( SetWindowLong( ( HWND ) ( HB_PTRDIFF ) hb_parnint( 1 ), hb_parni( 2 ), hb_parnl( 3 ) ) ); @@ -1811,3 +1827,222 @@ HB_FUNC( WIN_SETWINDOWPOSANDSIZE ) } //----------------------------------------------------------------------// +// WvgFontDialog() +//----------------------------------------------------------------------// + +PHB_ITEM wvg_logfontTOarray( LPLOGFONT lf, BOOL bEmpty ) +{ + PHB_ITEM aFont = hb_itemNew( NULL ); + hb_arrayNew( aFont, 15 ); + + if( bEmpty ) + { + hb_arraySetC( aFont , 1, "" ); + hb_arraySetNL( aFont, 2, 0 ); + hb_arraySetNL( aFont, 3, 0 ); + hb_arraySetNL( aFont, 4, 0 ); + hb_arraySetL( aFont, 5, 0 ); + hb_arraySetL( aFont, 6, 0 ); + hb_arraySetL( aFont, 7, 0 ); + hb_arraySetNI( aFont, 8, 0 ); + hb_arraySetNI( aFont, 9, 0 ); + hb_arraySetNI( aFont, 10, 0 ); + hb_arraySetNI( aFont, 11, 0 ); + hb_arraySetNI( aFont, 12, 0 ); + hb_arraySetNI( aFont, 13, 0 ); + hb_arraySetNI( aFont, 14, 0 ); + hb_arraySetNInt( aFont,15, 0 ); + } + else + { + char *szFaceName = HB_TCHAR_CONVFROM( lf->lfFaceName ); + + hb_arraySetC( aFont, 1, szFaceName ); + hb_arraySetNL( aFont, 2, lf->lfHeight ); + hb_arraySetNL( aFont, 3, lf->lfWidth ); + hb_arraySetNL( aFont, 4, lf->lfWeight ); + hb_arraySetL( aFont, 5, lf->lfItalic ); + hb_arraySetL( aFont, 6, lf->lfUnderline ); + hb_arraySetL( aFont, 7, lf->lfStrikeOut ); + hb_arraySetNI( aFont, 8, lf->lfCharSet ); + hb_arraySetNI( aFont, 9, lf->lfEscapement ); + hb_arraySetNI( aFont, 10, lf->lfOrientation ); + hb_arraySetNI( aFont, 11, lf->lfOutPrecision ); + hb_arraySetNI( aFont, 12, lf->lfClipPrecision ); + hb_arraySetNI( aFont, 13, lf->lfQuality ); + hb_arraySetNI( aFont, 14, lf->lfPitchAndFamily ); + + HB_TCHAR_FREE( szFaceName ); + } + + return( aFont ); +} + +//----------------------------------------------------------------------// +// Wvg_ChooseFont( hWnd, nWndProc, familyName, nominalPointSize, ; +// viewScreenFonts, viewPrinterFonts ) +// +HB_FUNC( WVG_CHOOSEFONT ) +{ + CHOOSEFONT cf; // = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; + LOGFONT lf; // = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; + DWORD Flags; + LONG PointSize = 0; + HWND hWnd = wvg_parhwnd( 1 ); + TCHAR szStyle[ MAX_PATH + 1 ]; + + if ( ISCHAR( 3 ) ) + { + HB_TCHAR_CPTO( lf.lfFaceName, hb_parc( 3 ), sizeof( lf.lfFaceName ) - 1 ); + } + if ( ( ! ISNIL( 4 ) ) && hb_parnl( 4 ) ) + { + HDC hdc = GetDC( hWnd ); + PointSize = -MulDiv( ( LONG ) hb_parnl( 4 ), GetDeviceCaps( hdc, LOGPIXELSY ), 72 ) ; + ReleaseDC( hWnd, hdc ); + } + lf.lfHeight = PointSize; + lf.lfWidth = 0; + lf.lfWeight = 0; + lf.lfItalic = 0; + lf.lfUnderline = 0; + lf.lfStrikeOut = 0; + lf.lfCharSet = DEFAULT_CHARSET; + lf.lfQuality = DEFAULT_QUALITY; + lf.lfPitchAndFamily = FF_DONTCARE; + + Flags = CF_EFFECTS | CF_SHOWHELP | CF_APPLY | CF_INITTOLOGFONTSTRUCT | CF_ENABLEHOOK; + + #if 0 + Flags = Flags | CF_TTONLY; + Flags = Flags | CF_FIXEDPITCHONLY; + Flags = Flags | CF_SCALABLEONLY; + Flags = Flags | CF_NOVECTORFONTS; + Flags = Flags | CF_NOSCRIPTSEL; + Flags = Flags | CF_NOSIMULATIONS; // ::synthesizeFonts == .f. + #endif + + if( ISLOG( 5 ) && hb_parl( 5 ) ) + Flags = Flags | CF_SCREENFONTS; + if( ISLOG( 6 ) && hb_parl( 6 ) ) + Flags = Flags | CF_PRINTERFONTS; + + cf.lStructSize = sizeof( CHOOSEFONT ); + cf.hwndOwner = hWnd; + cf.hDC = ( HDC ) NULL; // only when ::oPrinterPS is defined + cf.lpLogFont = &lf; + cf.iPointSize = PointSize; + cf.Flags = Flags; + cf.rgbColors = RGB( 0,0,0 ); + cf.lCustData = 0L; + cf.lpfnHook = ( LPCFHOOKPROC ) wvg_parwndproc( 2 ); + cf.lpTemplateName = ( LPTSTR ) NULL; + cf.hInstance = ( HINSTANCE ) NULL; + cf.lpszStyle = ( LPTSTR ) szStyle; + cf.nFontType = SCREEN_FONTTYPE; // ?? + cf.nSizeMin = 0; + cf.nSizeMax = 0; + + if ( ChooseFont( &cf ) ) + { + PHB_ITEM aFont = wvg_logfontTOarray( &lf, FALSE ); + PHB_ITEM aInfo = hb_itemNew( NULL ); + + hb_arrayNew( aInfo, 4 ); + hb_arraySetNI( aInfo, 1, cf.iPointSize ); + hb_arraySetNInt( aInfo, 2, cf.rgbColors ); + hb_arraySetNI( aInfo, 3, cf.nFontType ); + { + char * szText = HB_TCHAR_CONVFROM( cf.lpszStyle ); + hb_arraySetC( aInfo, 4, szText ); + HB_TCHAR_FREE( szText ); + } + hb_arraySet( aFont, 15, aInfo ); + + hb_itemReturnRelease( aFont ); + hb_itemRelease( aInfo ); + } +} + +//----------------------------------------------------------------------// + +HB_FUNC( WVG_CHOOSEFONT_GETLOGFONT ) +{ + LOGFONT lf; + PHB_ITEM aFont; + + memset( &lf, 0, sizeof( LOGFONT ) ); + + SendMessage( wvg_parhwnd( 1 ), WM_CHOOSEFONT_GETLOGFONT, ( WPARAM ) 0, ( LPARAM ) &lf ); + + aFont = wvg_logfontTOarray( &lf, FALSE ); + + hb_itemReturnRelease( aFont ); +} + +//----------------------------------------------------------------------// + +HB_FUNC( WVG_FONTCREATE ) +{ + LOGFONT lf; + HFONT hFont; + + memset( &lf, 0, sizeof( LOGFONT ) ); + + HB_TCHAR_CPTO( lf.lfFaceName, hb_parc( 1, 1 ), sizeof( lf.lfFaceName ) - 1 ); + lf.lfHeight = ( LONG ) hb_parnl( 1, 2 ); + lf.lfWidth = ( LONG ) hb_parnl( 1, 3 ); + lf.lfWeight = ( LONG ) hb_parnl( 1, 4 ); + lf.lfItalic = ( BYTE ) hb_parl( 1, 5 ); + lf.lfUnderline = ( BYTE ) hb_parl( 1, 6 ); + lf.lfStrikeOut = ( BYTE ) hb_parl( 1, 7 ); + lf.lfCharSet = ( BYTE ) hb_parni( 1, 8 ); + lf.lfEscapement = ( BYTE ) hb_parni( 1, 9 ); + lf.lfOrientation = ( BYTE ) hb_parni( 1,10 ); + lf.lfOutPrecision = ( BYTE ) hb_parni( 1,11 ); + lf.lfClipPrecision = ( BYTE ) hb_parni( 1,12 ); + lf.lfQuality = ( BYTE ) hb_parni( 1,13 ); + lf.lfPitchAndFamily = ( BYTE ) hb_parni( 1,14 ); + + hFont = CreateFontIndirect( &lf ); + + if( hFont ) + { + PHB_ITEM aFont = wvg_logfontTOarray( &lf, FALSE ); + hb_arraySetNInt( aFont, 15, ( HB_PTRDIFF ) hFont ); + hb_itemReturnRelease( aFont ); + } + else + { + PHB_ITEM aFont = wvg_logfontTOarray( &lf, TRUE ); + hb_itemReturnRelease( aFont ); + } +} + +//----------------------------------------------------------------------// +// Wvg_PointSizeToHeight( hdc, nPointSize ) +// +HB_FUNC( WVG_POINTSIZETOHEIGHT ) +{ + HDC hdc = ISNIL( 1 ) ? GetDC( GetDesktopWindow() ) : wvg_parhdc( 1 ); + + hb_retnl( ( LONG ) -MulDiv( ( LONG ) hb_parnl( 2 ), GetDeviceCaps( hdc, LOGPIXELSY ), 72 ) ) ; + + if( ISNIL( 1 ) ) + ReleaseDC( GetDesktopWindow(), hdc ); +} + +//----------------------------------------------------------------------// +// Wvg_HeightToPointSize( hdc, nHeight ) +// +HB_FUNC( WVG_HEIGHTTOPOINTSIZE ) +{ + HDC hdc = ISNIL( 1 ) ? GetDC( GetDesktopWindow() ) : wvg_parhdc( 1 ); + + hb_retnl( ( LONG ) -MulDiv( hb_parnl( 2 ), 72, GetDeviceCaps( hdc, LOGPIXELSY ) ) ) ; + + if( ISNIL( 1 ) ) + ReleaseDC( GetDesktopWindow(), hdc ); +} + +//----------------------------------------------------------------------// diff --git a/harbour/contrib/gtwvg/wvtwin.ch b/harbour/contrib/gtwvg/wvtwin.ch index 265337c562..b2cf1b834c 100644 --- a/harbour/contrib/gtwvg/wvtwin.ch +++ b/harbour/contrib/gtwvg/wvtwin.ch @@ -66,15 +66,15 @@ // // Wvt_DrawButton() constants // -#define WVT_BTN_FORMAT_RAISED 0 // Default -#define WVT_BTN_FORMAT_RECESSED 1 -#define WVT_BTN_FORMAT_FLAT 2 -#define WVT_BTN_FORMAT_OUTLINED 3 +#define WVT_BTN_FORMAT_RAISED 0 // Default +#define WVT_BTN_FORMAT_RECESSED 1 +#define WVT_BTN_FORMAT_FLAT 2 +#define WVT_BTN_FORMAT_OUTLINED 3 -#define WVT_BTN_IMAGE_TOP 0 // Default -#define WVT_BTN_IMAGE_LEFT 1 -#define WVT_BTN_IMAGE_BOTTOM 2 -#define WVT_BTN_IMAGE_RIGHT 3 +#define WVT_BTN_IMAGE_TOP 0 // Default +#define WVT_BTN_IMAGE_LEFT 1 +#define WVT_BTN_IMAGE_BOTTOM 2 +#define WVT_BTN_IMAGE_RIGHT 3 //-------------------------------------------------------------------// // @@ -82,122 +82,122 @@ // nAlign, nStyle, nThick, nColor ) // // nOrient -#define WVT_LINE_HORZ 0 // Default -#define WVT_LINE_VERT 1 +#define WVT_LINE_HORZ 0 // Default +#define WVT_LINE_VERT 1 // nFormat -#define WVT_LINE_RAISED 0 // Default -#define WVT_LINE_RECESSED 1 -#define WVT_LINE_PLAIN 2 +#define WVT_LINE_RAISED 0 // Default +#define WVT_LINE_RECESSED 1 +#define WVT_LINE_PLAIN 2 // nAlign -#define WVT_LINE_CENTER 0 // Default -#define WVT_LINE_TOP 1 -#define WVT_LINE_BOTTOM 2 -#define WVT_LINE_LEFT 3 -#define WVT_LINE_RIGHT 4 +#define WVT_LINE_CENTER 0 // Default +#define WVT_LINE_TOP 1 +#define WVT_LINE_BOTTOM 2 +#define WVT_LINE_LEFT 3 +#define WVT_LINE_RIGHT 4 // nStyle -#define WVT_LINE_SOLID 0 // Default -#define WVT_LINE_DASH 1 -#define WVT_LINE_DOT 2 -#define WVT_LINE_DASHDOT 3 -#define WVT_LINE_DASHDOTDOT 4 +#define WVT_LINE_SOLID 0 // Default +#define WVT_LINE_DASH 1 +#define WVT_LINE_DOT 2 +#define WVT_LINE_DASHDOT 3 +#define WVT_LINE_DASHDOTDOT 4 //-------------------------------------------------------------------// // // Standard Mouse Pointer Shape Constants // -#define WVT_IDC_ARROW 1 -#define WVT_IDC_IBEAM 2 -#define WVT_IDC_WAIT 3 -#define WVT_IDC_CROSS 4 -#define WVT_IDC_UPARROW 5 -#define WVT_IDC_SIZE 6 -#define WVT_IDC_ICON 7 -#define WVT_IDC_SIZENWSE 8 -#define WVT_IDC_SIZENESW 9 -#define WVT_IDC_SIZEWE 10 -#define WVT_IDC_SIZENS 11 -#define WVT_IDC_SIZEALL 12 -#define WVT_IDC_NO 13 -#define WVT_IDC_HAND 14 -#define WVT_IDC_APPSTARTING 15 -#define WVT_IDC_HELP 16 +#define WVT_IDC_ARROW 1 +#define WVT_IDC_IBEAM 2 +#define WVT_IDC_WAIT 3 +#define WVT_IDC_CROSS 4 +#define WVT_IDC_UPARROW 5 +#define WVT_IDC_SIZE 6 +#define WVT_IDC_ICON 7 +#define WVT_IDC_SIZENWSE 8 +#define WVT_IDC_SIZENESW 9 +#define WVT_IDC_SIZEWE 10 +#define WVT_IDC_SIZENS 11 +#define WVT_IDC_SIZEALL 12 +#define WVT_IDC_NO 13 +#define WVT_IDC_HAND 14 +#define WVT_IDC_APPSTARTING 15 +#define WVT_IDC_HELP 16 //-------------------------------------------------------------------// -#define WVT_BLOCK_IMAGE 1 -#define WVT_BLOCK_BOX 2 -#define WVT_BLOCK_LABEL 3 -#define WVT_BLOCK_GRID_V 4 -#define WVT_BLOCK_GRID_H 5 -#define WVT_BLOCK_BUTTON 6 -#define WVT_BLOCK_GETS 7 -#define WVT_BLOCK_LINE 8 -#define WVT_BLOCK_STATUSBAR 9 -#define WVT_BLOCK_TOOLBAR 10 -#define WVT_BLOCK_STATIC 11 +#define WVT_BLOCK_IMAGE 1 +#define WVT_BLOCK_BOX 2 +#define WVT_BLOCK_LABEL 3 +#define WVT_BLOCK_GRID_V 4 +#define WVT_BLOCK_GRID_H 5 +#define WVT_BLOCK_BUTTON 6 +#define WVT_BLOCK_GETS 7 +#define WVT_BLOCK_LINE 8 +#define WVT_BLOCK_STATUSBAR 9 +#define WVT_BLOCK_TOOLBAR 10 +#define WVT_BLOCK_STATIC 11 //-------------------------------------------------------------------// -#define DLG_OBJ_BROWSE 1 -#define DLG_OBJ_PICTURE 2 -#define DLG_OBJ_LINE 3 -#define DLG_OBJ_RECT 4 -#define DLG_OBJ_GETS 5 -#define DLG_OBJ_BUTTON 6 -#define DLG_OBJ_STATUSBAR 7 -#define DLG_OBJ_PANEL 8 -#define DLG_OBJ_LABEL 9 -#define DLG_OBJ_STATIC 10 -#define DLG_OBJ_TOOLBAR 11 -#define DLG_OBJ_IMAGE 12 -#define DLG_OBJ_PUSHBUTTON 13 -#define DLG_OBJ_CONSOLE 14 -#define DLG_OBJ_SCROLLBAR 15 -#define DLG_OBJ_BANNER 16 -#define DLG_OBJ_TEXTBOX 17 -#define DLG_OBJ_PROGRESSBAR 18 +#define DLG_OBJ_BROWSE 1 +#define DLG_OBJ_PICTURE 2 +#define DLG_OBJ_LINE 3 +#define DLG_OBJ_RECT 4 +#define DLG_OBJ_GETS 5 +#define DLG_OBJ_BUTTON 6 +#define DLG_OBJ_STATUSBAR 7 +#define DLG_OBJ_PANEL 8 +#define DLG_OBJ_LABEL 9 +#define DLG_OBJ_STATIC 10 +#define DLG_OBJ_TOOLBAR 11 +#define DLG_OBJ_IMAGE 12 +#define DLG_OBJ_PUSHBUTTON 13 +#define DLG_OBJ_CONSOLE 14 +#define DLG_OBJ_SCROLLBAR 15 +#define DLG_OBJ_BANNER 16 +#define DLG_OBJ_TEXTBOX 17 +#define DLG_OBJ_PROGRESSBAR 18 //-------------------------------------------------------------------// -#define TLB_BUTTON_TYPE_IMAGE 0 -#define TLB_BUTTON_TYPE_SEPARATOR 1 -#define TLB_BUTTON_TYPE_TEXT 2 +#define TLB_BUTTON_TYPE_IMAGE 0 +#define TLB_BUTTON_TYPE_SEPARATOR 1 +#define TLB_BUTTON_TYPE_TEXT 2 //-------------------------------------------------------------------// -#define WVT_STATIC_LINE 1 -#define WVT_STATIC_BOXRAISED 2 -#define WVT_STATIC_BOXRECESSED 3 -#define WVT_STATIC_BOXGROUP 4 -#define WVT_STATIC_BOXGROUPRAISED 5 -#define WVT_STATIC_RECTANGLE 6 -#define WVT_STATIC_ROUNDRECT 7 -#define WVT_STATIC_FOCUSRECT 8 -#define WVT_STATIC_OUTLINE 9 -#define WVT_STATIC_ELLIPSE 10 -#define WVT_STATIC_SHADEDRECT 11 +#define WVT_STATIC_LINE 1 +#define WVT_STATIC_BOXRAISED 2 +#define WVT_STATIC_BOXRECESSED 3 +#define WVT_STATIC_BOXGROUP 4 +#define WVT_STATIC_BOXGROUPRAISED 5 +#define WVT_STATIC_RECTANGLE 6 +#define WVT_STATIC_ROUNDRECT 7 +#define WVT_STATIC_FOCUSRECT 8 +#define WVT_STATIC_OUTLINE 9 +#define WVT_STATIC_ELLIPSE 10 +#define WVT_STATIC_SHADEDRECT 11 -#define WVT_SCROLLBAR_VERT 1 -#define WVT_SCROLLBAR_HORZ 2 +#define WVT_SCROLLBAR_VERT 1 +#define WVT_SCROLLBAR_HORZ 2 -#define WVT_SCROLLBUTTON_TOP 1 -#define WVT_SCROLLBUTTON_LEFT 2 -#define WVT_SCROLLBUTTON_BOTTOM 3 -#define WVT_SCROLLBUTTON_RIGHT 4 -#define WVT_SCROLL_THUMB 5 +#define WVT_SCROLLBUTTON_TOP 1 +#define WVT_SCROLLBUTTON_LEFT 2 +#define WVT_SCROLLBUTTON_BOTTOM 3 +#define WVT_SCROLLBUTTON_RIGHT 4 +#define WVT_SCROLL_THUMB 5 //-------------------------------------------------------------------// // // wvtmenu defines . Peter Rees // -#define WVT_MENU_TYPE 1 -#define WVT_MENU_IDENTIFIER 2 -#define WVT_MENU_CAPTION 3 -#define WVT_MENU_ACTION 4 -#define WVT_MENU_MENUOBJ 4 +#define WVT_MENU_TYPE 1 +#define WVT_MENU_IDENTIFIER 2 +#define WVT_MENU_CAPTION 3 +#define WVT_MENU_ACTION 4 +#define WVT_MENU_MENUOBJ 4 //-------------------------------------------------------------------// @@ -211,947 +211,975 @@ // // Menu Manipulation Constants // -#define MF_INSERT 0 -#define MF_CHANGE 128 -#define MF_APPEND 256 -#define MF_DELETE 512 -#define MF_REMOVE 4096 +#define MF_INSERT 0 +#define MF_CHANGE 128 +#define MF_APPEND 256 +#define MF_DELETE 512 +#define MF_REMOVE 4096 -#define MF_BYCOMMAND 0 -#define MF_BYPOSITION 1024 +#define MF_BYCOMMAND 0 +#define MF_BYPOSITION 1024 -#define MF_SEPARATOR 2048 +#define MF_SEPARATOR 2048 -#define MF_ENABLED 0 -#define MF_GRAYED 1 -#define MF_DISABLED 2 +#define MF_ENABLED 0 +#define MF_GRAYED 1 +#define MF_DISABLED 2 -#define MF_UNCHECKED 0 -#define MF_CHECKED 8 -#define MF_USECHECKBITMAPS 512 +#define MF_UNCHECKED 0 +#define MF_CHECKED 8 +#define MF_USECHECKBITMAPS 512 -#define MF_STRING 0 -#define MF_BITMAP 4 -#define MF_OWNERDRAW 256 +#define MF_STRING 0 +#define MF_BITMAP 4 +#define MF_OWNERDRAW 256 -#define MF_POPUP 16 -#define MF_MENUBARBREAK 32 -#define MF_MENUBREAK 64 +#define MF_POPUP 16 +#define MF_MENUBARBREAK 32 +#define MF_MENUBREAK 64 -#define MF_UNHILITE 0 -#define MF_HILITE 128 +#define MF_UNHILITE 0 +#define MF_HILITE 128 //-------------------------------------------------------------------// -#define TPM_LEFTBUTTON 0x0000 -#define TPM_RIGHTBUTTON 0x0002 +#define TPM_LEFTBUTTON 0x0000 +#define TPM_RIGHTBUTTON 0x0002 -#define TPM_LEFTALIGN 0x0000 -#define TPM_CENTERALIGN 0x0004 -#define TPM_RIGHTALIGN 0x0008 +#define TPM_LEFTALIGN 0x0000 +#define TPM_CENTERALIGN 0x0004 +#define TPM_RIGHTALIGN 0x0008 -#define TPM_TOPALIGN 0x0000 -#define TPM_VCENTERALIGN 0x0010 -#define TPM_BOTTOMALIGN 0x0020 +#define TPM_TOPALIGN 0x0000 +#define TPM_VCENTERALIGN 0x0010 +#define TPM_BOTTOMALIGN 0x0020 -#define TPM_HORIZONTAL 0x0000 /* Horz alignment matters more */ -#define TPM_VERTICAL 0x0040 /* Vert alignment matters more */ -#define TPM_NONOTIFY 0x0080 /* Don't send any notification msgs */ -#define TPM_RETURNCMD 0x0100 +#define TPM_HORIZONTAL 0x0000 /* Horz alignment matters more */ +#define TPM_VERTICAL 0x0040 /* Vert alignment matters more */ +#define TPM_NONOTIFY 0x0080 /* Don't send any notification msgs */ +#define TPM_RETURNCMD 0x0100 //-------------------------------------------------------------------// //-------------------------------------------------------------------// /* * ShowWindow() Commands */ -#define SW_HIDE 0 -#define SW_SHOWNORMAL 1 -#define SW_NORMAL 1 -#define SW_SHOWMINIMIZED 2 -#define SW_SHOWMAXIMIZED 3 -#define SW_MAXIMIZE 3 -#define SW_SHOWNOACTIVATE 4 -#define SW_SHOW 5 -#define SW_MINIMIZE 6 -#define SW_SHOWMINNOACTIVE 7 -#define SW_SHOWNA 8 -#define SW_RESTORE 9 -#define SW_SHOWDEFAULT 10 -#define SW_FORCEMINIMIZE 11 -#define SW_MAX 11 +#define SW_HIDE 0 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SW_SHOWMINIMIZED 2 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SW_SHOWNOACTIVATE 4 +#define SW_SHOW 5 +#define SW_MINIMIZE 6 +#define SW_SHOWMINNOACTIVE 7 +#define SW_SHOWNA 8 +#define SW_RESTORE 9 +#define SW_SHOWDEFAULT 10 +#define SW_FORCEMINIMIZE 11 +#define SW_MAX 11 //-------------------------------------------------------------------// //-------------------------------------------------------------------// /* * Window Messages */ -#define WM_USER 1024 +#define WM_USER 1024 -#define WM_CREATE 1 -#define WM_DESTROY 2 -#define WM_MOVE 3 -#define WM_SIZE 5 -#define WM_ACTIVATE 6 -#define WM_SETFOCUS 7 -#define WM_KILLFOCUS 8 -#define WM_ENABLE 10 -#define WM_SETREDRAW 11 -#define WM_SETTEXT 12 -#define WM_GETTEXT 13 -#define WM_GETTEXTLENGTH 14 -#define WM_PAINT 15 -#define WM_CLOSE 16 // 0x0010 -#define WM_QUIT 18 // 0x0012 -#define WM_ERASEBKGND 20 // 0x0014 -#define WM_SYSCOLORCHANGE 21 // 0x0015 -#define WM_SHOWWINDOW 24 // 0x0018 -#define WM_WININICHANGE 26 // 0x001A -#define WM_DEVMODECHANGE 27 // 0x001B -#define WM_ACTIVATEAPP 28 // 0x001C -#define WM_FONTCHANGE 29 // 0x001D -#define WM_TIMECHANGE 30 // 0x001E -#define WM_CANCELMODE 31 // 0x001F -#define WM_SETCURSOR 32 // 0x0020 -#define WM_MOUSEACTIVATE 33 // 0x0021 -#define WM_CHILDACTIVATE 34 // 0x0022 -#define WM_QUEUESYNC 35 // 0x0023 -#define WM_GETMINMAXINFO 36 +#define WM_CREATE 1 +#define WM_DESTROY 2 +#define WM_MOVE 3 +#define WM_SIZE 5 +#define WM_ACTIVATE 6 +#define WM_SETFOCUS 7 +#define WM_KILLFOCUS 8 +#define WM_ENABLE 10 +#define WM_SETREDRAW 11 +#define WM_SETTEXT 12 +#define WM_GETTEXT 13 +#define WM_GETTEXTLENGTH 14 +#define WM_PAINT 15 +#define WM_CLOSE 16 // 0x0010 +#define WM_QUIT 18 // 0x0012 +#define WM_ERASEBKGND 20 // 0x0014 +#define WM_SYSCOLORCHANGE 21 // 0x0015 +#define WM_SHOWWINDOW 24 // 0x0018 +#define WM_WININICHANGE 26 // 0x001A +#define WM_DEVMODECHANGE 27 // 0x001B +#define WM_ACTIVATEAPP 28 // 0x001C +#define WM_FONTCHANGE 29 // 0x001D +#define WM_TIMECHANGE 30 // 0x001E +#define WM_CANCELMODE 31 // 0x001F +#define WM_SETCURSOR 32 // 0x0020 +#define WM_MOUSEACTIVATE 33 // 0x0021 +#define WM_CHILDACTIVATE 34 // 0x0022 +#define WM_QUEUESYNC 35 // 0x0023 +#define WM_GETMINMAXINFO 36 -#define WM_PAINTICON 38 -#define WM_ICONERASEBKGND 39 -#define WM_NEXTDLGCTL 40 -#define WM_SPOOLERSTATUS 42 -#define WM_DRAWITEM 43 // 0x002B -#define WM_MEASUREITEM 44 -#define WM_DELETEITEM 45 -#define WM_VKEYTOITEM 46 -#define WM_CHARTOITEM 47 -#define WM_SETFONT 48 -#define WM_GETFONT 49 -#define WM_SETHOTKEY 50 -#define WM_GETHOTKEY 51 -#define WM_QUERYDRAGICON 55 -#define WM_COMPAREITEM 57 -#define WM_GETOBJECT 61 -#define WM_COMPACTING 65 // 0x0041 -#define WM_COMMNOTIFY 68 // 0x0044 /* no longer suported */ -#define WM_WINDOWPOSCHANGING 70 // 0x0046 -#define WM_WINDOWPOSCHANGED 71 // 0x0047 -#define WM_POWER 72 -#define WM_NOTIFY 78 // 0x004E -#define WM_INPUTLANGCHANGEREQUEST 79 // 0x0050 -#define WM_INPUTLANGCHANGE 80 // 0x0051 -#define WM_TCARD 81 // 0x0052 -#define WM_HELP 82 // 0x0053 -#define WM_USERCHANGED 83 // 0x0054 -#define WM_NOTIFYFORMAT 84 // 0x0055 +#define WM_PAINTICON 38 +#define WM_ICONERASEBKGND 39 +#define WM_NEXTDLGCTL 40 +#define WM_SPOOLERSTATUS 42 +#define WM_DRAWITEM 43 // 0x002B +#define WM_MEASUREITEM 44 +#define WM_DELETEITEM 45 +#define WM_VKEYTOITEM 46 +#define WM_CHARTOITEM 47 +#define WM_SETFONT 48 +#define WM_GETFONT 49 +#define WM_SETHOTKEY 50 +#define WM_GETHOTKEY 51 +#define WM_QUERYDRAGICON 55 +#define WM_COMPAREITEM 57 +#define WM_GETOBJECT 61 +#define WM_COMPACTING 65 // 0x0041 +#define WM_COMMNOTIFY 68 // 0x0044 /* no longer suported */ +#define WM_WINDOWPOSCHANGING 70 // 0x0046 +#define WM_WINDOWPOSCHANGED 71 // 0x0047 +#define WM_POWER 72 +#define WM_NOTIFY 78 // 0x004E +#define WM_INPUTLANGCHANGEREQUEST 79 // 0x0050 +#define WM_INPUTLANGCHANGE 80 // 0x0051 +#define WM_TCARD 81 // 0x0052 +#define WM_HELP 82 // 0x0053 +#define WM_USERCHANGED 83 // 0x0054 +#define WM_NOTIFYFORMAT 84 // 0x0055 -#define WM_CONTEXTMENU 123 // 0x007B -#define WM_STYLECHANGING 124 // 0x007C -#define WM_STYLECHANGED 125 // 0x007D -#define WM_DISPLAYCHANGE 126 // 0x007E -#define WM_GETICON 127 // 0x007F -#define WM_SETICON 128 // 0x0080 +#define WM_CONTEXTMENU 123 // 0x007B +#define WM_STYLECHANGING 124 // 0x007C +#define WM_STYLECHANGED 125 // 0x007D +#define WM_DISPLAYCHANGE 126 // 0x007E +#define WM_GETICON 127 // 0x007F +#define WM_SETICON 128 // 0x0080 -#define WM_NCCREATE 129 -#define WM_NCDESTROY 130 -#define WM_NCCALCSIZE 131 -#define WM_NCHITTEST 132 -#define WM_NCPAINT 133 -#define WM_NCACTIVATE 134 -#define WM_GETDLGCODE 135 +#define WM_NCCREATE 129 +#define WM_NCDESTROY 130 +#define WM_NCCALCSIZE 131 +#define WM_NCHITTEST 132 +#define WM_NCPAINT 133 +#define WM_NCACTIVATE 134 +#define WM_GETDLGCODE 135 -#define WM_NCMOUSEMOVE 160 -#define WM_NCLBUTTONDOWN 161 -#define WM_NCLBUTTONUP 162 -#define WM_NCLBUTTONDBLCLK 163 -#define WM_NCRBUTTONDOWN 164 -#define WM_NCRBUTTONUP 165 -#define WM_NCRBUTTONDBLCLK 166 -#define WM_NCMBUTTONDOWN 167 -#define WM_NCMBUTTONUP 168 -#define WM_NCMBUTTONDBLCLK 169 +#define WM_NCMOUSEMOVE 160 +#define WM_NCLBUTTONDOWN 161 +#define WM_NCLBUTTONUP 162 +#define WM_NCLBUTTONDBLCLK 163 +#define WM_NCRBUTTONDOWN 164 +#define WM_NCRBUTTONUP 165 +#define WM_NCRBUTTONDBLCLK 166 +#define WM_NCMBUTTONDOWN 167 +#define WM_NCMBUTTONUP 168 +#define WM_NCMBUTTONDBLCLK 169 -#define WM_KEYDOWN 256 // 0x0100 -#define WM_KEYUP 257 // 0x0101 +#define WM_KEYDOWN 256 // 0x0100 +#define WM_KEYUP 257 // 0x0101 -#define WM_KEYFIRST 256 -#define WM_CHAR 258 -#define WM_DEADCHAR 259 -#define WM_SYSKEYDOWN 260 -#define WM_SYSKEYUP 261 -#define WM_SYSCHAR 262 -#define WM_SYSDEADCHAR 263 -#define WM_KEYLAST 264 +#define WM_KEYFIRST 256 +#define WM_CHAR 258 +#define WM_DEADCHAR 259 +#define WM_SYSKEYDOWN 260 +#define WM_SYSKEYUP 261 +#define WM_SYSCHAR 262 +#define WM_SYSDEADCHAR 263 +#define WM_KEYLAST 264 -#define WM_INITDIALOG 272 -#define WM_COMMAND 273 -#define WM_SYSCOMMAND 274 -#define WM_TIMER 275 -#define WM_HSCROLL 276 -#define WM_VSCROLL 277 +#define WM_INITDIALOG 272 +#define WM_COMMAND 273 +#define WM_SYSCOMMAND 274 +#define WM_TIMER 275 +#define WM_HSCROLL 276 +#define WM_VSCROLL 277 -#define WM_INITMENUPOPUP 279 -#define WM_MENUSELECT 287 -#define WM_MENUCOMMAND 294 +#define WM_INITMENUPOPUP 279 +#define WM_MENUSELECT 287 +#define WM_MENUCOMMAND 294 -#define WM_CTLCOLORMSGBOX 306 -#define WM_CTLCOLOREDIT 307 -#define WM_CTLCOLORLISTBOX 308 -#define WM_CTLCOLORBTN 309 -#define WM_CTLCOLORDLG 310 -#define WM_CTLCOLORSCROLLBAR 311 -#define WM_CTLCOLORSTATIC 312 +#define WM_CTLCOLORMSGBOX 306 +#define WM_CTLCOLOREDIT 307 +#define WM_CTLCOLORLISTBOX 308 +#define WM_CTLCOLORBTN 309 +#define WM_CTLCOLORDLG 310 +#define WM_CTLCOLORSCROLLBAR 311 +#define WM_CTLCOLORSTATIC 312 -#define WM_MOUSEFIRST 512 -#define WM_MOUSEMOVE 512 -#define WM_LBUTTONDOWN 513 -#define WM_LBUTTONUP 514 -#define WM_LBUTTONDBLCLK 515 -#define WM_RBUTTONDOWN 516 -#define WM_RBUTTONUP 517 -#define WM_RBUTTONDBLCLK 518 -#define WM_MBUTTONDOWN 519 -#define WM_MBUTTONUP 520 -#define WM_MBUTTONDBLCLK 521 -#define WM_MOUSEWHEEL 522 -#define WM_XBUTTONDOWN 523 -#define WM_XBUTTONUP 524 -#define WM_XBUTTONDBLCLK 525 -#define WM_MOUSEHOVER 0x2A1 -#define WM_MOUSELEAVE 0x2A3 +#define WM_MOUSEFIRST 512 +#define WM_MOUSEMOVE 512 +#define WM_LBUTTONDOWN 513 +#define WM_LBUTTONUP 514 +#define WM_LBUTTONDBLCLK 515 +#define WM_RBUTTONDOWN 516 +#define WM_RBUTTONUP 517 +#define WM_RBUTTONDBLCLK 518 +#define WM_MBUTTONDOWN 519 +#define WM_MBUTTONUP 520 +#define WM_MBUTTONDBLCLK 521 +#define WM_MOUSEWHEEL 522 +#define WM_XBUTTONDOWN 523 +#define WM_XBUTTONUP 524 +#define WM_XBUTTONDBLCLK 525 +#define WM_MOUSEHOVER 0x2A1 +#define WM_MOUSELEAVE 0x2A3 -#define WM_PARENTNOTIFY 528 -#define WM_ENTERMENULOOP 529 -#define WM_EXITMENULOOP 530 +#define WM_PARENTNOTIFY 528 +#define WM_ENTERMENULOOP 529 +#define WM_EXITMENULOOP 530 -#define WM_NEXTMENU 531 -#define WM_SIZING 532 -#define WM_CAPTURECHANGED 533 -#define WM_MOVING 534 -#define WM_POWERBROADCAST 536 +#define WM_NEXTMENU 531 +#define WM_SIZING 532 +#define WM_CAPTURECHANGED 533 +#define WM_MOVING 534 +#define WM_POWERBROADCAST 536 -#define WM_MDICREATE 544 -#define WM_MDIDESTROY 545 -#define WM_MDIACTIVATE 546 -#define WM_MDIRESTORE 547 -#define WM_MDINEXT 548 -#define WM_MDIMAXIMIZE 549 -#define WM_MDITILE 550 -#define WM_MDICASCADE 551 -#define WM_MDIICONARRANGE 552 -#define WM_MDIGETACTIVE 553 +#define WM_MDICREATE 544 +#define WM_MDIDESTROY 545 +#define WM_MDIACTIVATE 546 +#define WM_MDIRESTORE 547 +#define WM_MDINEXT 548 +#define WM_MDIMAXIMIZE 549 +#define WM_MDITILE 550 +#define WM_MDICASCADE 551 +#define WM_MDIICONARRANGE 552 +#define WM_MDIGETACTIVE 553 -#define WM_MDISETMENU 560 -#define WM_ENTERSIZEMOVE 561 -#define WM_EXITSIZEMOVE 562 -#define WM_DROPFILES 563 -#define WM_MDIREFRESHMENU 564 +#define WM_MDISETMENU 560 +#define WM_ENTERSIZEMOVE 561 +#define WM_EXITSIZEMOVE 562 +#define WM_DROPFILES 563 +#define WM_MDIREFRESHMENU 564 -#define WM_CUT 768 -#define WM_COPY 769 -#define WM_PASTE 770 -#define WM_CLEAR 771 -#define WM_UNDO 772 -#define WM_RENDERFORMAT 773 -#define WM_RENDERALLFORMATS 774 -#define WM_DESTROYCLIPBOARD 775 -#define WM_DRAWCLIPBOARD 776 -#define WM_PAINTCLIPBOARD 777 -#define WM_VSCROLLCLIPBOARD 778 -#define WM_SIZECLIPBOARD 779 -#define WM_ASKCBFORMATNAME 780 -#define WM_CHANGECBCHAIN 781 -#define WM_HSCROLLCLIPBOARD 782 -#define WM_QUERYNEWPALETTE 783 -#define WM_PALETTEISCHANGING 784 -#define WM_PALETTECHANGED 785 -#define WM_HOTKEY 786 +#define WM_CUT 768 +#define WM_COPY 769 +#define WM_PASTE 770 +#define WM_CLEAR 771 +#define WM_UNDO 772 +#define WM_RENDERFORMAT 773 +#define WM_RENDERALLFORMATS 774 +#define WM_DESTROYCLIPBOARD 775 +#define WM_DRAWCLIPBOARD 776 +#define WM_PAINTCLIPBOARD 777 +#define WM_VSCROLLCLIPBOARD 778 +#define WM_SIZECLIPBOARD 779 +#define WM_ASKCBFORMATNAME 780 +#define WM_CHANGECBCHAIN 781 +#define WM_HSCROLLCLIPBOARD 782 +#define WM_QUERYNEWPALETTE 783 +#define WM_PALETTEISCHANGING 784 +#define WM_PALETTECHANGED 785 +#define WM_HOTKEY 786 //-------------------------------------------------------------------// /* * Window Styles */ -#define WS_OVERLAPPED 0 -#define WS_POPUP 2147483648 // 0x80000000L -#define WS_CHILD 1073741824 // 0x40000000L -#define WS_MINIMIZE 536870912 // 0x20000000L -#define WS_VISIBLE 268435456 // 0x10000000L -#define WS_DISABLED 134217728 // 0x08000000L -#define WS_BORDER 8388608 // 0x00800000L -#define WS_DLGFRAME 4194304 // 0x00400000L -#define WS_VSCROLL 2097152 // 0x00200000L -#define WS_HSCROLL 1048576 // 0x00100000L -#define WS_SYSMENU 524288 // 0x00080000L -#define WS_THICKFRAME 262144 // 0x00040000L -#define WS_GROUP 131072 // 0x00020000L -#define WS_TABSTOP 65536 // 0x00010000L -#define WS_CLIPSIBLINGS 67108864 -#define WS_CLIPCHILDREN 33554432 -#define WS_MAXIMIZE 16777216 -#define WS_CAPTION 12582912 /* WS_BORDER | WS_DLGFRAME */ +#define WS_OVERLAPPED 0 +#define WS_POPUP 2147483648 // 0x80000000L +#define WS_CHILD 1073741824 // 0x40000000L +#define WS_MINIMIZE 536870912 // 0x20000000L +#define WS_VISIBLE 268435456 // 0x10000000L +#define WS_DISABLED 134217728 // 0x08000000L +#define WS_BORDER 8388608 // 0x00800000L +#define WS_DLGFRAME 4194304 // 0x00400000L +#define WS_VSCROLL 2097152 // 0x00200000L +#define WS_HSCROLL 1048576 // 0x00100000L +#define WS_SYSMENU 524288 // 0x00080000L +#define WS_THICKFRAME 262144 // 0x00040000L +#define WS_GROUP 131072 // 0x00020000L +#define WS_TABSTOP 65536 // 0x00010000L +#define WS_CLIPSIBLINGS 67108864 +#define WS_CLIPCHILDREN 33554432 +#define WS_MAXIMIZE 16777216 +#define WS_CAPTION 12582912 // WS_BORDER | WS_DLGFRAME -#define WS_MINIMIZEBOX 131072 -#define WS_MAXIMIZEBOX 65536 +#define WS_MINIMIZEBOX 131072 +#define WS_MAXIMIZEBOX 65536 -#define WS_TILED WS_OVERLAPPED -#define WS_ICONIC WS_MINIMIZE -#define WS_SIZEBOX WS_THICKFRAME -#define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW +#define WS_TILED WS_OVERLAPPED +#define WS_ICONIC WS_MINIMIZE +#define WS_SIZEBOX WS_THICKFRAME +#define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW -#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED + ; - WS_CAPTION + ; - WS_SYSMENU + ; - WS_THICKFRAME + ; - WS_MINIMIZEBOX + ; - WS_MAXIMIZEBOX ) +#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED + ; + WS_CAPTION + ; + WS_SYSMENU + ; + WS_THICKFRAME + ; + WS_MINIMIZEBOX + ; + WS_MAXIMIZEBOX ) //-------------------------------------------------------------------// /* * Extended Window Styles */ -#define WS_EX_DLGMODALFRAME 1 // 0x00000001L -#define WS_EX_NOPARENTNOTIFY 4 // 0x00000004L -#define WS_EX_TOPMOST 8 // 0x00000008L -#define WS_EX_ACCEPTFILES 16 // 0x00000010L -#define WS_EX_TRANSPARENT 32 // 0x00000020L -#define WS_EX_MDICHILD 64 // 0x00000040L -#define WS_EX_TOOLWINDOW 128 // 0x00000080L -#define WS_EX_WINDOWEDGE 256 // 0x00000100L -#define WS_EX_CLIENTEDGE 512 // 0x00000200L -#define WS_EX_CONTEXTHELP 1024 // 0x00000400L +#define WS_EX_DLGMODALFRAME 1 // 0x00000001L +#define WS_EX_NOPARENTNOTIFY 4 // 0x00000004L +#define WS_EX_TOPMOST 8 // 0x00000008L +#define WS_EX_ACCEPTFILES 16 // 0x00000010L +#define WS_EX_TRANSPARENT 32 // 0x00000020L +#define WS_EX_MDICHILD 64 // 0x00000040L +#define WS_EX_TOOLWINDOW 128 // 0x00000080L +#define WS_EX_WINDOWEDGE 256 // 0x00000100L +#define WS_EX_CLIENTEDGE 512 // 0x00000200L +#define WS_EX_CONTEXTHELP 1024 // 0x00000400L -#define WS_EX_RIGHT 4096 // 0x00001000L -#define WS_EX_LEFT 0 // 0x00000000L -#define WS_EX_RTLREADING 8192 // 0x00002000L -#define WS_EX_LTRREADING 0 // 0x00000000L -#define WS_EX_LEFTSCROLLBAR 16384 // 0x00004000L -#define WS_EX_RIGHTSCROLLBAR 0 // 0x00000000L +#define WS_EX_RIGHT 4096 // 0x00001000L +#define WS_EX_LEFT 0 // 0x00000000L +#define WS_EX_RTLREADING 8192 // 0x00002000L +#define WS_EX_LTRREADING 0 // 0x00000000L +#define WS_EX_LEFTSCROLLBAR 16384 // 0x00004000L +#define WS_EX_RIGHTSCROLLBAR 0 // 0x00000000L -#define WS_EX_CONTROLPARENT 65536 // 0x00010000L -#define WS_EX_STATICEDGE 131072 // 0x00020000L -#define WS_EX_APPWINDOW 262144 // 0x00040000L +#define WS_EX_CONTROLPARENT 65536 // 0x00010000L +#define WS_EX_STATICEDGE 131072 // 0x00020000L +#define WS_EX_APPWINDOW 262144 // 0x00040000L -#define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE + WS_EX_CLIENTEDGE) -#define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE + WS_EX_TOOLWINDOW + WS_EX_TOPMOST) +#define WS_EX_OVERLAPPEDWINDOW (WS_EX_WINDOWEDGE + WS_EX_CLIENTEDGE) +#define WS_EX_PALETTEWINDOW (WS_EX_WINDOWEDGE + WS_EX_TOOLWINDOW + WS_EX_TOPMOST) -#define WS_EX_LAYERED 524288 // 0x00080000 -#define WS_EX_NOINHERITLAYOUT 1048576 // 0x00100000L // Disable inheritence of mirroring by children -#define WS_EX_LAYOUTRTL 4194304 // 0x00400000L // Right to left mirroring -#define WS_EX_NOACTIVATE 134217728 // 0x08000000L +#define WS_EX_LAYERED 524288 // 0x00080000 +#define WS_EX_NOINHERITLAYOUT 1048576 // 0x00100000L // Disable inheritence of mirroring by children +#define WS_EX_LAYOUTRTL 4194304 // 0x00400000L // Right to left mirroring +#define WS_EX_NOACTIVATE 134217728 // 0x08000000L //-------------------------------------------------------------------// -#define SC_SIZE 61440 // 0xF000 -#define SC_MOVE 61456 // 0xF010 -#define SC_MINIMIZE 61472 // 0xF020 -#define SC_MAXIMIZE 61488 // 0xF030 -#define SC_NEXTWINDOW 61504 // 0xF040 -#define SC_PREVWINDOW 61520 // 0xF050 -#define SC_CLOSE 61536 // 0xF060 -#define SC_VSCROLL 61552 // 0xF070 -#define SC_HSCROLL 61568 // 0xF080 -#define SC_MOUSEMENU 61584 // 0xF090 -#define SC_KEYMENU 61696 // 0xF100 -#define SC_ARRANGE 61712 // 0xF110 -#define SC_RESTORE 61728 // 0xF120 -#define SC_TASKLIST 61744 // 0xF130 -#define SC_SCREENSAVE 61760 // 0xF140 -#define SC_HOTKEY 61776 // 0xF150 -#define SC_DEFAULT 61792 // 0xF160 -#define SC_MONITORPOWER 61808 // 0xF170 -#define SC_CONTEXTHELP 61824 // 0xF180 -#define SC_SEPARATOR 61455 // 0xF00F +#define SC_SIZE 61440 // 0xF000 +#define SC_MOVE 61456 // 0xF010 +#define SC_MINIMIZE 61472 // 0xF020 +#define SC_MAXIMIZE 61488 // 0xF030 +#define SC_NEXTWINDOW 61504 // 0xF040 +#define SC_PREVWINDOW 61520 // 0xF050 +#define SC_CLOSE 61536 // 0xF060 +#define SC_VSCROLL 61552 // 0xF070 +#define SC_HSCROLL 61568 // 0xF080 +#define SC_MOUSEMENU 61584 // 0xF090 +#define SC_KEYMENU 61696 // 0xF100 +#define SC_ARRANGE 61712 // 0xF110 +#define SC_RESTORE 61728 // 0xF120 +#define SC_TASKLIST 61744 // 0xF130 +#define SC_SCREENSAVE 61760 // 0xF140 +#define SC_HOTKEY 61776 // 0xF150 +#define SC_DEFAULT 61792 // 0xF160 +#define SC_MONITORPOWER 61808 // 0xF170 +#define SC_CONTEXTHELP 61824 // 0xF180 +#define SC_SEPARATOR 61455 // 0xF00F //-------------------------------------------------------------------// /* * Dialog styles */ -#define DS_ABSALIGN 1 // 0x01 -#define DS_SYSMODAL 2 // 0x02 -#define DS_3DLOOK 4 // 0x04 -#define DS_FIXEDSYS 8 // 0x08 -#define DS_NOFAILCREATE 16 // 0x10 -#define DS_LOCALEDIT 32 // 0x20 -#define DS_SETFONT 64 // 0x40 -#define DS_MODALFRAME 128 // 0x80 -#define DS_NOIDLEMSG 256 // 0x100 -#define DS_CONTROL 1024 // 0x400 -#define DS_CENTER 2048 // 0x800 -#define DS_CENTERMOUSE 4096 // 0x1000 -#define DS_CONTEXTHELP 8192 // 0x2000 +#define DS_ABSALIGN 1 // 0x01 +#define DS_SYSMODAL 2 // 0x02 +#define DS_3DLOOK 4 // 0x04 +#define DS_FIXEDSYS 8 // 0x08 +#define DS_NOFAILCREATE 16 // 0x10 +#define DS_LOCALEDIT 32 // 0x20 +#define DS_SETFONT 64 // 0x40 +#define DS_MODALFRAME 128 // 0x80 +#define DS_NOIDLEMSG 256 // 0x100 +#define DS_CONTROL 1024 // 0x400 +#define DS_CENTER 2048 // 0x800 +#define DS_CENTERMOUSE 4096 // 0x1000 +#define DS_CONTEXTHELP 8192 // 0x2000 //-------------------------------------------------------------------// /* * Dialog Box Command IDs */ -#define IDOK 1 -#define IDCANCEL 2 -#define IDABORT 3 -#define IDRETRY 4 -#define IDIGNORE 5 -#define IDYES 6 -#define IDNO 7 -#define IDTRYAGAIN 10 // (WINVER >= 0x0500) -#define IDCONTINUE 11 // (WINVER >= 0x0500) +#define IDOK 1 +#define IDCANCEL 2 +#define IDABORT 3 +#define IDRETRY 4 +#define IDIGNORE 5 +#define IDYES 6 +#define IDNO 7 +#define IDTRYAGAIN 10 // (WINVER >= 0x0500) +#define IDCONTINUE 11 // (WINVER >= 0x0500) //-------------------------------------------------------------------// //-------------------------------------------------------------------// /* * Button Control Styles */ -#define BS_PUSHBUTTON 0 // 0x00000000L -#define BS_DEFPUSHBUTTON 1 // 0x00000001L -#define BS_CHECKBOX 2 // 0x00000002L -#define BS_AUTOCHECKBOX 3 // 0x00000003L -#define BS_RADIOBUTTON 4 // 0x00000004L -#define BS_3STATE 5 // 0x00000005L -#define BS_AUTO3STATE 6 // 0x00000006L -#define BS_GROUPBOX 7 // 0x00000007L -#define BS_USERBUTTON 8 // 0x00000008L -#define BS_AUTORADIOBUTTON 9 // 0x00000009L -#define BS_OWNERDRAW 11 // 0x0000000BL -#define BS_LEFTTEXT 32 // 0x00000020L +#define BS_PUSHBUTTON 0 // 0x00000000L +#define BS_DEFPUSHBUTTON 1 // 0x00000001L +#define BS_CHECKBOX 2 // 0x00000002L +#define BS_AUTOCHECKBOX 3 // 0x00000003L +#define BS_RADIOBUTTON 4 // 0x00000004L +#define BS_3STATE 5 // 0x00000005L +#define BS_AUTO3STATE 6 // 0x00000006L +#define BS_GROUPBOX 7 // 0x00000007L +#define BS_USERBUTTON 8 // 0x00000008L +#define BS_AUTORADIOBUTTON 9 // 0x00000009L +#define BS_OWNERDRAW 11 // 0x0000000BL +#define BS_LEFTTEXT 32 // 0x00000020L -#define BS_TEXT 0 // 0x00000000L -#define BS_ICON 64 // 0x00000040L -#define BS_BITMAP 128 // 0x00000080L -#define BS_LEFT 256 // 0x00000100L -#define BS_RIGHT 512 // 0x00000200L -#define BS_CENTER 768 // 0x00000300L -#define BS_TOP 1024 // 0x00000400L -#define BS_BOTTOM 2048 // 0x00000800L -#define BS_VCENTER 3072 // 0x00000C00L -#define BS_PUSHLIKE 4096 // 0x00001000L -#define BS_MULTILINE 8192 // 0x00002000L -#define BS_NOTIFY 16384 // 0x00004000L -#define BS_FLAT 32768 // 0x00008000L -#define BS_RIGHTBUTTON BS_LEFTTEXT +#define BS_TEXT 0 // 0x00000000L +#define BS_ICON 64 // 0x00000040L +#define BS_BITMAP 128 // 0x00000080L +#define BS_LEFT 256 // 0x00000100L +#define BS_RIGHT 512 // 0x00000200L +#define BS_CENTER 768 // 0x00000300L +#define BS_TOP 1024 // 0x00000400L +#define BS_BOTTOM 2048 // 0x00000800L +#define BS_VCENTER 3072 // 0x00000C00L +#define BS_PUSHLIKE 4096 // 0x00001000L +#define BS_MULTILINE 8192 // 0x00002000L +#define BS_NOTIFY 16384 // 0x00004000L +#define BS_FLAT 32768 // 0x00008000L +#define BS_RIGHTBUTTON BS_LEFTTEXT //-------------------------------------------------------------------// /* * User Button Notification Codes */ -#define BN_CLICKED 0 -#define BN_PAINT 1 -#define BN_HILITE 2 -#define BN_UNHILITE 3 -#define BN_DISABLE 4 -#define BN_DOUBLECLICKED 5 -#define BN_PUSHED BN_HILITE -#define BN_UNPUSHED BN_UNHILITE -#define BN_DBLCLK BN_DOUBLECLICKED -#define BN_SETFOCUS 6 -#define BN_KILLFOCUS 7 +#define BN_CLICKED 0 +#define BN_PAINT 1 +#define BN_HILITE 2 +#define BN_UNHILITE 3 +#define BN_DISABLE 4 +#define BN_DOUBLECLICKED 5 +#define BN_PUSHED BN_HILITE +#define BN_UNPUSHED BN_UNHILITE +#define BN_DBLCLK BN_DOUBLECLICKED +#define BN_SETFOCUS 6 +#define BN_KILLFOCUS 7 //-------------------------------------------------------------------// /* * Button Control Messages */ -#define BM_GETCHECK 240 -#define BM_SETCHECK 241 -#define BM_GETSTATE 242 -#define BM_SETSTATE 243 -#define BM_SETSTYLE 244 -#define BM_CLICK 245 -#define BM_GETIMAGE 246 -#define BM_SETIMAGE 247 +#define BM_GETCHECK 240 +#define BM_SETCHECK 241 +#define BM_GETSTATE 242 +#define BM_SETSTATE 243 +#define BM_SETSTYLE 244 +#define BM_CLICK 245 +#define BM_GETIMAGE 246 +#define BM_SETIMAGE 247 -#define BST_UNCHECKED 0 -#define BST_CHECKED 1 -#define BST_INDETERMINATE 2 -#define BST_PUSHED 4 -#define BST_FOCUS 8 +#define BST_UNCHECKED 0 +#define BST_CHECKED 1 +#define BST_INDETERMINATE 2 +#define BST_PUSHED 4 +#define BST_FOCUS 8 //-------------------------------------------------------------------// //-------------------------------------------------------------------// /* * Edit Control Styles */ -#define ES_LEFT 0 -#define ES_CENTER 1 -#define ES_RIGHT 2 -#define ES_MULTILINE 4 -#define ES_UPPERCASE 8 -#define ES_LOWERCASE 16 -#define ES_PASSWORD 32 -#define ES_AUTOVSCROLL 64 -#define ES_AUTOHSCROLL 128 -#define ES_NOHIDESEL 256 -#define ES_OEMCONVERT 1024 -#define ES_READONLY 2048 -#define ES_WANTRETURN 4096 -#define ES_NUMBER 8192 +#define ES_LEFT 0 +#define ES_CENTER 1 +#define ES_RIGHT 2 +#define ES_MULTILINE 4 +#define ES_UPPERCASE 8 +#define ES_LOWERCASE 16 +#define ES_PASSWORD 32 +#define ES_AUTOVSCROLL 64 +#define ES_AUTOHSCROLL 128 +#define ES_NOHIDESEL 256 +#define ES_OEMCONVERT 1024 +#define ES_READONLY 2048 +#define ES_WANTRETURN 4096 +#define ES_NUMBER 8192 //-------------------------------------------------------------------// /* * Edit Control Notification Codes */ -#define EN_SETFOCUS 256 // 0x0100 -#define EN_KILLFOCUS 512 // 0x0200 -#define EN_CHANGE 768 // 0x0300 -#define EN_UPDATE 1024 // 0x0400 -#define EN_ERRSPACE 1280 // 0x0500 -#define EN_MAXTEXT 1281 // 0x0501 -#define EN_HSCROLL 1537 // 0x0601 -#define EN_VSCROLL 1538 // 0x0602 +#define EN_SETFOCUS 256 // 0x0100 +#define EN_KILLFOCUS 512 // 0x0200 +#define EN_CHANGE 768 // 0x0300 +#define EN_UPDATE 1024 // 0x0400 +#define EN_ERRSPACE 1280 // 0x0500 +#define EN_MAXTEXT 1281 // 0x0501 +#define EN_HSCROLL 1537 // 0x0601 +#define EN_VSCROLL 1538 // 0x0602 //----------------------------------------------------------------------// /* * Edit Control Messages */ -#define EM_GETSEL 176 -#define EM_SETSEL 177 -#define EM_GETRECT 178 -#define EM_SETRECT 179 -#define EM_SETRECTNP 180 -#define EM_SCROLL 181 -#define EM_LINESCROLL 182 -#define EM_SCROLLCARET 183 -#define EM_GETMODIFY 184 -#define EM_SETMODIFY 185 -#define EM_GETLINECOUNT 186 -#define EM_LINEINDEX 187 -#define EM_SETHANDLE 188 -#define EM_GETHANDLE 189 -#define EM_GETTHUMB 190 -#define EM_LINELENGTH 193 -#define EM_REPLACESEL 194 -#define EM_GETLINE 196 -#define EM_LIMITTEXT 197 -#define EM_CANUNDO 198 -#define EM_UNDO 199 -#define EM_FMTLINES 200 -#define EM_LINEFROMCHAR 201 -#define EM_SETTABSTOPS 203 -#define EM_SETPASSWORDCHAR 204 -#define EM_EMPTYUNDOBUFFER 205 -#define EM_GETFIRSTVISIBLELINE 206 -#define EM_SETREADONLY 207 -#define EM_SETWORDBREAKPROC 208 -#define EM_GETWORDBREAKPROC 209 -#define EM_GETPASSWORDCHAR 210 -#define EM_SETMARGINS 211 -#define EM_GETMARGINS 212 -#define EM_SETLIMITTEXT EM_LIMITTEXT -#define EM_GETLIMITTEXT 213 -#define EM_POSFROMCHAR 214 -#define EM_CHARFROMPOS 215 +#define EM_GETSEL 176 +#define EM_SETSEL 177 +#define EM_GETRECT 178 +#define EM_SETRECT 179 +#define EM_SETRECTNP 180 +#define EM_SCROLL 181 +#define EM_LINESCROLL 182 +#define EM_SCROLLCARET 183 +#define EM_GETMODIFY 184 +#define EM_SETMODIFY 185 +#define EM_GETLINECOUNT 186 +#define EM_LINEINDEX 187 +#define EM_SETHANDLE 188 +#define EM_GETHANDLE 189 +#define EM_GETTHUMB 190 +#define EM_LINELENGTH 193 +#define EM_REPLACESEL 194 +#define EM_GETLINE 196 +#define EM_LIMITTEXT 197 +#define EM_CANUNDO 198 +#define EM_UNDO 199 +#define EM_FMTLINES 200 +#define EM_LINEFROMCHAR 201 +#define EM_SETTABSTOPS 203 +#define EM_SETPASSWORDCHAR 204 +#define EM_EMPTYUNDOBUFFER 205 +#define EM_GETFIRSTVISIBLELINE 206 +#define EM_SETREADONLY 207 +#define EM_SETWORDBREAKPROC 208 +#define EM_GETWORDBREAKPROC 209 +#define EM_GETPASSWORDCHAR 210 +#define EM_SETMARGINS 211 +#define EM_GETMARGINS 212 +#define EM_SETLIMITTEXT EM_LIMITTEXT +#define EM_GETLIMITTEXT 213 +#define EM_POSFROMCHAR 214 +#define EM_CHARFROMPOS 215 //-------------------------------------------------------------------// //-------------------------------------------------------------------// /* * Combo Box styles */ -#define CBS_SIMPLE 1 // 0x0001L -#define CBS_DROPDOWN 2 // 0x0002L -#define CBS_DROPDOWNLIST 3 // 0x0003L -#define CBS_OWNERDRAWFIXED 16 // 0x0010L -#define CBS_OWNERDRAWVARIABLE 32 // 0x0020L -#define CBS_AUTOHSCROLL 64 // 0x0040L -#define CBS_OEMCONVERT 128 // 0x0080L -#define CBS_SORT 256 // 0x0100L -#define CBS_HASSTRINGS 512 // 0x0200L -#define CBS_NOINTEGRALHEIGHT 1024 // 0x0400L -#define CBS_DISABLENOSCROLL 2048 // 0x0800L -#define CBS_UPPERCASE 8192 // 0x2000L -#define CBS_LOWERCASE 16384 // 0x4000L +#define CBS_SIMPLE 1 // 0x0001L +#define CBS_DROPDOWN 2 // 0x0002L +#define CBS_DROPDOWNLIST 3 // 0x0003L +#define CBS_OWNERDRAWFIXED 16 // 0x0010L +#define CBS_OWNERDRAWVARIABLE 32 // 0x0020L +#define CBS_AUTOHSCROLL 64 // 0x0040L +#define CBS_OEMCONVERT 128 // 0x0080L +#define CBS_SORT 256 // 0x0100L +#define CBS_HASSTRINGS 512 // 0x0200L +#define CBS_NOINTEGRALHEIGHT 1024 // 0x0400L +#define CBS_DISABLENOSCROLL 2048 // 0x0800L +#define CBS_UPPERCASE 8192 // 0x2000L +#define CBS_LOWERCASE 16384 // 0x4000L //-------------------------------------------------------------------// /* * Combo Box Notification Codes */ -#define CBN_ERRSPACE (-1) -#define CBN_SELCHANGE 1 -#define CBN_DBLCLK 2 -#define CBN_SETFOCUS 3 -#define CBN_KILLFOCUS 4 -#define CBN_EDITCHANGE 5 -#define CBN_EDITUPDATE 6 -#define CBN_DROPDOWN 7 -#define CBN_CLOSEUP 8 -#define CBN_SELENDOK 9 -#define CBN_SELENDCANCEL 10 +#define CBN_ERRSPACE (-1) +#define CBN_SELCHANGE 1 +#define CBN_DBLCLK 2 +#define CBN_SETFOCUS 3 +#define CBN_KILLFOCUS 4 +#define CBN_EDITCHANGE 5 +#define CBN_EDITUPDATE 6 +#define CBN_DROPDOWN 7 +#define CBN_CLOSEUP 8 +#define CBN_SELENDOK 9 +#define CBN_SELENDCANCEL 10 //-------------------------------------------------------------------// /* * Combo Box messages */ -#define CB_GETEDITSEL 320 -#define CB_LIMITTEXT 321 -#define CB_SETEDITSEL 322 -#define CB_ADDSTRING 323 -#define CB_DELETESTRING 324 -#define CB_DIR 325 -#define CB_GETCOUNT 326 -#define CB_GETCURSEL 327 -#define CB_GETLBTEXT 328 -#define CB_GETLBTEXTLEN 329 -#define CB_INSERTSTRING 330 -#define CB_RESETCONTENT 331 -#define CB_FINDSTRING 332 -#define CB_SELECTSTRING 333 -#define CB_SETCURSEL 334 -#define CB_SHOWDROPDOWN 335 -#define CB_GETITEMDATA 336 -#define CB_SETITEMDATA 337 -#define CB_GETDROPPEDCONTROLRECT 338 -#define CB_SETITEMHEIGHT 339 -#define CB_GETITEMHEIGHT 340 -#define CB_SETEXTENDEDUI 341 -#define CB_GETEXTENDEDUI 342 -#define CB_GETDROPPEDSTATE 343 -#define CB_FINDSTRINGEXACT 344 -#define CB_SETLOCALE 345 -#define CB_GETLOCALE 346 -#define CB_GETTOPINDEX 347 -#define CB_SETTOPINDEX 348 -#define CB_GETHORIZONTALEXTENT 349 -#define CB_SETHORIZONTALEXTENT 350 -#define CB_GETDROPPEDWIDTH 351 -#define CB_SETDROPPEDWIDTH 352 -#define CB_INITSTORAGE 353 +#define CB_GETEDITSEL 320 +#define CB_LIMITTEXT 321 +#define CB_SETEDITSEL 322 +#define CB_ADDSTRING 323 +#define CB_DELETESTRING 324 +#define CB_DIR 325 +#define CB_GETCOUNT 326 +#define CB_GETCURSEL 327 +#define CB_GETLBTEXT 328 +#define CB_GETLBTEXTLEN 329 +#define CB_INSERTSTRING 330 +#define CB_RESETCONTENT 331 +#define CB_FINDSTRING 332 +#define CB_SELECTSTRING 333 +#define CB_SETCURSEL 334 +#define CB_SHOWDROPDOWN 335 +#define CB_GETITEMDATA 336 +#define CB_SETITEMDATA 337 +#define CB_GETDROPPEDCONTROLRECT 338 +#define CB_SETITEMHEIGHT 339 +#define CB_GETITEMHEIGHT 340 +#define CB_SETEXTENDEDUI 341 +#define CB_GETEXTENDEDUI 342 +#define CB_GETDROPPEDSTATE 343 +#define CB_FINDSTRINGEXACT 344 +#define CB_SETLOCALE 345 +#define CB_GETLOCALE 346 +#define CB_GETTOPINDEX 347 +#define CB_SETTOPINDEX 348 +#define CB_GETHORIZONTALEXTENT 349 +#define CB_SETHORIZONTALEXTENT 350 +#define CB_GETDROPPEDWIDTH 351 +#define CB_SETDROPPEDWIDTH 352 +#define CB_INITSTORAGE 353 //-------------------------------------------------------------------// /* * Combo Box return Values */ -#define CB_OKAY 0 -#define CB_ERR (-1) -#define CB_ERRSPACE (-2) +#define CB_OKAY 0 +#define CB_ERR (-1) +#define CB_ERRSPACE (-2) //-------------------------------------------------------------------// //-------------------------------------------------------------------// /* * Static Control Constants */ -#define SS_LEFT 0 // 0x00000000L -#define SS_CENTER 1 // 0x00000001L -#define SS_RIGHT 2 // 0x00000002L -#define SS_ICON 3 // 0x00000003L -#define SS_BLACKRECT 4 // 0x00000004L -#define SS_GRAYRECT 5 // 0x00000005L -#define SS_WHITERECT 6 // 0x00000006L -#define SS_BLACKFRAME 7 // 0x00000007L -#define SS_GRAYFRAME 8 // 0x00000008L -#define SS_WHITEFRAME 9 // 0x00000009L -#define SS_USERITEM 10 // 0x0000000AL -#define SS_SIMPLE 11 // 0x0000000BL -#define SS_LEFTNOWORDWRAP 12 // 0x0000000CL -#define SS_OWNERDRAW 13 // 0x0000000DL -#define SS_BITMAP 14 // 0x0000000EL -#define SS_ENHMETAFILE 15 // 0x0000000FL -#define SS_ETCHEDHORZ 16 // 0x00000010L -#define SS_ETCHEDVERT 17 // 0x00000011L -#define SS_ETCHEDFRAME 18 // 0x00000012L -#define SS_TYPEMASK 31 // 0x0000001FL -#define SS_NOPREFIX 128 // Don't do "&" character translation -#define SS_NOTIFY 256 // 0x00000100L -#define SS_CENTERIMAGE 512 // 0x00000200L -#define SS_RIGHTJUST 1024 // 0x00000400L -#define SS_REALSIZEIMAGE 2048 // 0x00000800L -#define SS_SUNKEN 4096 // 0x00001000L +#define SS_LEFT 0 // 0x00000000L +#define SS_CENTER 1 // 0x00000001L +#define SS_RIGHT 2 // 0x00000002L +#define SS_ICON 3 // 0x00000003L +#define SS_BLACKRECT 4 // 0x00000004L +#define SS_GRAYRECT 5 // 0x00000005L +#define SS_WHITERECT 6 // 0x00000006L +#define SS_BLACKFRAME 7 // 0x00000007L +#define SS_GRAYFRAME 8 // 0x00000008L +#define SS_WHITEFRAME 9 // 0x00000009L +#define SS_USERITEM 10 // 0x0000000AL +#define SS_SIMPLE 11 // 0x0000000BL +#define SS_LEFTNOWORDWRAP 12 // 0x0000000CL +#define SS_OWNERDRAW 13 // 0x0000000DL +#define SS_BITMAP 14 // 0x0000000EL +#define SS_ENHMETAFILE 15 // 0x0000000FL +#define SS_ETCHEDHORZ 16 // 0x00000010L +#define SS_ETCHEDVERT 17 // 0x00000011L +#define SS_ETCHEDFRAME 18 // 0x00000012L +#define SS_TYPEMASK 31 // 0x0000001FL +#define SS_NOPREFIX 128 // Don't do "&" character translation +#define SS_NOTIFY 256 // 0x00000100L +#define SS_CENTERIMAGE 512 // 0x00000200L +#define SS_RIGHTJUST 1024 // 0x00000400L +#define SS_REALSIZEIMAGE 2048 // 0x00000800L +#define SS_SUNKEN 4096 // 0x00001000L -#define SS_ENDELLIPSIS 16384 -#define SS_PATHELLIPSIS 32768 -#define SS_WORDELLIPSIS 49152 -#define SS_ELLIPSISMASK 49152 +#define SS_ENDELLIPSIS 16384 +#define SS_PATHELLIPSIS 32768 +#define SS_WORDELLIPSIS 49152 +#define SS_ELLIPSISMASK 49152 //-------------------------------------------------------------------// /* * Static Control Mesages */ -#define STM_SETICON 368 -#define STM_GETICON 369 -#define STM_SETIMAGE 370 -#define STM_GETIMAGE 371 +#define STM_SETICON 368 +#define STM_GETICON 369 +#define STM_SETIMAGE 370 +#define STM_GETIMAGE 371 -#define STN_CLICKED 0 -#define STN_DBLCLK 1 -#define STN_ENABLE 2 -#define STN_DISABLE 3 +#define STN_CLICKED 0 +#define STN_DBLCLK 1 +#define STN_ENABLE 2 +#define STN_DISABLE 3 //-------------------------------------------------------------------// //-------------------------------------------------------------------// /* * Listbox messages */ -#define LB_ADDSTRING 384 -#define LB_INSERTSTRING 385 -#define LB_DELETESTRING 386 -#define LB_SELITEMRANGEEX 387 -#define LB_RESETCONTENT 388 -#define LB_SETSEL 389 -#define LB_SETCURSEL 390 -#define LB_GETSEL 391 -#define LB_GETCURSEL 392 -#define LB_GETTEXT 393 -#define LB_GETTEXTLEN 394 -#define LB_GETCOUNT 395 -#define LB_SELECTSTRING 396 -#define LB_DIR 397 -#define LB_GETTOPINDEX 398 -#define LB_FINDSTRING 399 -#define LB_GETSELCOUNT 400 -#define LB_GETSELITEMS 401 -#define LB_SETTABSTOPS 402 -#define LB_GETHORIZONTALEXTENT 403 -#define LB_SETHORIZONTALEXTENT 404 -#define LB_SETCOLUMNWIDTH 405 -#define LB_ADDFILE 406 -#define LB_SETTOPINDEX 407 -#define LB_GETITEMRECT 408 -#define LB_GETITEMDATA 409 -#define LB_SETITEMDATA 410 -#define LB_SELITEMRANGE 411 -#define LB_SETANCHORINDEX 412 -#define LB_GETANCHORINDEX 413 -#define LB_SETCARETINDEX 414 -#define LB_GETCARETINDEX 415 -#define LB_SETITEMHEIGHT 416 -#define LB_GETITEMHEIGHT 417 -#define LB_FINDSTRINGEXACT 418 -#define LB_SETLOCALE 421 -#define LB_GETLOCALE 422 -#define LB_SETCOUNT 423 -#define LB_INITSTORAGE 424 -#define LB_ITEMFROMPOINT 425 +#define LB_ADDSTRING 384 +#define LB_INSERTSTRING 385 +#define LB_DELETESTRING 386 +#define LB_SELITEMRANGEEX 387 +#define LB_RESETCONTENT 388 +#define LB_SETSEL 389 +#define LB_SETCURSEL 390 +#define LB_GETSEL 391 +#define LB_GETCURSEL 392 +#define LB_GETTEXT 393 +#define LB_GETTEXTLEN 394 +#define LB_GETCOUNT 395 +#define LB_SELECTSTRING 396 +#define LB_DIR 397 +#define LB_GETTOPINDEX 398 +#define LB_FINDSTRING 399 +#define LB_GETSELCOUNT 400 +#define LB_GETSELITEMS 401 +#define LB_SETTABSTOPS 402 +#define LB_GETHORIZONTALEXTENT 403 +#define LB_SETHORIZONTALEXTENT 404 +#define LB_SETCOLUMNWIDTH 405 +#define LB_ADDFILE 406 +#define LB_SETTOPINDEX 407 +#define LB_GETITEMRECT 408 +#define LB_GETITEMDATA 409 +#define LB_SETITEMDATA 410 +#define LB_SELITEMRANGE 411 +#define LB_SETANCHORINDEX 412 +#define LB_GETANCHORINDEX 413 +#define LB_SETCARETINDEX 414 +#define LB_GETCARETINDEX 415 +#define LB_SETITEMHEIGHT 416 +#define LB_GETITEMHEIGHT 417 +#define LB_FINDSTRINGEXACT 418 +#define LB_SETLOCALE 421 +#define LB_GETLOCALE 422 +#define LB_SETCOUNT 423 +#define LB_INITSTORAGE 424 +#define LB_ITEMFROMPOINT 425 //-------------------------------------------------------------------// /* * Listbox Styles */ -#define LBS_NOTIFY 1 -#define LBS_SORT 2 -#define LBS_NOREDRAW 4 -#define LBS_MULTIPLESEL 8 -#define LBS_OWNERDRAWFIXED 16 -#define LBS_OWNERDRAWVARIABLE 32 -#define LBS_HASSTRINGS 64 -#define LBS_USETABSTOPS 128 -#define LBS_NOINTEGRALHEIGHT 256 -#define LBS_MULTICOLUMN 512 -#define LBS_WANTKEYBOARDINPUT 1024 -#define LBS_EXTENDEDSEL 2048 -#define LBS_DISABLENOSCROLL 4096 -#define LBS_NODATA 8192 -#define LBS_NOSEL 16384 -#define LBS_STANDARD ( LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER ) +#define LBS_NOTIFY 1 +#define LBS_SORT 2 +#define LBS_NOREDRAW 4 +#define LBS_MULTIPLESEL 8 +#define LBS_OWNERDRAWFIXED 16 +#define LBS_OWNERDRAWVARIABLE 32 +#define LBS_HASSTRINGS 64 +#define LBS_USETABSTOPS 128 +#define LBS_NOINTEGRALHEIGHT 256 +#define LBS_MULTICOLUMN 512 +#define LBS_WANTKEYBOARDINPUT 1024 +#define LBS_EXTENDEDSEL 2048 +#define LBS_DISABLENOSCROLL 4096 +#define LBS_NODATA 8192 +#define LBS_NOSEL 16384 +#define LBS_STANDARD ( LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER ) //-------------------------------------------------------------------// /* * Listbox Notification Codes */ -#define LBN_ERRSPACE (-2) -#define LBN_SELCHANGE 1 -#define LBN_DBLCLK 2 -#define LBN_SELCANCEL 3 -#define LBN_SETFOCUS 4 -#define LBN_KILLFOCUS 5 +#define LBN_ERRSPACE (-2) +#define LBN_SELCHANGE 1 +#define LBN_DBLCLK 2 +#define LBN_SELCANCEL 3 +#define LBN_SETFOCUS 4 +#define LBN_KILLFOCUS 5 //-------------------------------------------------------------------// //-------------------------------------------------------------------// /* * MessageBox() Flags */ -#define MB_OK 0 -#define MB_OKCANCEL 1 -#define MB_ABORTRETRYIGNORE 2 -#define MB_YESNOCANCEL 3 -#define MB_YESNO 4 -#define MB_RETRYCANCEL 5 -#define MB_CANCELTRYCONTINUE 6 +#define MB_OK 0 +#define MB_OKCANCEL 1 +#define MB_ABORTRETRYIGNORE 2 +#define MB_YESNOCANCEL 3 +#define MB_YESNO 4 +#define MB_RETRYCANCEL 5 +#define MB_CANCELTRYCONTINUE 6 -#define MB_ICONHAND 16 -#define MB_ICONQUESTION 32 -#define MB_ICONEXCLAMATION 48 -#define MB_ICONASTERISK 64 +#define MB_ICONHAND 16 +#define MB_ICONQUESTION 32 +#define MB_ICONEXCLAMATION 48 +#define MB_ICONASTERISK 64 -#define MB_USERICON 128 -#define MB_ICONWARNING MB_ICONEXCLAMATION -#define MB_ICONERROR MB_ICONHAND +#define MB_USERICON 128 +#define MB_ICONWARNING MB_ICONEXCLAMATION +#define MB_ICONERROR MB_ICONHAND -#define MB_ICONINFORMATION MB_ICONASTERISK -#define MB_ICONSTOP MB_ICONHAND +#define MB_ICONINFORMATION MB_ICONASTERISK +#define MB_ICONSTOP MB_ICONHAND -#define MB_DEFBUTTON1 0 -#define MB_DEFBUTTON2 256 -#define MB_DEFBUTTON3 512 -#define MB_DEFBUTTON4 768 +#define MB_DEFBUTTON1 0 +#define MB_DEFBUTTON2 256 +#define MB_DEFBUTTON3 512 +#define MB_DEFBUTTON4 768 -#define MB_APPLMODAL 0 -#define MB_SYSTEMMODAL 4096 -#define MB_TASKMODAL 8192 -#define MB_HELP 16384 // Help Button +#define MB_APPLMODAL 0 +#define MB_SYSTEMMODAL 4096 +#define MB_TASKMODAL 8192 +#define MB_HELP 16384 // Help Button -#define MB_NOFOCUS 32768 -#define MB_SETFOREGROUND 65536 -#define MB_DEFAULT_DESKTOP_ONLY 131072 +#define MB_NOFOCUS 32768 +#define MB_SETFOREGROUND 65536 +#define MB_DEFAULT_DESKTOP_ONLY 131072 -#define MB_TOPMOST 262144 -#define MB_RIGHT 524288 -#define MB_RTLREADING 1048576 +#define MB_TOPMOST 262144 +#define MB_RIGHT 524288 +#define MB_RTLREADING 1048576 -#define MB_TYPEMASK 15 -#define MB_ICONMASK 240 -#define MB_DEFMASK 3840 -#define MB_MODEMASK 12288 -#define MB_MISCMASK 49152 +#define MB_TYPEMASK 15 +#define MB_ICONMASK 240 +#define MB_DEFMASK 3840 +#define MB_MODEMASK 12288 +#define MB_MISCMASK 49152 //-------------------------------------------------------------------// /* * Stock Logical Objects */ -#define WHITE_BRUSH 0 -#define LTGRAY_BRUSH 1 -#define GRAY_BRUSH 2 -#define DKGRAY_BRUSH 3 -#define BLACK_BRUSH 4 -#define NULL_BRUSH 5 -#define HOLLOW_BRUSH NULL_BRUSH +#define WHITE_BRUSH 0 +#define LTGRAY_BRUSH 1 +#define GRAY_BRUSH 2 +#define DKGRAY_BRUSH 3 +#define BLACK_BRUSH 4 +#define NULL_BRUSH 5 +#define HOLLOW_BRUSH NULL_BRUSH -#define WHITE_PEN 6 -#define BLACK_PEN 7 -#define NULL_PEN 8 +#define WHITE_PEN 6 +#define BLACK_PEN 7 +#define NULL_PEN 8 -#define OEM_FIXED_FONT 10 -#define ANSI_FIXED_FONT 11 -#define ANSI_VAR_FONT 12 -#define SYSTEM_FONT 13 -#define DEVICE_DEFAULT_FONT 14 -#define DEFAULT_PALETTE 15 -#define SYSTEM_FIXED_FONT 16 -#define DEFAULT_GUI_FONT 17 +#define OEM_FIXED_FONT 10 +#define ANSI_FIXED_FONT 11 +#define ANSI_VAR_FONT 12 +#define SYSTEM_FONT 13 +#define DEVICE_DEFAULT_FONT 14 +#define DEFAULT_PALETTE 15 +#define SYSTEM_FIXED_FONT 16 +#define DEFAULT_GUI_FONT 17 //-------------------------------------------------------------------// /* * WM_SETICON / WM_GETICON Type Codes */ -#define ICON_SMALL 0 -#define ICON_BIG 1 +#define ICON_SMALL 0 +#define ICON_BIG 1 //-------------------------------------------------------------------// -#define IMAGE_BITMAP 0 -#define IMAGE_ICON 1 -#define IMAGE_CURSOR 2 -#define IMAGE_ENHMETAFILE 3 +#define IMAGE_BITMAP 0 +#define IMAGE_ICON 1 +#define IMAGE_CURSOR 2 +#define IMAGE_ENHMETAFILE 3 //-------------------------------------------------------------------// /* * DrawText() Format Flags */ -#define DT_TOP 0 -#define DT_LEFT 0 -#define DT_CENTER 1 -#define DT_RIGHT 2 -#define DT_VCENTER 4 -#define DT_BOTTOM 8 -#define DT_WORDBREAK 16 -#define DT_SINGLELINE 32 -#define DT_EXPANDTABS 64 -#define DT_TABSTOP 128 -#define DT_NOCLIP 256 -#define DT_EXTERNALLEADING 512 -#define DT_CALCRECT 1024 -#define DT_NOPREFIX 2048 -#define DT_INTERNAL 4096 -#define DT_EDITCONTROL 8192 -#define DT_PATH_ELLIPSIS 16384 -#define DT_END_ELLIPSIS 32768 -#define DT_MODIFYSTRING 65536 -#define DT_RTLREADING 131072 -#define DT_WORD_ELLIPSIS 262144 -#define DT_NOFULLWIDTHCHARBREAK 524288 -#define DT_HIDEPREFIX 1048576 -#define DT_PREFIXONLY 2097152 +#define DT_TOP 0 +#define DT_LEFT 0 +#define DT_CENTER 1 +#define DT_RIGHT 2 +#define DT_VCENTER 4 +#define DT_BOTTOM 8 +#define DT_WORDBREAK 16 +#define DT_SINGLELINE 32 +#define DT_EXPANDTABS 64 +#define DT_TABSTOP 128 +#define DT_NOCLIP 256 +#define DT_EXTERNALLEADING 512 +#define DT_CALCRECT 1024 +#define DT_NOPREFIX 2048 +#define DT_INTERNAL 4096 +#define DT_EDITCONTROL 8192 +#define DT_PATH_ELLIPSIS 16384 +#define DT_END_ELLIPSIS 32768 +#define DT_MODIFYSTRING 65536 +#define DT_RTLREADING 131072 +#define DT_WORD_ELLIPSIS 262144 +#define DT_NOFULLWIDTHCHARBREAK 524288 +#define DT_HIDEPREFIX 1048576 +#define DT_PREFIXONLY 2097152 //-------------------------------------------------------------------// // Brush Styles -#define BS_SOLID 0 -#define BS_NULL 1 -#define BS_HOLLOW BS_NULL -#define BS_HATCHED 2 -#define BS_PATTERN 3 -#define BS_INDEXED 4 -#define BS_DIBPATTERN 5 -#define BS_DIBPATTERNPT 6 -#define BS_PATTERN8X8 7 -#define BS_DIBPATTERN8X8 8 -#define BS_MONOPATTERN 9 +#define BS_SOLID 0 +#define BS_NULL 1 +#define BS_HOLLOW BS_NULL +#define BS_HATCHED 2 +#define BS_PATTERN 3 +#define BS_INDEXED 4 +#define BS_DIBPATTERN 5 +#define BS_DIBPATTERNPT 6 +#define BS_PATTERN8X8 7 +#define BS_DIBPATTERN8X8 8 +#define BS_MONOPATTERN 9 // Hatch Styles -#define HS_HORIZONTAL 0 // ----- -#define HS_VERTICAL 1 // ||||| -#define HS_FDIAGONAL 2 // \\\\\ -#define HS_BDIAGONAL 3 // ///// -#define HS_CROSS 4 // +++++ -#define HS_DIAGCROSS 5 // xxxxx +#define HS_HORIZONTAL 0 // ----- +#define HS_VERTICAL 1 // ||||| +#define HS_FDIAGONAL 2 // \\\\\ +#define HS_BDIAGONAL 3 // ///// +#define HS_CROSS 4 // +++++ +#define HS_DIAGCROSS 5 // xxxxx // Pen Styles -#define PS_SOLID 0 -#define PS_DASH 1 // ------- -#define PS_DOT 2 // ....... -#define PS_DASHDOT 3 // _._._._ -#define PS_DASHDOTDOT 4 // _.._.._ -#define PS_NULL 5 -#define PS_INSIDEFRAME 6 -#define PS_USERSTYLE 7 -#define PS_ALTERNATE 8 -#define PS_STYLE_MASK 15 +#define PS_SOLID 0 +#define PS_DASH 1 // ------- +#define PS_DOT 2 // ....... +#define PS_DASHDOT 3 // _._._._ +#define PS_DASHDOTDOT 4 // _.._.._ +#define PS_NULL 5 +#define PS_INSIDEFRAME 6 +#define PS_USERSTYLE 7 +#define PS_ALTERNATE 8 +#define PS_STYLE_MASK 15 -#define PS_ENDCAP_ROUND 0 -#define PS_ENDCAP_SQUARE 256 -#define PS_ENDCAP_FLAT 512 -#define PS_ENDCAP_MASK 3840 +#define PS_ENDCAP_ROUND 0 +#define PS_ENDCAP_SQUARE 256 +#define PS_ENDCAP_FLAT 512 +#define PS_ENDCAP_MASK 3840 -#define PS_JOIN_ROUND 0 -#define PS_JOIN_BEVEL 4096 -#define PS_JOIN_MITER 8192 -#define PS_JOIN_MASK 61440 +#define PS_JOIN_ROUND 0 +#define PS_JOIN_BEVEL 4096 +#define PS_JOIN_MITER 8192 +#define PS_JOIN_MASK 61440 -#define PS_COSMETIC 0 -#define PS_GEOMETRIC 65536 -#define PS_TYPE_MASK 983040 +#define PS_COSMETIC 0 +#define PS_GEOMETRIC 65536 +#define PS_TYPE_MASK 983040 //-------------------------------------------------------------------// // font weight values -#define FW_DONTCARE 0 -#define FW_THIN 100 -#define FW_EXTRALIGHT 200 -#define FW_ULTRALIGHT 200 -#define FW_LIGHT 300 -#define FW_NORMAL 400 -#define FW_REGULAR 400 -#define FW_MEDIUM 500 -#define FW_SEMIBOLD 600 -#define FW_DEMIBOLD 600 -#define FW_BOLD 700 -#define FW_EXTRABOLD 800 -#define FW_ULTRABOLD 800 -#define FW_HEAVY 900 -#define FW_BLACK 900 +#define FW_DONTCARE 0 +#define FW_THIN 100 +#define FW_EXTRALIGHT 200 +#define FW_ULTRALIGHT 200 +#define FW_LIGHT 300 +#define FW_NORMAL 400 +#define FW_REGULAR 400 +#define FW_MEDIUM 500 +#define FW_SEMIBOLD 600 +#define FW_DEMIBOLD 600 +#define FW_BOLD 700 +#define FW_EXTRABOLD 800 +#define FW_ULTRABOLD 800 +#define FW_HEAVY 900 +#define FW_BLACK 900 //-------------------------------------------------------------------// // font quality values -#define DEFAULT_QUALITY 0 -#define DRAFT_QUALITY 1 -#define PROOF_QUALITY 2 -#define NONANTIALIASED_QUALITY 3 // (WINVER >= 0x0400) -#define ANTIALISED_QUALITY 4 // (WINVER >= 0x0400) +#define DEFAULT_QUALITY 0 +#define DRAFT_QUALITY 1 +#define PROOF_QUALITY 2 +#define NONANTIALIASED_QUALITY 3 // (WINVER >= 0x0400) +#define ANTIALISED_QUALITY 4 // (WINVER >= 0x0400) + +#define ANSI_CHARSET 0 +#define DEFAULT_CHARSET 1 +#define SYMBOL_CHARSET 2 +#define SHIFTJIS_CHARSET 128 +#define HANGEUL_CHARSET 129 +#define HANGUL_CHARSET 129 +#define GB2312_CHARSET 134 +#define CHINESEBIG5_CHARSET 136 +#define OEM_CHARSET 255 +#define JOHAB_CHARSET 130 +#define HEBREW_CHARSET 177 +#define ARABIC_CHARSET 178 +#define GREEK_CHARSET 161 +#define TURKISH_CHARSET 162 +#define VIETNAMESE_CHARSET 163 +#define THAI_CHARSET 222 +#define EASTEUROPE_CHARSET 238 +#define RUSSIAN_CHARSET 204 +#define MAC_CHARSET 77 +#define BALTIC_CHARSET 186 + +#define BOLD_FONTTYPE 256 // 0x0100 +#define ITALIC_FONTTYPE 512 // 0x0200 +#define REGULAR_FONTTYPE 1024 // 0x0400 +#define SCREEN_FONTTYPE 8192 // 0x2000 +#define PRINTER_FONTTYPE 16384 // 0x4000 +#define SIMULATED_FONTTYPE 32768 // 0x8000 //-------------------------------------------------------------------// // flags (CHOOSECOLOR structure) -#define CC_RGBINIT 1 // 0x00000001 -#define CC_FULLOPEN 2 // 0x00000002 -#define CC_PREVENTFULLOPEN 4 // 0x00000004 -#define CC_SHOWHELP 8 // 0x00000008 -#define CC_ENABLEHOOK 16 // 0x00000010 -#define CC_ENABLETEMPLATE 32 // 0x00000020 -#define CC_ENABLETEMPLATEHANDLE 64 // 0x00000040 -#define CC_SOLIDCOLOR 128 // 0x00000080 // WINVER >= 0x0400 -#define CC_ANYCOLOR 256 // 0x00000100 // WINVER >= 0x0400 +#define CC_RGBINIT 1 // 0x00000001 +#define CC_FULLOPEN 2 // 0x00000002 +#define CC_PREVENTFULLOPEN 4 // 0x00000004 +#define CC_SHOWHELP 8 // 0x00000008 +#define CC_ENABLEHOOK 16 // 0x00000010 +#define CC_ENABLETEMPLATE 32 // 0x00000020 +#define CC_ENABLETEMPLATEHANDLE 64 // 0x00000040 +#define CC_SOLIDCOLOR 128 // 0x00000080 // WINVER >= 0x0400 +#define CC_ANYCOLOR 256 // 0x00000100 // WINVER >= 0x0400 //-------------------------------------------------------------------// /* @@ -1268,14 +1296,14 @@ #define OFN_NOREADONLYRETURN 32768 #define OFN_NOTESTFILECREATE 65536 #define OFN_NONETWORKBUTTON 131072 -#define OFN_NOLONGNAMES 262144 // force no long names for 4.x modules -#define OFN_EXPLORER 524288 // new look commdlg +#define OFN_NOLONGNAMES 262144 // force no long names for 4.x modules +#define OFN_EXPLORER 524288 // new look commdlg #define OFN_NODEREFERENCELINKS 1048576 -#define OFN_LONGNAMES 2097152 // force long names for 3.x modules -#define OFN_ENABLEINCLUDENOTIFY 4194304 // send include message to callback +#define OFN_LONGNAMES 2097152 // force long names for 3.x modules +#define OFN_ENABLEINCLUDENOTIFY 4194304 // send include message to callback #define OFN_ENABLESIZING 8388608 #define OFN_DONTADDTORECENT 33554432 -#define OFN_FORCESHOWHIDDEN 268435456 // Show All files including System and hidden files +#define OFN_FORCESHOWHIDDEN 268435456 // Show All files including System and hidden files //----------------------------------------------------------------------// /* Common Control Constants */ @@ -1321,7 +1349,7 @@ #define TB_SETIMAGELIST (WM_USER + 48) #define TB_GETIMAGELIST (WM_USER + 49) #define TB_LOADIMAGES (WM_USER + 50) -#define TB_GETRECT (WM_USER + 51) // wParam is the Cmd instead of index +#define TB_GETRECT (WM_USER + 51) // wParam is the Cmd instead of index #define TB_SETHOTIMAGELIST (WM_USER + 52) #define TB_GETHOTIMAGELIST (WM_USER + 53) #define TB_SETDISABLEDIMAGELIST (WM_USER + 54) @@ -1343,41 +1371,41 @@ #define TB_ADDSTRING TB_ADDSTRINGA #endif -#define TB_GETOBJECT (WM_USER + 62) // wParam == IID, lParam void **ppv +#define TB_GETOBJECT (WM_USER + 62) // wParam == IID, lParam void **ppv #define TB_GETHOTITEM (WM_USER + 71) -#define TB_SETHOTITEM (WM_USER + 72) // wParam == iHotItem -#define TB_SETANCHORHIGHLIGHT (WM_USER + 73) // wParam == TRUE/FALSE +#define TB_SETHOTITEM (WM_USER + 72) // wParam == iHotItem +#define TB_SETANCHORHIGHLIGHT (WM_USER + 73) // wParam == TRUE/FALSE #define TB_GETANCHORHIGHLIGHT (WM_USER + 74) -#define TB_MAPACCELERATORA (WM_USER + 78) // wParam == ch, lParam int * pidBtn +#define TB_MAPACCELERATORA (WM_USER + 78) // wParam == ch, lParam int * pidBtn -#define TB_GETINSERTMARK (WM_USER + 79) // lParam == LPTBINSERTMARK -#define TB_SETINSERTMARK (WM_USER + 80) // lParam == LPTBINSERTMARK -#define TB_INSERTMARKHITTEST (WM_USER + 81) // wParam == LPPOINT lParam == LPTBINSERTMARK +#define TB_GETINSERTMARK (WM_USER + 79) // lParam == LPTBINSERTMARK +#define TB_SETINSERTMARK (WM_USER + 80) // lParam == LPTBINSERTMARK +#define TB_INSERTMARKHITTEST (WM_USER + 81) // wParam == LPPOINT lParam == LPTBINSERTMARK #define TB_MOVEBUTTON (WM_USER + 82) -#define TB_GETMAXSIZE (WM_USER + 83) // lParam == LPSIZE -#define TB_SETEXTENDEDSTYLE (WM_USER + 84) // For TBSTYLE_EX_* -#define TB_GETEXTENDEDSTYLE (WM_USER + 85) // For TBSTYLE_EX_* +#define TB_GETMAXSIZE (WM_USER + 83) // lParam == LPSIZE +#define TB_SETEXTENDEDSTYLE (WM_USER + 84) // For TBSTYLE_EX_* +#define TB_GETEXTENDEDSTYLE (WM_USER + 85) // For TBSTYLE_EX_* #define TB_GETPADDING (WM_USER + 86) #define TB_SETPADDING (WM_USER + 87) #define TB_SETINSERTMARKCOLOR (WM_USER + 88) #define TB_GETINSERTMARKCOLOR (WM_USER + 89) #define TB_SETCOLORSCHEME CCM_SETCOLORSCHEME // lParam is color scheme -#define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME // fills in COLORSCHEME pointed to by lParam +#define TB_GETCOLORSCHEME CCM_GETCOLORSCHEME // fills in COLORSCHEME pointed to by lParam #define TB_SETUNICODEFORMAT CCM_SETUNICODEFORMAT #define TB_GETUNICODEFORMAT CCM_GETUNICODEFORMAT -#define TB_MAPACCELERATORW (WM_USER + 90) // wParam == ch, lParam int * pidBtn +#define TB_MAPACCELERATORW (WM_USER + 90) // wParam == ch, lParam int * pidBtn #ifdef UNICODE #define TB_MAPACCELERATOR TB_MAPACCELERATORW #else #define TB_MAPACCELERATOR TB_MAPACCELERATORA #endif -#define TBIMHT_AFTER 1 // TRUE = insert After iButton, otherwise before -#define TBIMHT_BACKGROUND 2 // TRUE iff missed buttons completely +#define TBIMHT_AFTER 1 // TRUE = insert After iButton, otherwise before +#define TBIMHT_BACKGROUND 2 // TRUE iff missed buttons completely #define TBBF_LARGE 1 @@ -1390,7 +1418,7 @@ #define TBIF_COMMAND 32 #define TBIF_SIZE 64 -#define TBIF_BYINDEX 2147483648 // this specifies that the wparam in Get/SetButtonInfo is an index, not id +#define TBIF_BYINDEX 2147483648 // this specifies that the wparam in Get/SetButtonInfo is an index, not id #ifdef UNICODE #define TBBUTTONINFO TBBUTTONINFOW @@ -1475,33 +1503,33 @@ #define BTNS_DROPDOWN TBSTYLE_DROPDOWN #define BTNS_AUTOSIZE TBSTYLE_AUTOSIZE #define BTNS_NOPREFIX TBSTYLE_NOPREFIX -#define BTNS_SHOWTEXT 64 // ignored unless TBSTYLE_EX_MIXEDBUTTONS is set -#define BTNS_WHOLEDROPDOWN 128 // draw drop-down arrow, but without split arrow section +#define BTNS_SHOWTEXT 64 // ignored unless TBSTYLE_EX_MIXEDBUTTONS is set +#define BTNS_WHOLEDROPDOWN 128 // draw drop-down arrow, but without split arrow section #define TBSTYLE_EX_DRAWDDARROWS 1 #define TBSTYLE_EX_MIXEDBUTTONS 8 -#define TBSTYLE_EX_HIDECLIPPEDBUTTONS 16 // don't show partially obscured buttons +#define TBSTYLE_EX_HIDECLIPPEDBUTTONS 16 // don't show partially obscured buttons #define TBSTYLE_EX_DOUBLEBUFFER 0x00000080 -#define NM_FIRST (0- 0) // generic to all controls +#define NM_FIRST (0- 0) // generic to all controls #define NM_LAST (0- 99) #define NM_OUTOFMEMORY (NM_FIRST-1) -#define NM_CLICK (NM_FIRST-2) // uses NMCLICK struct +#define NM_CLICK (NM_FIRST-2) // uses NMCLICK struct #define NM_DBLCLK (NM_FIRST-3) #define NM_RETURN (NM_FIRST-4) -#define NM_RCLICK (NM_FIRST-5) // uses NMCLICK struct +#define NM_RCLICK (NM_FIRST-5) // uses NMCLICK struct #define NM_RDBLCLK (NM_FIRST-6) #define NM_SETFOCUS (NM_FIRST-7) #define NM_KILLFOCUS (NM_FIRST-8) #define NM_CUSTOMDRAW (NM_FIRST-12) #define NM_HOVER (NM_FIRST-13) -#define NM_NCHITTEST (NM_FIRST-14) // uses NMMOUSE struct -#define NM_KEYDOWN (NM_FIRST-15) // uses NMKEY struct +#define NM_NCHITTEST (NM_FIRST-14) // uses NMMOUSE struct +#define NM_KEYDOWN (NM_FIRST-15) // uses NMKEY struct #define NM_RELEASEDCAPTURE (NM_FIRST-16) -#define NM_SETCURSOR (NM_FIRST-17) // uses NMMOUSE struct -#define NM_CHAR (NM_FIRST-18) // uses NMCHAR struct -#define NM_TOOLTIPSCREATED (NM_FIRST-19) // notify of when the tooltips window is create +#define NM_SETCURSOR (NM_FIRST-17) // uses NMMOUSE struct +#define NM_CHAR (NM_FIRST-18) // uses NMCHAR struct +#define NM_TOOLTIPSCREATED (NM_FIRST-19) // notify of when the tooltips window is create #define NM_LDOWN (NM_FIRST-20) #define NM_RDOWN (NM_FIRST-21) @@ -1528,7 +1556,7 @@ #define TVS_FULLROWSELECT 4096 #define TVS_NOSCROLL 8192 #define TVS_NONEVENHEIGHT 16384 -#define TVS_NOHSCROLL 32768 // TVS_NOSCROLL overrides this +#define TVS_NOHSCROLL 32768 // TVS_NOSCROLL overrides this #define TVN_FIRST (0-400) @@ -1540,6 +1568,12 @@ #define TVN_SELCHANGED TVN_SELCHANGEDA #endif +//----------------------------------------------------------------------// + +#define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1) +#define WM_CHOOSEFONT_SETLOGFONT (WM_USER + 101) +#define WM_CHOOSEFONT_SETFLAGS (WM_USER + 102) + //----------------------------------------------------------------------// #endif //----------------------------------------------------------------------//