HI,
I was trying to capture the keypress event for any key using the following code:
When the 'A' key pressed, it is not capturing or changing the cursor state.Code:void CTest1Dlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { char chr1; HCURSOR lhcur; chr1 = char(nChar); if(chr1 = 'A') { lhcur = AfxGetApp()->LoadStandardCursor(IDC_ARROW); SetCursor(lhcur); } CDialog::OnKeyDown(nChar, nRepCnt, nFlags); }
By the way how to capture the Windows function key.
Thanks in Advance.
Dan




Reply With Quote