Article ID: 197504
Article Last Modified on 5/13/2003
Private Sub MyMfcCtrl1_KeyPress(KeyAscii As Integer)
MsgBox "key Pressed"
End Sub
void CMyMfcCtrlCtrl::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
void CMyMfcCtrlCtrl::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
COleControl::OnChar(nChar, nRepCnt, nFlags);
SetFocus();
}
BOOL PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_CHAR)
{
SendMessage(pMsg->message, pMsg->wParam, pMsg->lParam);
return TRUE;
}
return COleControl::PreTranslateMessage(pMsg);
}
192347 PRB: Focus/Activation Problems with MFC Control on VB Forms
197503 PRB: Focus Problem When MFC Control is Used on MDI Child Form
Keywords: kbctrlcreate kbprb kbcode KB197504