| |
|
|
Detlef Jagolski | Hello Community!
I Have there already some probiert , Button with OWNERDRAW. me missing but unfortunately a Einstellmöglichkeit, if I with the mouse over the Button drive ought to I again something new draw can.
unfortunately are but only following Opportunities present:
ODS_CHECKED ODS_COMBOBOXEDIT ODS_DEFAULT ODS_DISABLED ODS_FOCUS ODS_GRAYED ODS_SELECTED CompileMarkSeparation
Proc WinProc
Parameters Wnd&, Message&, wParam&, lParam&
If Message& = ~WM_MEASUREITEM
EndIf
If Message& = ~WM_DRAWITEM
lpdis# = lParam&
If Long(lpdis#,0) = ~ODT_BUTTON
Long Rect#,0 = Long(lpdis#,28)
Long Rect#,4 = Long(lpdis#,32)
Long Rect#,8 = Long(lpdis#,36)
Long Rect#,12 = Long(lpdis#,40)
ButtonText$ = GetText$(lpdis#.hwndItem&)
If Long(lParam&,12) & ~ODA_DRAWENTIRE
HDCGradientFill (Long(Rect#,0),Long(Rect#,4),Long(Rect#,8),Long(Rect#,12),Color_FirstIconBack1&,Color_EndIconBack1&,128,1,lpdis#.HDC&)
ElseIf Long(lParam&,12) & ~ODA_FOCUS
HDCGradientFill (Long(Rect#,0),Long(Rect#,4),Long(Rect#,8),Long(Rect#,12),Color_FirstIconBack2&,Color_EndIconBack2&,128,1,lpdis#.HDC&)
ElseIf Long(lParam&,12) & ~ODA_SELECT
If Long(lParam&,16) & ~ODS_SELECTED
HDCGradientFill (Long(Rect#,0),Long(Rect#,4),Long(Rect#,8),Long(Rect#,12),Color_FirstIconBack3&,Color_EndIconBack3&,128,1,lpdis#.HDC&)
Else
HDCGradientFill (Long(Rect#,0),Long(Rect#,4),Long(Rect#,8),Long(Rect#,12),Color_FirstIconBack1&,Color_EndIconBack1&,128,1,lpdis#.HDC&)
EndIf
EndIf
~SetBkMode(lpdis#.HDC&,~TRANSPARENT)
~DrawText(lpdis#.HDC&,Addr(ButtonText$),Len(ButtonText$),Rect#,~DT_CENTER | ~DT_VCENTER | ~DT_SINGLELINE)
EndIf
EndIf
Return ~CallWindowProc(OldWindowsProc&, Wnd&, Message&, wParam&, lParam&)
ENDPROC
Regards Detlef |
|
|
| XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11 | 06/16/07 ▲ |
|
|
|
|
| gives too
ODS_HOTLIGHT = { $40 | 64 } ODS_INACTIVE = { $80 | 128 } |
|
|
| |
|
|