|
-
May 23rd, 1999, 06:25 PM
#5
Re: Alt key
Actually the Alt key is a system key so you will need to overload the OnSysKeyDown function in your view class to catch it. However OnSysKeyDown is not supported by class wizard so you will need to add it by hand like this.
1) Add afx_msg void OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); to your class just before the call to DECLARE_MESSAGE_MAP()
2) Add ON_WM_SYSKEYDOWN() between BEGIN_MESSAGE_MAP and END_MESSAGE_MAP
3) Impliment the function like this
void CYourView::OnSysKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if (nChar != 18)
CEditView::OnKeyDown(nChar, nRepCnt, nFlags);
}
This should be all you need to get it working like you want.
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
|