Solved

question

Posted on 2002-03-18
1
160 Views
Last Modified: 2013-11-20
i create a new dialog resource..and wants to show this new dialog when i click on a button on the main dialog..

msvc++ ask me whether to create a new class for the resource or not. what should i choose/do ?
0
Comment
Question by:prinx
1 Comment
 
LVL 2

Accepted Solution

by:
shilpa_Jb earned 100 total points
ID: 6879116
Hi,
When it asks to create new class say yes..
and give class name as CMyDialog or what ever name u want to give and select base class as CDialog.
Now look at the following code...
MainDialog.h //File
#include Mydialog.h
{
public:
CMyDialog m_dialg;//create member variable of the new dialog class.
};
MainDialog.cpp//File
Say u have onbuttonclick method as
void MainDialog::OnButtonClick()
{
 m_dialg.DoModal();
}
That should show a new dialog when u click a button.
hope that does ur job.
-Shilpa
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 178
Macro to save highlighted rows as a separate file 5 43
iSeries DB2 Query 2 95
Problem to open Excel file 15 133
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 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