Solved

question

Posted on 2002-03-18
1
162 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 137
how do i create updater to My Activex application? 3 108
Separate files macro - Errors on larger data set 18 76
Example code 13 42
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.

739 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