Solved

ToolBar question

Posted on 2002-07-30
4
159 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

21 Experts available now in Live!

Get 1:1 Help Now