nChar:
Specifies the virtual-key code of the given key.
nRepCnt:
Repeat count (the number of times the keystroke is repeated as a result of the user holding down the key).
nFlags:
Specifies the scan code, key-transition code, previous key state, and context code, as shown in the following list:
要用“回车键”,“左移光标健”,“右移光标健”,“上移光标健”,“下移光标健”这几个键,你可以在这样:
void YourClass::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch(nChar)
{
case vk_return;
//your code
case vk_right:
//your code
case vk_left:
//
case vk_up:
//
case vk_down:
//
}
//then do not forget to call baseclass
CBaseClass::OnKeyDown(nChar,nRepCnt,nFlags)
}