当前位置: 代码迷 >> VC/MFC >> mfc 关于自绘treectrl后,横向滚动条有关问题
  详细解决方案

mfc 关于自绘treectrl后,横向滚动条有关问题

热度:158   发布时间:2016-05-02 03:49:38.0
mfc 关于自绘treectrl后,横向滚动条问题
问题是这样的:我自绘了一个ctreectrl,我在每一个item后面都加上了几个图标。这样就导致了一个问题:当图标超出了控件范围的时候,控件确没有出现滚动条。有什么方法可以让我指定每一行的长度的方法呢?
谢谢各位关注此贴。

------解决思路----------------------
控件属性里不是有横向和纵向滚动条的么 设置了没?
------解决思路----------------------
最简单的办法就是空格撑出需要的空间。把图标画到空格的位置。
------解决思路----------------------
试试 WM_MEASUREITEM  加大 itemWidth
------解决思路----------------------
引用:
试试 WM_MEASUREITEM  加大 itemWidth

WM_MEASUREITEM message
Sent to the owner window of a combo boxlist boxlist-view control, or menu item when the control or menu is created. A window receives this message through its WindowProc function.
------解决思路----------------------
引用:
Quote: 引用:

试试 WM_MEASUREITEM  加大 itemWidth

WM_MEASUREITEM message
Sent to the owner window of a combo boxlist boxlist-view control, or menu item when the control or menu is created. A window receives this message through its WindowProc function.

  相关解决方案