
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