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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Dialog Box from a SDI 1

Status
Not open for further replies.

XcamaroX

Programmer
Jul 20, 2004
3
0
0
US
I need to create a Dialox Box that pops up when you do a LButtonDown event. This is from a Single Document Interface, I know that I need to create a SDI from the New Project etc... I do know how to add WM_OnLButtonDown, but I do not know how to implement LButtonDown method to create a Dialog Box, which has a bunch of radio buttons and other stuff.

TIA!!!

Any help is greatly appreciated.
 
You can create a new dialog box class derived from CDialog, with a dialog resource. Switch to "resource view", right click on your .rc file and select "add resource". Then double-click on "dialog". This creates the dialog resource. Then double-click in the dialog resource on the "ok" button. Enter information about your new dialog box and it will create your dialog box class for you, and automatically add it to your project.

To invoke the new dialog box class, include the dialog box class header file from the file where your LButtonDown event is, and in the event handler, declare an object of your dialog box class, and call the DoModal() method on it.
 
Thank you very much, you were right on the money. I voted as a very useful tip.


Thank you again for your time!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top