Change caption of childwindow runtime ? 
Author Message
 Change caption of childwindow runtime ?

How can i change the caption of the new window created
in a mdi app RUNTIME ?

I don't want to have the window's called:  MyWnd1<- Number..

Because there will be several diffrent views with only one instance of each
type...

Bjorn !!



Sun, 15 Oct 2000 03:00:00 GMT  
 Change caption of childwindow runtime ?

Quote:

>How can i change the caption of the new window created
>in a mdi app RUNTIME ?

>I don't want to have the window's called:  MyWnd1<- Number..

>Because there will be several diffrent views with only one instance of each
>type...

>Bjorn !!

For one you have to switch off the default titles in your CChildFrame:

BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
    BOOL bOk=CMDIChildWnd::PreCreateWindow(cs);
    cs.style &= ~FWS_ADDTOTITLE;
    return bOk;

Quote:
}

Then you can set your own titles from inside the View with
GetParentFrame()->SetWindowText("The Title");
eg. in OnInitialUpdate()

cU
--

   http://djuga.home.ml.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*NEW*: Retriever 1.1 is out: http://retriever.home.ml.org

Shareware image viewer, thumbnailer & database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Sun, 15 Oct 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to change on runtime the caption of a C++ dialog app main window

2. How to change on runtime the caption of a C++ dialog app main window

3. Changing a Dialog's CAPTION during runtime

4. Changing Caption of CPropertyPage at runtime?

5. Change popup menu captions at runtime (ModifyMenu)

6. Changing the Caption of a Modal Dialog at Runtime

7. Changing Floating Toolbar Caption Runtime...

8. How to change the caption of a MDI frame at runtime

9. Change the caption of the dialog box

10. How to change the whole title (caption) of a PropertyFrame created with OleCreatePropertyFrame

11. how to change column caption in dbgrid?

12. Easy question: How do I change the caption of a button

 

 
Powered by phpBB® Forum Software