![]() |
General Programming »
Programming Tips »
General
Intermediate
Disable System Close Button on a Console ApplicationBy John L. DeVitoThis code is a simple way to disable the close button on a Windows Console Application. It can also be used to disable any of the system menu buttons |
VC6, VC7, VC7.1Win2K, WinXP, Win2003, Visual Studio, MFC, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
This program is a VERY simple one to demostrate how to disable the close button on a Windows Console App. When I was looking up how to do this, I failed to find anything to help me on the site save the forums.
In reality we simply need to call two separate functions GetSystemMenu() and DeleteMenu(). This same algorithm can be used to disable/enable ANY of the system menu buttons.
The entry point for YOUR code is in the else block after testing for MFC failure.
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 6 Dec 2003 Editor: Nishant Sivakumar |
Copyright 2003 by John L. DeVito Everything else Copyright © CodeProject, 1999-2009 Web22 | Advertise on the Code Project |