Click here to Skip to main content
15,926,858 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CTabCtrl sizing problem... (property sheet) Pin
Chris Hambleton14-Nov-02 4:31
Chris Hambleton14-Nov-02 4:31 
GeneralDialog placement... Pin
Neha14-Nov-02 0:04
Neha14-Nov-02 0:04 
GeneralRe: Dialog placement... Pin
Christian Graus14-Nov-02 0:27
protectorChristian Graus14-Nov-02 0:27 
GeneralRe: Dialog placement... Pin
Neha14-Nov-02 0:52
Neha14-Nov-02 0:52 
GeneralRe: Dialog placement... Pin
Christian Graus14-Nov-02 1:01
protectorChristian Graus14-Nov-02 1:01 
GeneralRe: Dialog placement... Pin
benjymous14-Nov-02 1:12
benjymous14-Nov-02 1:12 
GeneralRe: Dialog placement... Pin
Neha14-Nov-02 1:25
Neha14-Nov-02 1:25 
GeneralRe: Dialog placement... Pin
benjymous14-Nov-02 2:26
benjymous14-Nov-02 2:26 
It's pretty straightforward. Create a new dialog as a property page type, give it a class (as you would with any normal dialog)

then in the main dialog, do something like this
m_pxSubDialog = new CSubDialog( this );
m_pxSubDialog->SetAnyOptionsEtc();
m_pxSubDialog->Create( IDD_DIALOG_RESOURCE_NAME, this );

m_pxSubDialog->SetWindowPos( ... ); // <- if you want to position the sub dialog

m_pxSubDialog->ShowWindow( SW_SHOW );

(where m_pxSubDialog is a member of the main dialog class, of the type of your new sub dialog, and IDD_DIALOG_RESOURCE_NAME is the name of the dialog in the resource editor.)

To close the sub dialog from the main dialog, use

m_pxSubDialog->DestroyWindow();
delete m_pxSubDialog;
m_pxSubDialog = NULL;




To make your sub dialog communicate with the main one, you can pass messages back from the child to the parent window

--
Help me! I'm turning into a grapefruit!

GeneralRe: Dialog placement... Pin
Neha14-Nov-02 2:53
Neha14-Nov-02 2:53 
GeneralRe: Dialog placement... Pin
benjymous14-Nov-02 3:12
benjymous14-Nov-02 3:12 
QuestionHow to invoke the default mail client from VC Pin
Deepti13-Nov-02 23:45
Deepti13-Nov-02 23:45 
AnswerRe: How to invoke the default mail client from VC Pin
Alexinuk14-Nov-02 4:22
Alexinuk14-Nov-02 4:22 
GeneralRe: How to invoke the default mail client from VC Pin
Deepti14-Nov-02 19:44
Deepti14-Nov-02 19:44 
GeneralRe: How to invoke the default mail client from VC Pin
Alexinuk14-Nov-02 21:26
Alexinuk14-Nov-02 21:26 
GeneralRe: How to invoke the default mail client from VC Pin
Deepti15-Nov-02 1:50
Deepti15-Nov-02 1:50 
QuestionBind NULL ip address and port 0 to a socket? Pin
George213-Nov-02 23:06
George213-Nov-02 23:06 
AnswerRe: Bind NULL ip address and port 0 to a socket? Pin
NormDroid15-Nov-02 9:07
professionalNormDroid15-Nov-02 9:07 
GeneralRe: Bind NULL ip address and port 0 to a socket? Pin
George215-Nov-02 18:48
George215-Nov-02 18:48 
Generaladding shortcut Pin
udayGovekar13-Nov-02 22:28
udayGovekar13-Nov-02 22:28 
GeneralRe: adding shortcut Pin
Iain Clarke, Warrior Programmer13-Nov-02 22:59
Iain Clarke, Warrior Programmer13-Nov-02 22:59 
QuestionHow to connection MSFGrid to ADODC? Pin
YXF13-Nov-02 22:19
YXF13-Nov-02 22:19 
GeneralCSocket non-blocking Pin
Shamoon13-Nov-02 21:51
Shamoon13-Nov-02 21:51 
GeneralRe: CSocket non-blocking Pin
NormDroid15-Nov-02 9:08
professionalNormDroid15-Nov-02 9:08 
GeneralMFC custom controls Pin
s o v a n n13-Nov-02 21:21
s o v a n n13-Nov-02 21:21 
QuestionWhat is the difference between recv and recvfrom? Pin
George213-Nov-02 21:14
George213-Nov-02 21:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.