How do i disable the WM_CLOSE button? (the little one with the 'X' in the corner!)
Posted on 2002-07-15 20:57:09 by ChimpFace9000
invoke  GetSystemMenu, hWnd, FALSE

invoke EnableMenuItem, eax, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED
:)
Posted on 2002-07-15 21:05:20 by stryker
just trap WM_CLOSE in the window proc and do nothing
Posted on 2002-07-15 21:06:16 by Kudos
just trap WM_CLOSE in the window proc and do nothing
That is not a good idea, as one of the established methods of shutting down an app from another process is to send a WM_CLOSE to the top level window, to trap the WM_CLOSE is to go against a defacto windoze standard (you can if you want, just not advised :) )
Posted on 2002-07-16 00:14:49 by sluggy
How to disable the "X" and removing the "Close" from the System Menu

Use the search engine :tongue:

This code also removes the entries from the System menu of the Window.
Posted on 2002-07-16 00:47:40 by bazik