Solved

Dynamic Toolbar

Posted on 1997-07-24
3
219 Views
Last Modified: 2013-11-20

In my MDI Doc/View application, I need to replace at runtime the mainframe
toolbar in order to reflect the active child window.

How can I do?
0
Comment
Question by:winmeister
3 Comments
 
LVL 3

Accepted Solution

by:
jaba earned 50 total points
ID: 1302790
When you registring CMultiDocTemplateit have parameter - resource ID. All resources for this doc/view must have this ID ( menu , toolbar etc.) MFC load it automatic
0
 
LVL 1

Author Comment

by:winmeister
ID: 1302791
Mmmm, maybe. But it doesn't work on my side.
0
 

Expert Comment

by:paulnorth
ID: 1302792
I have the same problem.  Specification of the resource ID when registering the template ONLY affects the menu, NOT the toolbar.
You must do a LoadToolBar in CMainFrame.  However, I am experiencing a problem with this.  If the new toolbar is longer than the original you will not see the buttons that extend beyond it until the Contral bar that contains it is touched or the mainframe is resized.  The answer wasn't worth 5 points, it's wrong.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

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…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

11 Experts available now in Live!

Get 1:1 Help Now