marb
asked on
Change title (caption) of CDialog at runtime
Hi,
how can I change the caption of my CDialog instance at runtime?
Thank you in advance...
Martin
how can I change the caption of my CDialog instance at runtime?
Thank you in advance...
Martin
ASKER
NoteDialog is the name of my dialog class.
When a button is clicked, I wan't to open the dialog. I did like this:
NoteDialog dlg;
dlg.DoModal();
This works, but if I add the line
NoteDialog dlg;
dlg.SetWindowText("Note1") ;
dlg.DoModal();
The app crashes!
When a button is clicked, I wan't to open the dialog. I did like this:
NoteDialog dlg;
dlg.DoModal();
This works, but if I add the line
NoteDialog dlg;
dlg.SetWindowText("Note1")
dlg.DoModal();
The app crashes!
Add the code to your OnInitDialog method in your Dialog class.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works...
Thank you Axter for your immidiate answer. It's great to have people like you on Experts Exchange!
Martin
Thank you Axter for your immidiate answer. It's great to have people like you on Experts Exchange!
Martin
Call SetWindowText
David Maisonave :-)
Cheers!