ToolBar question

How to create toolbar with non rectangle buttons and different backgrown.
Nightmare090197Asked:
Who is Participating?
 
fl0ydConnect With a Mentor Commented:
Nightmare,

    There are two parts to your question. Customizing the background to your needs isn't all that hard. All you need to do is override the OnEraseBknd-function. To do so, use the ClassWizard (tm), select the toolbar and doubleclick the WM_ERASEBKGND message. The OnEraseBknd-fxn provides you with the necessary CDC to do all your drawing.

    I don't know how to change the button shape, though. I'm not sure if it is possible at all. All I can give you is a general outline of what you need to do. There are two steps involved. First, you need to retrieve either a CWnd* or a HWND for each button on the toolbar. Once you have that, call the SetWindowRgn to specify the buttons' shapes.

.f
0
 
Vinayak KumbarSr Program ManagerCommented:
Hi,

Go to the following link.

http://www.codeguru.com/toolbar/index.shtml

U may get some useful samples.
Try it out.
VinExpert
0
 
Nightmare090197Author Commented:
I have seem that, nothing about my question.
0
 
Nightmare090197Author Commented:
Thanks for good idea :)
0
All Courses

From novice to tech pro — start learning today.