Newbie : Adding Menu Bar and Tool Bar to Dialog Based App 
Author Message
 Newbie : Adding Menu Bar and Tool Bar to Dialog Based App

Hello,

Novice seeking help. I would like to add a menu bar and a tool bar to
a dialog based application. I have trawled through the help and
scowered ( as best I cold ) the microsoft web pages for clues as to
how to do it. Unfortunately because I am a newbie, I may well have
been looking in the correct places but because a lot of the
terminology is still very new ( and unknown ) to me I may not have
appreciated what I was lookuing at.

If anyone is able to point me in the right direction ( often just
starting is the most difficult part ) I would be very grateful. ( Code
samples would be a dream if anyone has the time - or a pointer to
where I might find suitable code samples ).

Kind regards,

Paul Ainscough



Sat, 30 Dec 2000 03:00:00 GMT  
 Newbie : Adding Menu Bar and Tool Bar to Dialog Based App
this KB sample shows it
SAMPLE: Adding Control Bars to Dialog Boxes in MFC
Last reviewed: July 7, 1997
Article ID: Q141751
http://support.microsoft.com/support/kb/articles/q141/7/51.asp

--
-------------------------------------------------------
Rajesh Parikh
Microsoft Certified Solution Developer

-------------------------------------------------------


Quote:
>Hello,

>Novice seeking help. I would like to add a menu bar and a tool bar to
>a dialog based application. I have trawled through the help and
>scowered ( as best I cold ) the microsoft web pages for clues as to
>how to do it. Unfortunately because I am a newbie, I may well have
>been looking in the correct places but because a lot of the
>terminology is still very new ( and unknown ) to me I may not have
>appreciated what I was lookuing at.

>If anyone is able to point me in the right direction ( often just
>starting is the most difficult part ) I would be very grateful. ( Code
>samples would be a dream if anyone has the time - or a pointer to
>where I might find suitable code samples ).

>Kind regards,

>Paul Ainscough



Sat, 30 Dec 2000 03:00:00 GMT  
 Newbie : Adding Menu Bar and Tool Bar to Dialog Based App
For toolbars check out KB Article Q141751 "SAMPLE: Adding Control Bars to
Dialog Boxes in MFC". This samples show how to do that and use some other
things like status bars.

For menus, you can just edit the dialog resource and set the menu id in the
Menu: box on the properties for the dialog resource.

Tomas Restrepo



Quote:
>Hello,

>Novice seeking help. I would like to add a menu bar and a tool bar to
>a dialog based application. I have trawled through the help and
>scowered ( as best I cold ) the microsoft web pages for clues as to
>how to do it. Unfortunately because I am a newbie, I may well have
>been looking in the correct places but because a lot of the
>terminology is still very new ( and unknown ) to me I may not have
>appreciated what I was lookuing at.

>If anyone is able to point me in the right direction ( often just
>starting is the most difficult part ) I would be very grateful. ( Code
>samples would be a dream if anyone has the time - or a pointer to
>where I might find suitable code samples ).

>Kind regards,

>Paul Ainscough



Sat, 30 Dec 2000 03:00:00 GMT  
 Newbie : Adding Menu Bar and Tool Bar to Dialog Based App
Try the sample program that comes on the Visual C++ CD called Dlgcbr32.
It implements a toolbar control and a status bar control in a dialog based
application.  The code is easy to follow, and very well documented.

Implementing a menu bar is just a matter of inserting a menu resource into
your project using the resource editor, and then specifying that menu from
the property page of your dialog control.

Hope this helps.
Lance S. Doddridge


Quote:
> Hello,

> Novice seeking help. I would like to add a menu bar and a tool bar to
> a dialog based application. I have trawled through the help and
> scowered ( as best I cold ) the microsoft web pages for clues as to
> how to do it. Unfortunately because I am a newbie, I may well have
> been looking in the correct places but because a lot of the
> terminology is still very new ( and unknown ) to me I may not have
> appreciated what I was lookuing at.

> If anyone is able to point me in the right direction ( often just
> starting is the most difficult part ) I would be very grateful. ( Code
> samples would be a dream if anyone has the time - or a pointer to
> where I might find suitable code samples ).

> Kind regards,

> Paul Ainscough



Sat, 30 Dec 2000 03:00:00 GMT  
 Newbie : Adding Menu Bar and Tool Bar to Dialog Based App
With menu bars, you just open your dialog in the dialog editor, right click
on it and go to properties.  Then, assuming you already have made your menu
in the resource (by going to your resources tab, right clicking on your
program name that appears in bold, and picking Insert--then choose Menu and
pick New), you should see Menu in the lower right corner and your menu
should be one of the choices in the drop-down box.  Then it's attached.  To
use buttons with it, the easiest way is to double-click on your menu so it
shows up in the editor and then go to ClassWizard.  It should ask you if you
want to use and existing class or a new one.  Choose an existing class and
pick the one that says <your program>Dlg (ie, MyProgDlg).  Then you should
see all of the ID's of your menu in the Message Maps where you can add
functions and stuff.

As for a toolbar--that one is tricky.  The best code I've found is at
www.codeguru.com under dialog--something like "Toolbars and status bars in a
dialog" or something.  I've tried looking at the sample Microsoft gives, but
this is way less complicated because it has the code right there for ya.
Just make sure that if you decide to take the code and paste it that you, in
your message maps (if you don't know what I mean, you will), put the two
lines AFTER the commented AFX thing, because if you don't, ClassWizard won't
know where your functions are.  I hope this helps.  If you need
clarification on this or if I said it too strange and you don't get it, then
just email me and I'll explain more.

Hope this helps,



Quote:
>Hello,

>Novice seeking help. I would like to add a menu bar and a tool bar to
>a dialog based application. I have trawled through the help and
>scowered ( as best I cold ) the microsoft web pages for clues as to
>how to do it. Unfortunately because I am a newbie, I may well have
>been looking in the correct places but because a lot of the
>terminology is still very new ( and unknown ) to me I may not have
>appreciated what I was lookuing at.

>If anyone is able to point me in the right direction ( often just
>starting is the most difficult part ) I would be very grateful. ( Code
>samples would be a dream if anyone has the time - or a pointer to
>where I might find suitable code samples ).

>Kind regards,

>Paul Ainscough



Tue, 02 Jan 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Adding a status bar to a Dialog-based App

2. How to put Menu bar and Tool Bar in same row

3. How to remove menu bar and tool bar

4. Adding Tool amd Status Bar to Dialog Window.

5. Status bar in a dialog based app

6. Status bar in a dialog based app

7. Add menu bar to dialog box.

8. how can i add menu and button bar to a dialog

9. Howto Add a menu bar to a Dialog box

10. Add Drop-Down Menu To A Dialog Bar ?

11. trying to add menu to dialog based app

12. Adding menu items to Excel menu bar with open activation

 

 
Powered by phpBB® Forum Software