April 30th, 1999, 03:36 PM
Hi
Would anybody be able to give me an example of knowing in my view class when the enter key is pressed????
Thank!!!!!!
Sean Lee
May 1st, 1999, 02:44 AM
For example,
void CExampleView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
if (nChar == VK_RETURN)
{
// Do somthing
}
CView::OnKeyDown(nChar, nRepCnt, nFlags);
}
Or
void CExampleView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
if (nChar == VK_RETURN)
{
// Do somthing
}
CView::OnChar(nChar, nRepCnt, nFlags);
}
Hope any help to you.