Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Disabling the System Menu's Close Button
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Disabling the System Menu's Close Button

 Post Reply Post Reply
Author
Message
71SoCal View Drop Down
Newbie
Newbie


Joined: 15 April 2008
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote 71SoCal Quote  Post ReplyReply Direct Link To This Post Topic: Disabling the System Menu's Close Button
    Posted: 24 June 2008 at 12:37pm
My application sometimes needs to disable the mainframe's close button.  Before using CodeJock, it worked correctly with the following code:
 
CMenu* pMenu = GetSystemMenu(bOn);
if (!bOn)
{
   pMenu->ModifyMenu(SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
}
 
Now that I've added the CodeJock skinning and command bar stuff, the code still runs, but the close button remains enabled.
 
I'm guessing that I need to make a different call into the CXTPMDIFrameWnd class, but I'm not sure what.
 
Any help would be appreciated.
 
Thanks,
Mike
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.191 seconds.