Solved

How can I make a button open a dialog?

Posted on 2000-05-05
4
213 Views
Last Modified: 2010-04-02
I'm trying to make a dialog based app, but I don't know how to get a button (A button like the OK button) to open up a dialog that I've made. For example, since there isn't any Menu in a dialog based app I can't get the ABOUTBOX dialog to show up. How would I make a button that says "About" open up the About Dialog?

Thanx
0
Comment
Question by:klutch555
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
Shay050799 earned 65 total points
ID: 2780412
out a new button on the dialog
in class wizard, set an event to WM_CLICK

and do the following:
CAboutDlg dlg;
dlg.DoModal()

that will lunch ur dialog as modal dialog, means u have to dismiss this dialog in order to get back to the one that lunched it

Shay
0
 

Expert Comment

by:JohnPhelps
ID: 2780983
I am not sure which compiler you are using, but in the handler for a button that is on your main form you could activate any other dialog.

Either using WM_CLICK (As shown above) or using the OnClick event etc.

If you expand a little on your environment, I can help you more.
0
 

Expert Comment

by:JohnPhelps
ID: 2780987
I am not sure which compiler you are using, but in the handler for a button that is on your main form you could activate any other dialog.

Either using WM_CLICK (As shown above) or using the OnClick event etc.

If you expand a little on your environment, I can help you more.
0
 

Author Comment

by:klutch555
ID: 2790423
I'm using Windows 95, Visual C++ 6.0 Standard. I'm making a MFC DIalog Based program. And becuase the dialog based programs don't have menus, I have to make buttons to open new dialogs (Acually, I just want to).

I made a project named LiPHiM, MFC Dialog based, and I want to add a button on the main dialog to open another dialog. How would I do this? I'm new to C++, so please explain as well as you can.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

747 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

12 Experts available now in Live!

Get 1:1 Help Now