键盘

case WM_KEYDOWN:

switch(wParam)

{

case VK_UP:

y-=20;

if(y<0) 

y=0;

case VK_DOWN:

y+=20;

if(y>660)

y=660;

case VK_LEFT:

x-=20;

if(x<0)

x=0;

break;

case VK_RIGHT:

x+=20;

if(x>910)

x=910;

break;

}

break;

你可能感兴趣的:(键盘)