win程序设计笔记7
到了键盘现在就不是照抄与硬记了
要加以理解做点东西出来
获得Caps Lock、Num Lock和Scroll Lock状态
iState = GetKeyState (VK_SHIFT) ;
如果按下了Shift,则iState值为负
iState = GetKeyState (VK_CAPITAL) ;
如果Caps Lock键打开
则传回的值低位元被设为1
SYSMETS程式中使用SendMessage处理WM_KEYDOWN代码的方法:case WM_KEYDOWN:
switch (wParam)
{
case VK_HOME:
SendMessage (hwnd, WM_VSCROLL, SB_TOP, 0) ;
break ;
case VK_END:
SendMessage (hwnd, WM_VSCROLL, SB_BOTTOM, 0) ;
break ;
case VK_PRIOR:
SendMessage (hwnd, WM_VSCROLL, SB_PAGEUP, 0) ;
break ; 值得学习的 我是来打酱油的:lol
页:
[1]