Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Owner Drawn Trackbar (Slider) in a dialog

432 views
Skip to first unread message

Eric

unread,
Dec 19, 2006, 11:13:52 AM12/19/06
to
Hello everyone !

I would like to know how to code an owner drawn slider in a dialog box
? I know how to do it for a mere button (set the "owner draw" property
from the property page, then answer to the WM_DRAWITEM message in the
dialog box procedure).

Unfortunately, this seems not to be working for a trackbar control. How
to draw it ? How to manage the mobile part of the control ?

Any help would be welcome :)

Christian ASTOR

unread,
Dec 19, 2006, 11:27:11 AM12/19/06
to
Eric a écrit :

> I would like to know how to code an owner drawn slider in a dialog box
> ? I know how to do it for a mere button (set the "owner draw" property
> from the property page, then answer to the WM_DRAWITEM message in the
> dialog box procedure).

Use Custom Draw

Eric

unread,
Dec 19, 2006, 12:12:03 PM12/19/06
to

Christian ASTOR a écrit :
>
> Use Custom Draw


You mean, to catch WM_PAINT messages ?

I thought of this solution, but how do I manage the position of the
slider ? Is there an equivalent of a DRAWITEMSTRUCT that could give me
this information ?

Christian ASTOR

unread,
Dec 19, 2006, 12:31:59 PM12/19/06
to
Eric a écrit :

> Christian ASTOR a écrit :
> >
> > Use Custom Draw
>
>
> You mean, to catch WM_PAINT messages ?

No, NM_CUSTOMDRAW.
e.g., old thread : http://tinyurl.com/y7qcou

Eric

unread,
Dec 19, 2006, 12:49:11 PM12/19/06
to

Thank you for the link :)
I'll try that way.

Christian ASTOR a écrit :

Michael K. O'Neill

unread,
Dec 19, 2006, 1:35:59 PM12/19/06
to
Another article on custom draw for trackbars (using MFC's CSliderCtrl
class): "Customizing the Appearance of CSliderCtrl Using Custom Draw" at
http://www.codeproject.com/miscctrl/CustomDrawCSliderCtrl.asp


"Eric" <eric....@gmail.com> wrote in message
news:1166550551.7...@i12g2000cwa.googlegroups.com...

0 new messages