
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~