Stop filtering out SC_CLOSE. 'X' button works more reliably, also alt-F4.
Remove minimize box from style.
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
(cherry picked from commit
1b977a4e768b1a54ebffcecdf356e54e6fa86ce6)
ticket: 7332
status: resolved
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
- if ( pMsg->message == WM_SYSCOMMAND && (pMsg->wParam & 0xfff0) == SC_CLOSE )
- {
- return TRUE;
- }
return CLeashFrame::PreTranslateMessage(pMsg);
}
{
// Use the specific class name we established earlier
// Remove the Minimize and Maximize buttons
-// cs.style &= ~WS_MINIMIZEBOX;
+ cs.style &= ~WS_MINIMIZEBOX;
cs.style &= ~WS_MAXIMIZEBOX;
// Initialize the extended window style to display a TaskBar entry with WS_EX_APPWINDOW
cs.dwExStyle |= WS_EX_APPWINDOW;