HyperEngineer
Programmer
Hi,
I'm trying to change the window text and the text in a static text control on a modal dialog.
In order to make the changes I have to use the Create() member function, but this creates a modeless dialog.
If I use the DoModal() member function, I can't change the text.
Code:
CAboutDlg* aboutDialog = new CAboutDlg; // A
aboutDialog->Create(IDD_ABOUTBOX, this); // B
aboutDialog->SetWindowText("T1 NIU"); // C
aboutDialog->GetDlgItem(IDD_MESSAGE_TEXT)->SetWindowText("Action"); // D
aboutDialog->ShowWindow(SW_SHOW); // E
aboutDialog->DoModal(); // F
Either A,B,C,D,E or A,F but not A,B,C,D,E,F.
Any help on changing the text would be much appreciated.
Thanks,
Hyper
I'm trying to change the window text and the text in a static text control on a modal dialog.
In order to make the changes I have to use the Create() member function, but this creates a modeless dialog.
If I use the DoModal() member function, I can't change the text.
Code:
CAboutDlg* aboutDialog = new CAboutDlg; // A
aboutDialog->Create(IDD_ABOUTBOX, this); // B
aboutDialog->SetWindowText("T1 NIU"); // C
aboutDialog->GetDlgItem(IDD_MESSAGE_TEXT)->SetWindowText("Action"); // D
aboutDialog->ShowWindow(SW_SHOW); // E
aboutDialog->DoModal(); // F
Either A,B,C,D,E or A,F but not A,B,C,D,E,F.
Any help on changing the text would be much appreciated.
Thanks,
Hyper