Change MDI child caption and Close child window button 
Author Message
 Change MDI child caption and Close child window button

I am working on a data acquisition system using MDI interface. I have couple
of questions:

(1) I have only one document open at a time with different views. Each child
window displays different type of plots.  The problem is that I cannot
change the  child window caption. It always defaults to document name
followed by a sequence number. Use SetWindowText() at different places would
not help. Sometimes I can see the last of several child window has caption
changed. But after refresh window, that caption goes back to default text.
How to change child window caption in MDI app?

(2) I also like to get rid of the close window button from all the child
windows. I tried to gray it out by doing the following in the
OnInitialUpdate(). It does not work.
HMENU hMenu = ::GetSystemMenu(this->m_hWnd, FALSE);
EnableMenuItem (hMenu, SC_CLOSE, MF_GRAYED);

Please give me some advise.

Thanks in advance.

Jian Dai



Mon, 05 Feb 2001 03:00:00 GMT  
 Change MDI child caption and Close child window button
Create you own child frame class and override following function.
void CMDIChildWnd::OnUpdateFrameTitle(BOOL bAddToTitle).

Gregory Malocha,
Sezam Technologies


Quote:
>I am working on a data acquisition system using MDI interface. I have
couple
>of questions:

>(1) I have only one document open at a time with different views. Each
child
>window displays different type of plots.  The problem is that I cannot
>change the  child window caption. It always defaults to document name
>followed by a sequence number. Use SetWindowText() at different places
would
>not help



Tue, 06 Feb 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Change MDI child caption and Close child window button

2. how to disable the close button of MDI child window

3. Close button in MDI child window?

4. How do I create an MDI child window without a close button (X in upper

5. MDI - Problem enabling/disabling child window close button

6. min//max/close buttons disappear in MDI child window

7. Changing Window Caption for Child Window

8. mdi child window captions

9. mdi child windows close

10. How do I - Close MDI Child Windows

11. Howto close child window in MDI app

12. How I can close all child windows in MDI from meniu

 

 
Powered by phpBB® Forum Software