网站首页  词典首页

请输入您要查询的函数:

 

术语 getscrollrange
释义 GetScrollRange
语法:
BOOL GetScrollRange( HWND hWnd,
int nBar,
LPINT lpMinPos,
LPINT lpMaxPos
);
GetScrollRange功能
该GetScrollRange函数检索,目前的最低和最高滚动框(拇指)指定的滚动条的立场。
注意GetScrollRange函数是为了兼容。新的应用程序应该使用GetScrollInfo功能。
参数
hWnd
[in]句柄滚动条控制或与一个标准的滚动条的窗口,这取决于该nBar参数的值。
nBar
[in]指定滚动条从该职位检索。此参数可以是下列值之一。
SB_CTL
检索阵地滚动条控制。在hWnd参数必须处理的滚动条控制。
SB_HORZ
检索阵地窗口的标准Level滚动条。
SB_VERT
检索阵地窗口的标准垂直滚动条。
lpMinPos
[out]指向整型变量接收的最低位置。
lpMaxPos
[out]指向整型变量接收的最高位置。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果指定的窗口没有滚动条标准或者不是一个滚动条控件,GetScrollRange功能副本零的lpMinPos和lpMaxPos参数。
对于一个标准的滚动条默认范围是0到100。对于一个滚动条控件的默认范围是空的(这两个值为零)。
该消息显示滚动条的位置,WM_HSCROLL和WM_VSCROLL,被限制为16位数据的位置。但是,由于SetScrollInfo,SetScrollPos,SetScrollRange,GetScrollInfo,GetScrollPos和GetScrollRange支持32位的滚动条位置数据,有一种方法可以绕过16位的WM_HSCROLL和WM_VSCROLL消息的障碍。请参阅该技术描述GetScrollInfo功能。
如果nBar参数SB_CTL和hWnd参数指定的窗口不是一个滚动条控制系统,该系统发送SBM_GETRANGE信息获取的窗口滚动条信息。这使得GetScrollRange运作自定义控件模仿一个滚动条。如果窗口不处理SBM_GETRANGE消息,GetScrollRange函数失败。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
GetScrollInfo,GetScrollPos,SetScrollInfo,SetScrollPos,SetScrollRange,WM_HSCROLL,WM_VSCROLL
==英文原文==GetScrollRange Function
The GetScrollRange function retrieves the current minimum and maximum scroll box (thumb) positions for the specified scroll bar.
Note The GetScrollRange function is provided for compatibility only. New applications should use the GetScrollInfo function.
Syntax
BOOL GetScrollRange( HWND hWnd,
int nBar,
LPINT lpMinPos,
LPINT lpMaxPos
);
Parameters
hWnd
[in] Handle to a scroll bar control or a window with a standard scroll bar, depending on the value of the nBar parameter.
nBar
[in] Specifies the scroll bar from which the positions are retrieved. This parameter can be one of the following values.
SB_CTL
Retrieves the positions of a scroll bar control. The hWnd parameter must be the handle to the scroll bar control.
SB_HORZ
Retrieves the positions of the window's standard horizontal scroll bar.
SB_VERT
Retrieves the positions of the window's standard vertical scroll bar.
lpMinPos
[out] Pointer to the integer variable that receives the minimum position.
lpMaxPos
[out] Pointer to the integer variable that receives the maximum position.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
If the specified window does not have standard scroll bars or is not a scroll bar control, the GetScrollRange function copies zero to the lpMinPos and lpMaxPos parameters.
The default range for a standard scroll bar is 0 through 100. The default range for a scroll bar control is empty (both values are zero).
The messages that indicate scroll bar position, WM_HSCROLL and WM_VSCROLL , are limited to 16 bits of position data. However, because SetScrollInfo , SetScrollPos , SetScrollRange , GetScrollInfo, GetScrollPos , and GetScrollRange 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 the GetScrollInfo function for a description of the technique.
If the nBar parameter is SB_CTL and the window specified by the hWnd parameter is not a system scroll bar control, the system sends the SBM_GETRANGE message to the window to obtain scroll bar information. This allows GetScrollRange to operate on a custom control that mimics a scroll bar. If the window does not handle the SBM_GETRANGE message, the GetScrollRange function fails.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
GetScrollInfo , GetScrollPos , SetScrollInfo , SetScrollPos , SetScrollRange , WM_HSCROLL , WM_VSCROLL
==原始网址==http://msdn.microsoft.com/en-us/library/bb787587(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:22:04