COMCTL32: use GetClientRect() for bounding rect in treeview (was: COMCTL32 - TreeView control not correctly updated with COMCTL32.OCX)

Alex Villací­s Lasso a_villacis at
Mon Nov 7 12:05:33 CST 2005

(resending because bug 3476 reappeared)

Further testing with native vs. builtin comctl32 show that native 
treeview (which works correctly) does NOT issue a GetUpdateRect() in 
response to a WM_PAINT message with a wParam=someHDC. This suggests that 
native comctl32 knows that a non-null wParam means that the tree must be 
painted anyway, regardless of whether the control window might have an 
update rect. The attached patch gets rid of the (incorrect?) extra 
GetUpdateRect() call and does a GetClientRect() on the control window 
instead to get a working bounding rect. This fixes the bug for the 
sample app in bug 3476.

* Do not issue a GetUpdateRect() to query an update region for 
WM_PAINT(wParam=HDC) case. Instead, use GetClientRect() for a bounding 

Alex Villacís Lasso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-comctl32-treeview_fix.patch
Type: text/x-patch
Size: 842 bytes
Desc: not available
Url :

More information about the wine-patches mailing list