English
Forum

OwnerDraw Button

 

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

13 kB
Hochgeladen:06/16/07
Downloadcounter101
Download
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
06/16/07  
 



gives too

ODS_HOTLIGHT = { $40 | 64 }
ODS_INACTIVE = { $80 | 128 }
 
06/16/07  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

591 Views

Untitledvor 0 min.
H.Brill01/10/19
Peter Max Müller11/13/17
Joerg06/24/16
Ernst01/11/15
More...

Themeninformationen

this Topic has 2 subscriber:

iF (1x)
Detlef Jagolski (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie