Solved

Tool Bar

Posted on 2000-04-16
3
192 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 50 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

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

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 165
xyBalance chalenge 58 88
Named range not carried over 10 62
while loop over for loop 7 93
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 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

23 Experts available now in Live!

Get 1:1 Help Now