[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Tool Bar

Posted on 2000-04-16
3
Medium Priority
?
230 Views
Last Modified: 2013-11-20
How to delete a button from tool bar after creation
0
Comment
Question by:TCNT
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 150 total points
ID: 2721949
Hi TCNT,

assuming your toolbar object is 'm_wndToolBar' and the button you want to delete has ID ID_BUTTON1 you can do:

CToolBarCtrl& toolBarCtrl = m_wndStatusBar.GetToolBarCtrl();
UINT id = toolBarCtrl.CommanToIndex( ID_BUTTON1 );
toolBarCtrl.DeleteButton( id ); // or you can use HideButton()

hope that helps,

ZOPPO
0
 

Author Comment

by:TCNT
ID: 2722133
This should be the correct line.
CToolBarCtrl& toolBarCtrl = m_wndToolBar.GetToolBarCtrl();
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 2722139
uups, sorry and thanx for correction      :)
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

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. …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
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.
Suggested Courses
Course of the Month18 days, 7 hours left to enroll

830 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