Solved

ToolBar question

Posted on 2002-07-30
4
160 Views
Last Modified: 2013-11-20
How to create toolbar with non rectangle buttons and different backgrown.
0
Comment
Question by:Nightmare090197
  • 2
4 Comments
 
LVL 8

Expert Comment

by:VinExpert
ID: 7188732
Hi,

Go to the following link.

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

U may get some useful samples.
Try it out.
VinExpert
0
 

Author Comment

by:Nightmare090197
ID: 7188759
I have seem that, nothing about my question.
0
 
LVL 8

Accepted Solution

by:
fl0yd earned 200 total points
ID: 7189314
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
 

Author Comment

by:Nightmare090197
ID: 7190831
Thanks for good idea :)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now