Solved

Dynamically add Item to CToolBar

Posted on 1997-09-11
3
389 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
Comment Utility
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
Comment Utility
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
Comment Utility
BTW , How to fresh the Toolbar after adding new button .
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 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

10 Experts available now in Live!

Get 1:1 Help Now