diff options
author | Steve Northover <steve> | 2005-07-20 20:28:28 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2005-07-20 20:28:28 +0000 |
commit | bd8ccaacc9ef017cabd38ca03e944f5594cda26c (patch) | |
tree | 73ceace67f8505c01bfb5d1f14fcddfb1770369c /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java | |
parent | 192960609106955d48292e46d3afc3671c59810e (diff) | |
download | eclipse.platform.swt-bd8ccaacc9ef017cabd38ca03e944f5594cda26c.tar.gz eclipse.platform.swt-bd8ccaacc9ef017cabd38ca03e944f5594cda26c.tar.xz eclipse.platform.swt-bd8ccaacc9ef017cabd38ca03e944f5594cda26c.zip |
XP Tabfolder theme code flashes too much when resized
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java index 01c3cb26b7..3fb0eb85ae 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java @@ -429,6 +429,28 @@ LRESULT WM_SIZE (int wParam, int lParam) { return result; } +LRESULT WM_UPDATEUISTATE (int wParam, int lParam) { + LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam); + /* + * Feature in Windows. When WM_UPDATEUISTATE is sent to + * a static control, it sends WM_CTLCOLORSTATIC to get the + * foreground and background. If any drawing happens in + * WM_CTLCOLORBTN, it overwrites the contents of the control. + * The fix is draw the static without drawing the background + * and avoid the group window proc. + */ + if ((state & TRANSPARENT) != 0) { + if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) { + Control control = findThemeControl (); + if (control != null) { + OS.InvalidateRect (handle, null, false); + return LRESULT.ZERO; + } + } + } + return result; +} + LRESULT wmDrawChild (int wParam, int lParam) { DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT (); OS.MoveMemory (struct, lParam, DRAWITEMSTRUCT.sizeof); |