Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

new project - SD, dialog based, win32, MCF?

Status
Not open for further replies.

joelwenzel

Programmer
Jun 28, 2002
448
Hello,

I've created a program that does a simple graph on an SDI document window. Now I want to add some more features which means redesigning my project.

I want it to be in a mian dialog so that I can have tabs, check boxes, etc.

So should I set it up as an SDI document or dialog based? I kind of think it should be SDI because I will want to save stuff and I want to have a menu bar (I can't figure out how to get a menu bar in Dialog based programs but I'm sure it must be possible).

Also, what is the difference between a MCF project and a Win32 Project?
 
Make a copy of your project before.
Open the existing SDI project.
Using the Resource Editor , add a new Resource as DIALOG
Assign an ID and name for this resource.
There are already OK and Cancel buttons. Remove if you no need.
Use Class Wizard to associate a class to this dialog which will have a CDialog as base class.
Now you have CMyDialog class generated and should not have errors when linking.
Try to execute your app.
The dialog is not there because it must be instantiated.
Put somewhere the following lines, let say in an existing handler associated to an existing menu item:
CMyDialog dlg;
dlg.DoModal;
Include "mydialog.h" in the file where you put the above statements or in the stdafx.h for precompiled headers.
Link and execute by selecting the above menu item.
You should see the dialog.
Now add a menu item just, let say, DisplayAccount and in the associated handler just add the above 2 lines.
The next step si to return to resource editor, open the dialog resource defined above and add in a TabControl , CheckBox, RadioButton and Buttons using toolbox and Class Wizard.
-obislavu-
 
So is this the best method? I want the dialog open the entire time the program is running.

What about adding a menu to a dialog based MFC application? Is such a feat even possible?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top