?
Solved

How can I make a button open a dialog?

Posted on 2000-05-05
4
Medium Priority
?
225 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

809 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