Solved

Dynamically add Item to CToolBar

Posted on 1997-09-11
3
405 Views
Last Modified: 2013-11-20
Hi , I have a question that Is it possible to Dynamically
add a new button to CtoolBar object. I can do it by subclass
the CToolBar class at initialization. But what I want to do
is Dynamically adding a truely new button(not know of it at initialization). Who know of it ?
0
Comment
Question by:lwei
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 50 total points
ID: 1306169
You can both add and delete buttons to the toolbar by accessing corresponding member functions of class CToolbarCtrl:
to add button AddButtons, to delete - DeleteButton, to insert button -  InsertButton. To obrain pointer to CToolbarCtrl you can call CToolbar's GetToolbarCtrl() function. You laso can use toolbar control messages instead of these functions
0
 
LVL 1

Author Comment

by:lwei
ID: 1306170
Yea , I know of it . But When I append a button , there is
some dot in the old toolbar ?

0
 
LVL 1

Author Comment

by:lwei
ID: 1306171
BTW , How to fresh the Toolbar after adding new button .
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

Suggested Solutions

Title # Comments Views Activity
ODBC Connection Logging, ADO.NET 6 71
Unix Command -- Challenging  question 7 101
x-bar in Google Sheets 2 91
Problem to Office 1 40
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

740 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