I have tried to change the caption for a modal dialog with this code:

CMyDia dlg;
dlg.SetWindowsText("Hello World");
dlg.DoModal();




The code compiles and runs but the caption will not change. The CMyDia class is just a dialog with a static text. The class is created by ClassWizard.
The code is in a dll.
//Anders