Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Customize Toolbar Dialog

Posted on 1998-08-20
3
Medium Priority
?
435 Views
Last Modified: 2012-05-04
I am trying to get the Customize Toolbar dialog available in MFC to work. I have done the following:

1. Added the CCS_ADJUSTABLE style.

int CMyToolBar::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
      if (CToolBar::OnCreate(lpCreateStruct) == -1)
            return -1;
      ModifyStyle(0, CCS_ADJUSTABLE);
            return 0;
}

2. I am trying to pop up the dialog by doing the following:

  m_wndToolBar.GetToolBarCtrl().Customize();

I see the dialog flashing, and then it disappears.

Can anyone tell me what I am missing? I know there is a lot more work I need to do to make the dialog functional. At this stage, I am only trying to display it.


Thanks!
0
Comment
Question by:sonal072198
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Author Comment

by:sonal072198
ID: 1170821
Edited text of question
0
 
LVL 7

Expert Comment

by:psdavis
ID: 1170822
Before you get an answer, why don't you delete this and put it in the MFC section?
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 150 total points
ID: 1170823
No need to do that psdavis :-)

To support customization, your toolbar's parent window must handle the customization notification messages as described in CToolBarCtrl: Handling Customization Notifications.

For some full sample go to
http://www.codeguru.com
Click "Toolbar" on the left hand side
You will find several samples, 4 of which are specifically about toolbar customization

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.

Question has a verified solution.

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

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

604 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