Print Page | Close Window

Disabling the System Menu's Close Button

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=11191
Printed Date: 03 May 2024 at 8:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Disabling the System Menu's Close Button
Posted By: 71SoCal
Subject: Disabling the System Menu's Close Button
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net