Click here to Skip to main content
15,911,786 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Initialising a Second Dialog Pin
sps-itsec464-Feb-04 6:53
sps-itsec464-Feb-04 6:53 
All initialisations of a dialog are usually done in the OnInitDialog() method.
The method OnInitDialog() gets called before a dialog is shown.
So just start the dialog as you have done it already and handle OnInitDialog()
in your CMySecondDlg(). Here's a short example:

MyFirstDlg.cpp:
#include "MySecondDlg.h"
...
CMySeconDlg dlg;
dlg.DoModal()
MySecondDlg.cpp:
BOOL CMySecondDlg::OnInitDialog()
{
    ...
    // TODO: Add extra initialization here
 
    // Here goes all your initialisations
    myEditBox = "Just an example..."
 
    // Display the initialisations
    UpdateData(FALSE);
}
Normally the OnInitDialog() message handler is create by default, so you just have to add your initialisations like above. Otherwise you have to create this message handler by yourself.

Regards, mYkel
GeneralCString to UTF-8 Pin
Rüpel4-Feb-04 3:24
Rüpel4-Feb-04 3:24 
GeneralRe: CString to UTF-8 Pin
Diddy4-Feb-04 3:35
Diddy4-Feb-04 3:35 
GeneralRe: CString to UTF-8 Pin
Rüpel4-Feb-04 4:05
Rüpel4-Feb-04 4:05 
GeneralRe: CString to UTF-8 Pin
Mike Dimmick4-Feb-04 4:17
Mike Dimmick4-Feb-04 4:17 
GeneralRe: CString to UTF-8 Pin
Rüpel4-Feb-04 4:29
Rüpel4-Feb-04 4:29 
QuestionHow to refresh disk content in VMWare ? Pin
vgrigor4-Feb-04 3:17
vgrigor4-Feb-04 3:17 
Generalcontrolling actiions in IE Pin
Abhi Lahare4-Feb-04 3:14
Abhi Lahare4-Feb-04 3:14 
GeneralProblem with static and std::map Pin
inter8ection4-Feb-04 1:42
inter8ection4-Feb-04 1:42 
GeneralRe: Problem with static and std::map Pin
Diddy4-Feb-04 2:03
Diddy4-Feb-04 2:03 
GeneralRe: Problem with static and std::map Pin
inter8ection4-Feb-04 3:34
inter8ection4-Feb-04 3:34 
GeneralRe: Problem with static and std::map Pin
Diddy4-Feb-04 3:44
Diddy4-Feb-04 3:44 
GeneralRe: Problem with static and std::map Pin
inter8ection4-Feb-04 4:01
inter8ection4-Feb-04 4:01 
GeneralRe: Problem with static and std::map Pin
Diddy4-Feb-04 4:07
Diddy4-Feb-04 4:07 
GeneralRe: Problem with static and std::map Pin
inter8ection4-Feb-04 4:40
inter8ection4-Feb-04 4:40 
GeneralRe: Problem with static and std::map Pin
Diddy4-Feb-04 4:47
Diddy4-Feb-04 4:47 
GeneralProblem with Kernel Object Security Pin
particle2k4-Feb-04 1:15
particle2k4-Feb-04 1:15 
GeneralRe: Problem with Kernel Object Security Pin
Alexander M.,4-Feb-04 3:09
Alexander M.,4-Feb-04 3:09 
GeneralRe: Problem with Kernel Object Security Pin
particle2k4-Feb-04 3:31
particle2k4-Feb-04 3:31 
GeneralMultithreading in C++ Pin
TV4-Feb-04 0:11
TV4-Feb-04 0:11 
GeneralRe: Multithreading in C++ Pin
Diddy4-Feb-04 2:11
Diddy4-Feb-04 2:11 
GeneralRe: Multithreading in C++ Pin
TV4-Feb-04 3:58
TV4-Feb-04 3:58 
GeneralRe: Multithreading in C++ Pin
Diddy4-Feb-04 4:30
Diddy4-Feb-04 4:30 
QuestionHow do i get handle to window in IE Pin
User 2155973-Feb-04 23:41
User 2155973-Feb-04 23:41 
AnswerRe: How do i get handle to window in IE Pin
Amr Abdel-Mohsen4-Feb-04 9:20
Amr Abdel-Mohsen4-Feb-04 9:20 

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.