Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

question

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
prinx
Asked:
prinx
1 Solution
 
shilpa_JbCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now