hai ,
How do i trap the characters of the keyboard in a dialog based application.
I had tried WM-CHAR,WM_KEYDOWN,WM_KEYUP,WM_KEYPRESS,PreTransalateMessage
Its not working. Please help me
satish
Printable View
hai ,
How do i trap the characters of the keyboard in a dialog based application.
I had tried WM-CHAR,WM_KEYDOWN,WM_KEYUP,WM_KEYPRESS,PreTransalateMessage
Its not working. Please help me
satish
Normally PreTranslateMessage works well
Try this :
BOOL CTestDlg::PreTranslateMessage(MSG* pMsg)
{
if ( pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN)
{
// To have information about key see WM_KEYDOWN message in help files
// Note that pMsg->wParam contains the virtual key code
}
return CDialog::PreTranslateMessage(pMsg);
}
thanks Anonymous
Its working after i do the filtering part.
satish