|
-
March 29th, 1999, 12:44 AM
#1
How to Disable Alt F4 Acceletartor Key when i disable CANCEL Button in MFC Dialog Based application
How to Disable Alt F4 Acceletartor Key when i disable CANCEL Button in MFC Dialog Based application.
-
March 29th, 1999, 06:03 AM
#2
Re: How to Disable Alt F4 Acceletartor Key when i disable CANCEL Button in MFC Dialog Based applicat
Find or add the OnSysCommand message handler and add some code similar to this:
<P>
<PRE>
void CJunkDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if (bPreventClose && (nID == SC_CLOSE))
{
return;
}
//... rest of function ...
}
</PRE>
Toggle bPreventClose to be true or false as you enable or disable the Cancel button.
-
June 17th, 2001, 09:12 PM
#3
Re: How to Disable Alt F4 Acceletartor Key when i disable CANCEL Button in MFC Dialog Based applicat
This will also disable the close button. How can only Alt+F4 be disabled?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|