while i can use Menu with Gradient i like to ask if Fivewin have Combobox with Gradient
![Question :?:](./images/smilies/icon_question.gif)
i can change Foreground and Background Color into Dark-Mode but Highlight Bar ( COLOR_HIGHLIGHT ) have normal Color
btw. does Fivewin have a "Ownerdraw" Sample
![Question :?:](./images/smilies/icon_question.gif)
Antonio Linares wrote:Please review FWH\samples\ownerdra.prg
METHOD DrawItem( nIdCtl, nPStruct ) CLASS TComboBox
...
uVal := LbxDrawItem( nPStruct, ::aBitmaps, ::aItems, ::nBmpWidth, ::bDrawItem )
else
uVal := Eval( ::bOwnerDraw, Self, nIdCtl, TDrawItemStruct():New( nPStruct ), nPStruct )
oCombo_left:bOwnerDraw := {|a,b,c,d| DoMyComBo(a,b,c,d) }
FUNCTION DoMyComBo()
nCount := PCOUNT()
FOR ii := 1 TO nCount
xPara := PValue(ii)
DO CASE
CASE ii = 1 ; oSelf := xPara
CASE ii = 2 ; nIdCtl := xPara
CASE ii = 3 ; aStruc := xPara
CASE ii = 4 ; nPointer := xPara
ENDCASE
NEXT
fwlog "DoMyComBo()",nCount, IF(VALTYPE(oSelf) = "O","Object",oSelf) , nIdCtl , VAR2CHAR( aStruc ), nPointer
RETURN 0
uVal := Eval( ::bOwnerDraw, Self, nIdCtl, TDrawItemStruct():New( nPStruct ), nPStruct )
"DoMyComBo()" = "DoMyComBo()"
nCount = 4
IF(VALTYPE(oSelf) = "O","Object",oSelf) = "Object"
nIdCtl = 109
VAR2CHAR( aStruc ) = "__itemSetObj( {{CTLTYPE, 3}, {CTLID, 109}, {ITEMID, 0}, {ITEMACTION, 1}, {ITEMSTATE, 4096}, {HWNDITEM, 1770774}, {HDC, 1157698194}, {ARECT, {3, 3, 35, 70}}, {ITEMDATA, `ę}}, {{TDRAWITEMSTRUCT,}} )"
nPointer = 1373540
CASE itemAction = ODA_SELECT
CASE itemAction = ODA_DRAWENTIRE
CASE itemAction = ODA_FOCUS
Antonio Linares wrote:Where could we download it from to test it ?
cDLL := WinDir + "\System32\imageres.dll"
DO CASE
CASE acType[ itemID + 1 ] = DRIVE_UNKNOWN
nResID := 75
CASE acType[ itemID + 1 ] = DRIVE_NO_ROOT_DIR
nResID := 32
CASE acType[ itemID + 1 ] = DRIVE_REMOVABLE
IF SUBSTR( acItem[ itemID + 1 ], 1, 1 ) $ "AB"
nResID := 23
ELSE
cDLL := WinDir + "\System32\DDORes.dll"
nResID := 2389
ENDIF
CASE acType[ itemID + 1 ] = DRIVE_FIXED
IF SUBSTR( acItem[ itemID + 1 ], 1, 2 ) = "C:"
nResID := 36
ELSE
nResID := 32
ENDIF
CASE acType[ itemID + 1 ] = DRIVE_REMOTE
nResID := 33
CASE acType[ itemID + 1 ] = DRIVE_CDROM
nResID := 30
CASE acType[ itemID + 1 ] = DRIVE_RAMDISK
nResID := 34
ENDCASE
hModule := GetModuleHandle( cDLL )
IF hModule == 0
hModule := LoadLibrary( cDLL )
ENDIF
nIcoHandle := LOADIMAGERESICON( hModule, nResID, 32 )
DrawIconEx( hDC, ;
nTop, ;
nLeft, ;
nIcoHandle, ;
nSize, ;
nSize, ;
0, ; // _In_ UINT istepIfAniCur,
0, ; // _In_opt_ HBRUSH hbrFlickerFreeDraw,
nOr( DI_NORMAL ) ) // _In_ UINT diFlags
DestroyIcon( nIcoHandle )
FreeLibrary( hModule )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 41 guests