Solved

Should All Dialog Boxes be in the same file?

Posted on 1998-08-06
3
220 Views
Last Modified: 2010-04-02
Have made several dialog boxes in different files and I am trying to connect them together. One dialog box is a menu in which I want to call other dialog boxes. How do I open one dialog box from another?
0
Comment
Question by:troy24
3 Comments
 
LVL 2

Accepted Solution

by:
jstolan earned 50 total points
ID: 1169544
No don't put them in the same file.  This is legal, but it's much harder to keep track of them.

Each dialog box should have an associated .h file.  Simply add that to the list of include files for functions that need to access them.  Here is a snippet that assumes you're using classes derived from CDialog for your code.

In dialog box 2 which calls dialog box 1 do this:

#include <stdafx.h>

// other includes

#include "Dialog2.h"


void CDialog1::CallingFunction()
{
    CDialog2 myDlg2;
    myDlg2.DoModal();
}
0
 
LVL 22

Expert Comment

by:nietod
ID: 1169545
>> No don't put them in the same file.  This is legal, but it's much harder to keep track of them
That is just a matter of opinion.  You should organize them however is convenient for your project.  I have a project with 100s of dialogs.  I would not like to have each on in a seperate file.  
0
 

Author Comment

by:troy24
ID: 1169546
Thanks for the Help
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

820 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