KeyDown example for C++ 5.0 and later

void CBrowseDlg::OnKeyDownLeadimglistctrl1(short KeyCode, short Shift) 
{
   CString s;
   s.Format(TEXT("Key %d is down"), KeyCode);
   this->SetWindowText(s);
}