Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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