SetScrollPos 函数(thumb) 指定滚动条中设置滚动框的位置,并根据需要重绘滚动条以反映滚动框的新位置。注意 提供SetScrollPos 函数是为了向后兼容。 新应用程序应使用 SetScrollInfo 函数。语法C++ 复制 int SetScrollPos( [in] HWND hWnd, [in] int nBar, [in] int nPos, [in] BOOL bRedraw ); 参数...
SetScrollPos 函数(thumb) 指定滚动条中设置滚动框的位置,并根据需要重绘滚动条以反映滚动框的新位置。注意 提供SetScrollPos 函数是为了向后兼容。 新应用程序应使用 SetScrollInfo 函数。语法C++ 复制 int SetScrollPos( [in] HWND hWnd, [in] int nBar, [in] int nPos, [in] BOOL bRedraw ); 参数...
SetScrollPos 函数(thumb) 指定滚动条中设置滚动框的位置,并根据需要重绘滚动条以反映滚动框的新位置。注意 提供SetScrollPos 函数是为了向后兼容。 新应用程序应使用 SetScrollInfo 函数。语法C++ 复制 int SetScrollPos( [in] HWND hWnd, [in] int nBar, [in] int nPos, [in] BOOL bRedraw ); 参数...
SetScrollPos函数 (thumb) 指定滚动条中设置滚动框的位置,并根据需要重绘滚动条以反映滚动框的新位置。 注意提供SetScrollPos函数是为了向后兼容。 新应用程序应使用SetScrollInfo函数。 语法 C++ intSetScrollPos( [in] HWND hWnd, [in]intnBar, [in]intnPos, [in] BOOL bRedraw ); ...
This function sets the position of the scroll box (thumb) in the specified scroll bar and, if requested, redraws the scroll bar to reflect the new position of the scroll box. SetScrollPos is provided for compatibility with Windows 3.x. Win32®-based applications should use the Set...
int SetScrollPos( HWND hWnd, int nBar, int nPos, BOOL bRedraw);参数:hWnd:滚动条控件或带有标准滚动条的窗口的句柄,取决于nBar参数的值。nBar:指定要设置的滚动条。此参数可以是以下值。SB_CTL:设置滚动条控件中滚动框的位置。hwnd参数必须是滚动条控件的句柄。SB_HORZ:设置窗口的标准水平...
bRedraw`设置为`TRUE`,滚动条将被重新绘制以反映滚动位置的变化。反之,如果设置为`FALSE`,滚动条将不会进行重绘。通过合理设置上述参数,开发者能够精确控制滚动条的行为,实现更流畅、更响应的操作界面。SetScrollPos函数是Windows程序中管理滚动功能的有力工具,对于构建高效、用户友好的界面至关重要。
这是因为SetScrollPos函数仅仅是设置滚动条的位置,而不会引起窗口的滚动。 要激发OnHScroll函数,可以通过调用窗口的ScrollWindow函数来进行滚动。具体的方法是先调用SetScrollPos设置滚动条的位置,然后通过ScrollWindow来滚动窗口的内容,最后再强制重绘窗口。 以下是一个示例代码: ```cpp //声明OnHScroll函数 afx_msg void...
SetScrollPos函数 (thumb) 指定滚动条中设置滚动框的位置,并根据需要重绘滚动条以反映滚动框的新位置。 注意提供SetScrollPos函数是为了向后兼容。 新应用程序应使用SetScrollInfo函数。 语法 C++复制 intSetScrollPos( [in] HWND hWnd, [in]intnBar, [in]intnPos, [in] BOOL bRedraw ); ...