如何隐藏treeview的横向滚动条?

bj_leo_2000 2005-05-12 02:11:12
如何隐藏treeview的横向滚动条?
...全文
139 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
constantine 2005-05-12
  • 打赏
  • 举报
回复
API
The ShowScrollBar function shows or hides the specified scroll bar.

BOOL ShowScrollBar(

HWND hWnd, // handle of window with scroll bar
int wBar, // scroll bar flag
BOOL bShow // scroll bar visibility flag
);


Parameters

hWnd

Identifies a scroll bar control or a window with a standard scroll bar, depending on the value of the wBar parameter.

wBar

Specifies the scroll bar(s) to be shown or hidden. This parameter can be one of the following values:

Value Meaning
SB_BOTH Shows or hides a window's standard horizontal and vertical scroll bars.
SB_CTL Shows or hides a scroll bar control. The hWnd parameter must be the handle of the scroll bar control.
SB_HORZ Shows or hides a window's standard horizontal scroll bars.
SB_VERT Shows or hides a window's standard vertical scroll bar.


bShow

Specifies whether the scroll bar is shown or hidden. If this parameter is TRUE, the scroll bar is shown; otherwise, it is hidden.



Return Values

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

While processing a scroll bar message, an application should not call this function to hide a scroll bar.
happyct 2005-05-12
  • 打赏
  • 举报
回复
ShowScrollBar(TreeView1->Handle,SB_HORZ,false);//隐藏水平滚动条
ShowScrollBar(TreeView1->Handle,SB_VERT,false);//隐藏垂直滚动条
ShowScrollBar(TreeView1->Handle,SB_BOTH,false);//隐藏所有滚动条

602

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder VCL组件使用和开发
社区管理员
  • VCL组件使用和开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧