Learn how to a build a cloud-first strategyRegister Now

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

Connecting Dialog Boxes for outside Files

I have created several dialog boxes in their own files not in the same one and I want to connect them together.  One dialog box is a menu and I want to connect that box to another box which is a screen I made. How do I do this?
Thanks!
0
troy24
Asked:
troy24
  • 2
1 Solution
 
slinkyCommented:
I'm not sure what you are trying to do.
more details?
0
 
joakimfCommented:
Alright, lets say you want to connect them in MyFile.cpp this is what you do:

In MyFile.h add the following:

CMyDialog m_MyDialog;  //Where MyDialog is the name of your Dialog class

Then in MyFile.cpp add the following:

m_MyDialog.DoModal();

This opens MyDialog and then you have to handle the events in the CMyDialog.cpp file.

You can practicly open how many of this Dialog as you like by doing it this way.
Just replace CMyDialog with your Dialogs name.

Good luck....
0
 
joakimfCommented:
I´m sorry I forgot one important thing. You must include MyDialog.h in MyFile.h otherwise you will get error because CMyDialog will be unidentified......

Just type

#include "MyDialog.h"

above your CMyFile class....
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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