summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
diff options
context:
space:
mode:
authorCarolyn MacLeod <carolyn>2006-09-15 21:17:05 +0000
committerCarolyn MacLeod <carolyn>2006-09-15 21:17:05 +0000
commit7fbd919656d173ec4b0d689630619ef09b7a8a26 (patch)
treef55c83b2330d718859750b5595be49cee048cbdf /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
parent3704af91eec1c65c7bd4d601692e02ff2cfb7f83 (diff)
downloadeclipse.platform.swt-7fbd919656d173ec4b0d689630619ef09b7a8a26.tar.gz
eclipse.platform.swt-7fbd919656d173ec4b0d689630619ef09b7a8a26.tar.xz
eclipse.platform.swt-7fbd919656d173ec4b0d689630619ef09b7a8a26.zip
allow background color changes
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
index d2b108a835..3737867039 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DateTime.java
@@ -143,7 +143,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
int upDownHeight = OS.GetSystemMetrics (OS.SM_CYVSCROLL);
height = Math.max (height, upDownHeight);
String string = "00/00/0000";
- if ((style & SWT.TIME) != 0) string = "00:00:00 PM";
+ if ((style & SWT.TIME) != 0) string = "00:00:00 AM";
RECT rect = new RECT ();
TCHAR buffer = new TCHAR (getCodePage (), string, false);
int flags = OS.DT_CALCRECT | OS.DT_EDITCONTROL | OS.DT_NOPREFIX;
@@ -165,6 +165,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
return new Point (width, height);
}
+int defaultBackground () {
+ return OS.GetSysColor (OS.COLOR_WINDOW);
+}
+
/**
* Returns the receiver's ...
*
@@ -438,9 +442,15 @@ int windowProc () {
return (style & SWT.CALENDAR) != 0 ? CalendarProc : DateTimeProc;
}
+LRESULT WM_ERASEBKGND (int wParam, int lParam) {
+ super.WM_ERASEBKGND (wParam, lParam);
+ drawBackground (wParam);
+ return LRESULT.ONE;
+}
+
LRESULT wmNotifyChild (NMHDR hdr, int wParam, int lParam) {
switch (hdr.code) {
- case OS.MCN_SELCHANGE: //SENT WHEN YOU SET IT?
+ case OS.MCN_SELCHANGE:
case OS.DTN_DATETIMECHANGE:
sendEvent (SWT.Selection);
break;