KeyPress Example for Visual C++ 5.0

void CConViewView::OnKeyPress Leadrastercontainerviewer1(short KeyAscii) 
{
 CString S; 
   if(this->GetActiveWindow())
   {
      this->GetActiveWindow()->SetWindowText(S + TEXT(" Key ") + (TCHAR)KeyAscii + TEXT(" was pressed"));
   }
}