471,353 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,353 software developers and data experts.

Reading Input from Keyboard

Dear All.

I'm using C++ .NET and trying to figure out how to read input from the
keyboard. I use the following function:

void CMyView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
TRACE(" ** key down!\n");
CFormView::OnKeyDown(nChar, nRepCnt, nFlags);
}

inside my code, but it doesn't seem to work.... And I also tried this
following function to catch WM_KEYDOWN, but it also didn't work. :-(

LRESULT CTestKbdState2View::WindowProc(UINT message, WPARAM wParam, LPARAM
lParam)
{
switch (message) {
case WM_KEYDOWN:
TRACE(" ** key down!\n");
break;
}
return CFormView::WindowProc(message, wParam, lParam);
}

I wonder what went wrong....

Thanks before.

Regards,
HastariE

Jul 21 '05 #1
0 804

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Simon | last post: by
1 post views Thread by Scott Shaw | last post: by
50 posts views Thread by Michael Mair | last post: by
40 posts views Thread by googler | last post: by
7 posts views Thread by Don Riesbeck Jr. | last post: by
2 posts views Thread by Yandos | last post: by
7 posts views Thread by tiger786 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.