Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

ToolBar question

How to create toolbar with non rectangle buttons and different backgrown.
0
Nightmare090197
Asked:
Nightmare090197
  • 2
1 Solution
 
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
 
fl0ydCommented:
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
 
Nightmare090197Author Commented:
Thanks for good idea :)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now