Microsoft KB Archive/130611

{|
 * width="100%"|

BUG: Using WM_SETREDRAW w/ TreeView Control Gives Odd Results

 * }

Q130611

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK)

-

SYMPTOMS
If a program uses the WM_SETREDRAW message to turn off updating of a TreeView control before adding items, the TreeView control can behave strangely.

For example, if the item being added to the control uses the TVI_FIRST style to insert it to the top of the tree and the top of the tree is scrolled above the top of the visible window, it may be impossible to bring the item into view.

Another possible symptom is that the TreeView control doesn't repaint itself at all. These problems occur only if the program has used the WM_SETREDRAW message to turn off updating the TreeView control.

RESOLUTION
Don't use the WM_SETREDRAW message with the TreeView control while adding items to the control.

STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kbCtrl kbOSWinNT351bug kbOSWinNT400bug kbOSWin2000 kbSDKWin32 kbTreeView kbGrpDSUser kbOSWin95bug kbOSWin98bug

Issue type : kbbug

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch