Mercurial > projects > dwt-win
diff dwt/widgets/Decorations.d @ 108:6f75fdfa1bcd
Change LRESULT to class, like done in the old DWT.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 11 Feb 2008 02:44:32 +0100 |
parents | 43c42c637c9c |
children | f353be82b6be |
line wrap: on
line diff
--- a/dwt/widgets/Decorations.d Mon Feb 11 00:56:33 2008 +0100 +++ b/dwt/widgets/Decorations.d Mon Feb 11 02:44:32 2008 +0100 @@ -318,9 +318,9 @@ if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); } -override override LRESULT callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { - if (handle is null) return LRESULT.ZERO; - return cast(LRESULT) OS.DefMDIChildProc (hwnd, msg, wParam, lParam); +override override int callWindowProc (HWND hwnd, int msg, int wParam, int lParam) { + if (handle is null) return 0; + return OS.DefMDIChildProc (hwnd, msg, wParam, lParam); } void closeWidget () { @@ -1621,7 +1621,7 @@ override LRESULT WM_ACTIVATE (int wParam, int lParam) { LRESULT result = super.WM_ACTIVATE (wParam, lParam); - if (result !is LRESULT.NULL) return result; + if (result !is null) return result; /* * Feature in AWT. When an AWT Window is activated, * for some reason, it seems to forward the WM_ACTIVATE @@ -1682,14 +1682,14 @@ override LRESULT WM_CLOSE (int wParam, int lParam) { LRESULT result = super.WM_CLOSE (wParam, lParam); - if (result !is LRESULT.NULL) return result; + if (result !is null) return result; if (isEnabled () && isActive ()) closeWidget (); return LRESULT.ZERO; } override LRESULT WM_HOTKEY (int wParam, int lParam) { LRESULT result = super.WM_HOTKEY (wParam, lParam); - if (result !is LRESULT.NULL) return result; + if (result !is null) return result; static if( OS.IsWinCE ){ if (OS.IsSP) { /* @@ -1725,7 +1725,7 @@ if (moved) { Point location = getLocation (); if (location.x is oldX && location.y is oldY) { - return LRESULT.NULL; + return null; } oldX = location.x; oldY = location.y; @@ -1735,7 +1735,7 @@ override LRESULT WM_NCACTIVATE (int wParam, int lParam) { LRESULT result = super.WM_NCACTIVATE (wParam, lParam); - if (result !is LRESULT.NULL) return result; + if (result !is null) return result; if (wParam is 0) { if (display.lockActiveWindow) return LRESULT.ZERO; Control control = display.findControl (cast(HANDLE)lParam); @@ -1761,7 +1761,7 @@ override LRESULT WM_QUERYOPEN (int wParam, int lParam) { LRESULT result = super.WM_QUERYOPEN (wParam, lParam); - if (result !is LRESULT.NULL) return result; + if (result !is null) return result; sendEvent (DWT.Deiconify); // widget could be disposed at this point return result; @@ -1774,7 +1774,7 @@ } override LRESULT WM_SIZE (int wParam, int lParam) { - LRESULT result = LRESULT.NULL; + LRESULT result = null; bool changed = true; if (resized) { int newWidth = 0, newHeight = 0; @@ -1810,7 +1810,7 @@ override LRESULT WM_SYSCOMMAND (int wParam, int lParam) { LRESULT result = super.WM_SYSCOMMAND (wParam, lParam); - if (result !is LRESULT.NULL) return result; + if (result !is null) return result; if (!(cast(Shell)this)) { int cmd = wParam & 0xFFF0; switch (cmd) { @@ -1830,7 +1830,7 @@ override LRESULT WM_WINDOWPOSCHANGING (int wParam, int lParam) { LRESULT result = super.WM_WINDOWPOSCHANGING (wParam, lParam); - if (result !is LRESULT.NULL) return result; + if (result !is null) return result; if (display.lockActiveWindow) { WINDOWPOS* lpwp = cast(WINDOWPOS*)lParam; //OS.MoveMemory (lpwp, lParam, WINDOWPOS.sizeof);