summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
diff options
context:
space:
mode:
authorSteve Northover <steve>2005-07-19 21:28:31 +0000
committerSteve Northover <steve>2005-07-19 21:28:31 +0000
commit8f5dd8cf69b85947859dad3e5b550a2ca537b1ed (patch)
tree9133aa2328c48fb470269be53131206ca078d13f /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
parentfac5adc35b97d02c901ca4ea2a6b31fd4c0cace6 (diff)
downloadeclipse.platform.swt-8f5dd8cf69b85947859dad3e5b550a2ca537b1ed.tar.gz
eclipse.platform.swt-8f5dd8cf69b85947859dad3e5b550a2ca537b1ed.tar.xz
eclipse.platform.swt-8f5dd8cf69b85947859dad3e5b550a2ca537b1ed.zip
Hitting Alt to show mnemonics draws on top of labels and group boxes
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java33
1 files changed, 30 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
index c53f54bbc5..1e9ac98058 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
@@ -47,8 +47,7 @@ public class Group extends Composite {
* force a full redraw of the control and all children
* when resized. This causes flashing. The fix is to
* register a new window class without these bits and
- * implement special code that damages only the exposed
- * area.
+ * implement special code that damages only the control.
*
* Feature in WinCE. On certain devices, defining
* a new window class which looks like BUTTON causes
@@ -316,7 +315,7 @@ LRESULT WM_ERASEBKGND (int wParam, int lParam) {
return result;
}
drawBackground (wParam);
- return result;
+ return LRESULT.ONE;
}
LRESULT WM_NCHITTEST (int wParam, int lParam) {
@@ -377,4 +376,32 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
+LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
+ LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
+ if (result != null) return result;
+ /*
+ * Feature in Windows. When WM_UPDATEUISTATE is sent to
+ * a group, it sends WM_CTLCOLORBTNto get the foreground
+ * and background. If drawing happens in WM_CTLCOLORBTN,
+ * it will overwrite the contents of the control. The
+ * fix is draw the group without drawing the background
+ * and avoid the group window proc.
+ *
+ * NOTE: The DefWindowProc() must be called in order to
+ * broadcast WM_UPDATEUISTATE message to the children.
+ *
+ */
+ if ((state & TRANSPARENT) != 0) {
+ if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
+ Control control = findThemeControl ();
+ if (control != null) {
+ OS.InvalidateRect (handle, null, false);
+ int code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ return new LRESULT (code);
+ }
+ }
+ }
+ return result;
+}
+
}