请问垂直滚动条和水平滚动条的ID是多少?

guchanfeng 2004-11-20 11:55:59
请问垂直滚动条和水平滚动条的ID是多少?
...全文
186 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
guchanfeng 2004-11-20
  • 打赏
  • 举报
回复
再问一题:当按下滚动条的LineRight,假设向右滚动20,请问这个20是代表什么,是20个像素还是20%?
sms88 2004-11-20
  • 打赏
  • 举报
回复
对话框的滚动条是子窗口,那当然具有ID了
guchanfeng 2004-11-20
  • 打赏
  • 举报
回复
视图的滚动条是不是属于视图的子窗口
老夏Max 2004-11-20
  • 打赏
  • 举报
回复
CWnd::GetScrollBarCtrl !!!!!!!!!!!!!
CWnd::GetScrollBarCtrl
virtual CScrollBar* GetScrollBarCtrl( int nBar ) const;

Return Value

A sibling scroll-bar control, or NULL if none.

Parameters

nBar

Specifies the type of scroll bar. The parameter can take one of the following values:

SB_HORZ Retrieves the position of the horizontal scroll bar.


SB_VERT Retrieves the position of the vertical scroll bar.
Remarks

Call this member function to obtain a pointer to the specified sibling scroll bar or splitter window.

This member function does not operate on scroll bars created when the WS_HSCROLL or WS_VSCROLL bits are set during the creation of a window. The CWnd implementation of this function simply returns NULL. Derived classes, such as CView, implement the described functionality.

guchanfeng 2004-11-20
  • 打赏
  • 举报
回复
其实我想明白窗口的滚动条和对话框的滚动条有什么区别。比如说对话框的滚动条是发送控件通知消息,为什么视图窗口的滚动条发送WM_HSROLL、WM_VSROLL?对话框的滚动条是具体的ID和CWnd类对象,
视图窗口的滚动条的ID和CWnd对象怎样求得?
老夏Max 2004-11-20
  • 打赏
  • 举报
回复
呵呵,想知道这些干什么?
操作他们不需要知道他们的ID。具体想干什么?说说,看看能不能帮你!
如果可以的话,可以将程序发到:xia_qingqi@broadxent.com.cn
我帮你看看!注明帖子的URL!
guchanfeng 2004-11-20
  • 打赏
  • 举报
回复
如果窗口放大或缩小了,滚动条也跟着变长或变短了,移动的距离也不一样,似乎20代表像素不成立。
bigrobert 2004-11-20
  • 打赏
  • 举报
回复
我印象当中好像是20个像素。

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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