egrath Posted June 16, 2005 Posted June 16, 2005 Hello,does anyone knows a way of telling a running program to ignore the WM_CLOSE message?I need this for one of our Server Application which is running with about 30 open Command Boxes - and i want to prevent anyone from klicking the "X" accidently.Bye,Egon
Delprat Posted June 16, 2005 Posted June 16, 2005 (edited) hello,I think you should hide them with the CMDOW utility ( link on MSFN , direct link ).Else, the only way I know is to code a program that will find the handle to each command windows, then subclass them to trap the WM_CLOSE... not sure that will be easy to do with these windows, since they are a bit "specials"...(another solution would be to modify the system menu to disable to close button -- much more elegant... more complex too)byeEDIT: links Edited June 16, 2005 by Delprat
egrath Posted June 16, 2005 Author Posted June 16, 2005 Hi,thanks for your reply.i've found a tool called "noclose.exe" which hides all close options from a open command line window.The tool itself is attached to this message.Bye, Egonnoclose.exe
Delprat Posted June 16, 2005 Posted June 16, 2005 You're welcome !... and you've found the elegant one How it works ? (is it "hardcoded" window title or commandline or by process name or ... ?)bye
egrath Posted June 16, 2005 Author Posted June 16, 2005 Hi,no it works by retrieving the window handle of the current command line window and deleting the proper Items from the Menu (DeleteMenu)Bye, Egon
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now