首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

有些函数或参数在msdn里找不到怎么处理

2012-11-01 
有些函数或参数在msdn里找不到怎么办?case WM_VSCROLL :i GetWindowLong ((HWND) lParam, GWL_ID) swit

有些函数或参数在msdn里找不到怎么办?
case WM_VSCROLL :
  i = GetWindowLong ((HWND) lParam, GWL_ID) ;
   
  switch (LOWORD (wParam))
  {
  case SB_PAGEDOWN :
  color[i] += 15 ;
  // fall through
  case SB_LINEDOWN :
  color[i] = min (255, color[i] + 1) ;
  break ;
   
  case SB_PAGEUP :
  color[i] -= 15 ;
  // fall through
  case SB_LINEUP :
  color[i] = max (0, color[i] - 1) ;
  break ;
   
  case SB_TOP :
  color[i] = 0 ;
  break ;
   
  case SB_BOTTOM :
  color[i] = 255 ;
  break ;
   
  case SB_THUMBPOSITION :
  case SB_THUMBTRACK :
  color[i] = HIWORD (wParam) ;
  break ;

SB_PAGEDOWN、SB_BOTTOM、SB_LINEUP、 SB_LINEDOWN都找不到哦,怎么办啊

[解决办法]
怎么会找不到呢,我用的是MSDN2001

C/C++ code
WM_VSCROLLThe WM_VSCROLL message is sent to a window when a scroll event occurs in the window's standard vertical scroll bar. This message is also sent to the owner of a vertical scroll bar control when a scroll event occurs in the control. A window receives this message through its WindowProc function. LRESULT CALLBACK WindowProc(  HWND hwnd,       // handle to window  UINT uMsg,       // WM_VSCROLL  WPARAM wParam,   // request and position  LPARAM lParam    // handle to scroll bar (HWND));ParameterswParam The low-order word specifies a scroll bar value that indicates the user's scrolling request. This parameter can be one of the following values. Value Meaning SB_BOTTOM Scrolls to the lower right. SB_ENDSCROLL Ends scroll. SB_LINEDOWN Scrolls one line down. SB_LINEUP Scrolls one line up. SB_PAGEDOWN Scrolls one page down. SB_PAGEUP Scrolls one page up. SB_THUMBPOSITION The user has dragged the scroll box (thumb) and released the mouse button. The high-order word indicates the position of the scroll box at the end of the drag operation. SB_THUMBTRACK The user is dragging the scroll box. This message is sent repeatedly until the user releases the mouse button. The high-order word indicates the position that the scroll box has been dragged to. SB_TOP Scrolls to the upper left. The high-order word specifies the current position of the scroll box if the low-order word is SB_THUMBPOSITION or SB_THUMBTRACK; otherwise, this word is not used. lParam If the message is sent by a scroll bar, this parameter is the handle to the scroll bar control. If the message is not sent by a scroll bar, this parameter is NULL. Return ValuesIf an application processes this message, it should return zero. RemarksThe SB_THUMBTRACK request code is typically used by applications that provide feedback as the user drags the scroll box. If an application scrolls the content of the window, it must also reset the position of the scroll box by using the SetScrollPos function. Note that the WM_VSCROLL message carries only 16 bits of scroll box position data. Thus, applications that rely solely on WM_VSCROLL (and WM_HSCROLL) for scroll position data have a practical maximum position value of 65,535. However, because the SetScrollInfo, SetScrollPos, SetScrollRange, GetScrollInfo, GetScrollPos, and GetScrollRange functions support 32-bit scroll bar position data, there is a way to circumvent the 16-bit barrier of the WM_HSCROLL and WM_VSCROLL messages. See GetScrollInfo for a description of the technique. Requirements   Windows NT/2000/XP: Included in Windows NT 3.1 and later.  Windows 95/98/Me: Included in Windows 95 and later.  Header: Declared in Winuser.h; include Windows.h. 


[解决办法]
查WM_VSCROLL 消息,就可以看到了

热点排行