Caption Text for MDI Frame 
Author Message
 Caption Text for MDI Frame

Hi friends, How can change i change permanently the caption for  MDI Frame
window to be other than IDR_MAINFRAME string.

Do i have to change the resource id string IDR_MAINFRAME ?
Thanks



Sat, 07 Aug 2004 01:28:50 GMT  
 Caption Text for MDI Frame

Quote:
>Hi friends, How can change i change permanently the caption for  MDI Frame
>window to be other than IDR_MAINFRAME string.

MFC uses a special style FWS_ADDTOTITLE. If you remove this style from
the MDI frame window when it's created, MFC won't adjust the caption
text. You'd normally remove the style in the PreCreateWindow handler.
Have a look at Knowledge Base article Q99182 "HOWTO: Change an
MFC-Based MDI Child Window's Frame Text".

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 07 Aug 2004 01:42:55 GMT  
 Caption Text for MDI Frame
Thanks David,  my toolbar buttons are disabled is it because i don't have
updatecommandui handlers for them.
Thanks


Quote:
> >Hi friends, How can change i change permanently the caption for  MDI
Frame
> >window to be other than IDR_MAINFRAME string.

> MFC uses a special style FWS_ADDTOTITLE. If you remove this style from
> the MDI frame window when it's created, MFC won't adjust the caption
> text. You'd normally remove the style in the PreCreateWindow handler.
> Have a look at Knowledge Base article Q99182 "HOWTO: Change an
> MFC-Based MDI Child Window's Frame Text".

> Dave
> --
> MVP VC++ FAQ: http://www.mvps.org/vcfaq
> My address is altered to discourage junk mail.
> Please post responses to the newsgroup thread,
> there's no need for follow-up email copies.



Sat, 07 Aug 2004 06:45:17 GMT  
 Caption Text for MDI Frame
Do this:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
 cs.style &=~FWS_ADDTOTITLE;
 cs.lpszName="The title you want";
 return CSDIFrameWnd::PreCreateWindow(cs);

Quote:
}



Quote:
> Hi friends, How can change i change permanently the caption for  MDI Frame
> window to be other than IDR_MAINFRAME string.

> Do i have to change the resource id string IDR_MAINFRAME ?
> Thanks



Sat, 07 Aug 2004 06:49:34 GMT  
 Caption Text for MDI Frame
please ignore

Quote:
> Thanks David,  my toolbar buttons are disabled is it because i don't have
> updatecommandui handlers for them.
> Thanks



> > >Hi friends, How can change i change permanently the caption for  MDI
> Frame
> > >window to be other than IDR_MAINFRAME string.

> > MFC uses a special style FWS_ADDTOTITLE. If you remove this style from
> > the MDI frame window when it's created, MFC won't adjust the caption
> > text. You'd normally remove the style in the PreCreateWindow handler.
> > Have a look at Knowledge Base article Q99182 "HOWTO: Change an
> > MFC-Based MDI Child Window's Frame Text".

> > Dave
> > --
> > MVP VC++ FAQ: http://www.mvps.org/vcfaq
> > My address is altered to discourage junk mail.
> > Please post responses to the newsgroup thread,
> > there's no need for follow-up email copies.



Sat, 07 Aug 2004 07:00:12 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. MDI Child Frame caption , how?

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

3. show a text in the child frame caption

4. CPropertySheet's caption focused - doesnt catch accelerator messages for main frame

5. Maximizing Frame Window: Caption bar w/out window borders

6. Making a main(frame)window without a border and caption (just white)

7. Display Bitmap: TreeView and ListView in frame with splitter and no caption

8. changing Caption for MDI childframe

9. Modifying the caption behaviour in an MDI appl

10. changing Caption for MDI childframe

11. mdi child window captions

12. Modify Child Wnd Title Bar Caption in MDI App

 

 
Powered by phpBB® Forum Software