IntControl (1008, p1, 0, 0, 0)
Enables/disables Close command.
This function sets the "allow close" flag for the WinBatch icon/window.
By default, the "Close" item on the control menu and the "Close" icon to the right of the window title are grayed out, and WinBatch does not respond to WM_CLOSE messages sent by applications. Using this IntControl, you can enable all these, in which case the Close command behaves the same as the existing Terminate/Ctrl-Break command.
p1 Meaning
-1 Don't change (just return current setting)
0 Close command is disabled (default).
1 Close command is enabled.
Returns previous setting.
;Tell WIL not to complain when box is closed IntControl(12, 1+4, 0, 0, 0) ;Enable Close button IntControl(1008, 1, 0, 0, 0)