468,272 Members | 2,202 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,272 developers. It's quick & easy.

Common Control Issue -- Tree View Items of Varying Size

It seems that when I dynamically resize items in a tree-view control, using TVM_SETITEM and the TVITEMEX iIntegral member, things go awry. The window draws properly, but it seems like the RECTs for the HTREEITEMs are not updating properly. This is espeically true if I update the size of an individual HTREEITEM more than once -- making it larger, and then smaller again. The tree view's scroll bar no longer works correctly -- it doesn't scroll to the true bottom of the tree view. The TVM_GETITEMRECT message returns the wrong value. TVM_HITTEST and TVN_BEGINLABELEDIT also behave incorrectly.

This is not an MFC or WTL/ATL tree view control -- it has been created with CreateWindowEx(0, WC_TREEVIEW,...) and is manipulated entirely with SendMessage()s.

Anything I can do to work around or fix? Is this a bug in the library, or am I doing something doofusy? Either seems possible to me right now.
Nov 17 '05 #1
1 1920
>It seems that when I dynamically resize items in a tree-view control, using TVM_SETITEM and the TVITEMEX iIntegral member, things go awry. The window draws properly, but it seems like the RECTs for the HTREEITEMs are not updating properly. This is espeically true if I update the size of an individual HTREEITEM more than once -- making it larger, and then smaller again. The tree view's scroll bar no longer works correctly -- it doesn't scroll to the true bottom of the tree view. The TVM_GETITEMRECT message returns the wrong value. TVM_HITTEST and TVN_BEGINLABELEDIT also behave incorrectly.


Can you show a small code snippet that illustrates the problem -
ideally something someone can copy and paste into a sample and try to
reproduce what you're seeing?

Which OS's have you tested this with? Are they consistent?

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jesper DK | last post: by
reply views Thread by willow1480 | last post: by
4 posts views Thread by David W. Simmonds | last post: by
10 posts views Thread by dwok | last post: by
2 posts views Thread by Rlrcstr | last post: by
reply views Thread by Santosh | last post: by
7 posts views Thread by =?Utf-8?B?UmVraGE=?= | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.