Change title for dialog box dynamically 
Author Message
 Change title for dialog box dynamically

I create a dialog box in visual studio and assign a title 'Old Title' for
the dialog. I want to change the title dynamically by calling
dlg.SetWindowText("New Title");
before I call dlg.DoModal();
However, the dialog still shows the "Old Title".
What is wrong here?


Thu, 11 Apr 2002 03:00:00 GMT  
 Change title for dialog box dynamically
Roy,

I think you need to do this in InitDialog. So pass the title to the
constructor.

HTH Andreas



Quote:
> I create a dialog box in visual studio and assign a title 'Old Title' for
> the dialog. I want to change the title dynamically by calling
> dlg.SetWindowText("New Title");
> before I call dlg.DoModal();
> However, the dialog still shows the "Old Title".
> What is wrong here?



Fri, 12 Apr 2002 03:00:00 GMT  
 Change title for dialog box dynamically


Quote:
> Use SetWindowText ( ) function any where

Make that almost any where I think.  If you do it too soon the window handle
isn't valid.


Sat, 13 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. change title for dialog box dynamically

2. Change background color of dialog box title

3. Q: Changing a dialog box's title text

4. How do I change the caption on an MFC Dialog box (dynamically)

5. Dynamically changing text of a menu in a Dialog box

6. How to change DialogBox title text dynamically

7. Can I change window's title color dynamically?(no content)

8. Dynamically changing PropertyPage Title

9. Dynamically change a COlePropertyPage title

10. Dynamically changing main window title bar for an MDI app

11. Application Title - how do I change it dynamically

12. help needed changing Property Page titles dynamically

 

 
Powered by phpBB® Forum Software