Solved

Customize Toolbar Dialog

Posted on 1998-08-20
3
427 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

726 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