|
-
February 11th, 2006, 01:30 PM
#1
Removing the close caption dynamically
Hi all,
I´m working with a MDI aplication and I have several (about 3 or 4) windows opened. the situation is if an indicated window is closed, another indicated windows cannot be closed anymore. I trying to remove its close caption but I haven´t had success. Can anyone tell me how to remove ( od disable) the close caption of a MDI child window dynamically?
Thank you in advance.
-
February 13th, 2006, 04:23 AM
#2
Re: Removing the close caption dynamically
How did you "try to remove its close caption"? Didi you use GetSystemMenu ? Something like this:
Code:
CMenu *pSysMenu = GetSystemMenu(FALSE);
ASSERT(pSysMenu != NULL);
VERIFY(pSysMenu->RemoveMenu(SC_CLOSE, MF_BYCOMMAND)); // or you could use CMenu::EnableMenuItem to disable it:
// pSysMenu->EnableMenuItem(SC_CLOSE, MF_GRAYED | MF_BYCOMMAND);
// ... and to enable it:
// pSysMenu->EnableMenuItem(SC_CLOSE, MF_ENABLED | MF_BYCOMMAND);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|