How do i disable the WM_CLOSE button? (the little one with the 'X' in the corner!)
invoke GetSystemMenu, hWnd, FALSE
invoke EnableMenuItem, eax, SC_CLOSE, MF_BYCOMMAND or MF_GRAYED
:)just trap WM_CLOSE in the window proc and do nothing
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 :) )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.
Use the search engine :tongue:
This code also removes the entries from the System menu of the Window.