Solved

How can I make a button open a dialog?

Posted on 2000-05-05
4
216 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

896 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

16 Experts available now in Live!

Get 1:1 Help Now