[sword-svn] r112 - trunk/src/SwordReader_GUI/SRFramework

dtrotzjr at www.crosswire.org dtrotzjr at www.crosswire.org
Wed Apr 2 20:45:56 MST 2008


Author: dtrotzjr
Date: 2008-04-02 20:45:55 -0700 (Wed, 02 Apr 2008)
New Revision: 112

Modified:
   trunk/src/SwordReader_GUI/SRFramework/SRWnd.h
Log:
Simplified interface to some SRWnd messages. More to come.

Modified: trunk/src/SwordReader_GUI/SRFramework/SRWnd.h
===================================================================
--- trunk/src/SwordReader_GUI/SRFramework/SRWnd.h	2008-04-01 03:37:07 UTC (rev 111)
+++ trunk/src/SwordReader_GUI/SRFramework/SRWnd.h	2008-04-03 03:45:55 UTC (rev 112)
@@ -47,18 +47,35 @@
         virtual void MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint = TRUE);
         virtual void MoveWindow(LPCRECT lpRect,BOOL bRepaint = TRUE);
 
-        virtual LRESULT OnMove(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
-        virtual LRESULT OnSize(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
-        virtual LRESULT OnActivate(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
-        virtual LRESULT OnSetFocus(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
-        virtual LRESULT OnKillFocus(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
+        virtual LRESULT OnMove(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return OnMove(LOWORD(lParam), HIWORD(lParam)); }
+        virtual BOOL OnMove(int x, int y) { return FALSE; }
+
+        virtual LRESULT OnSize(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return OnSize(wParam, LOWORD(lParam), HIWORD(lParam)); }
+        virtual BOOL OnSize(UINT nType, int cx, int cy) { return FALSE; } 
+        
+        virtual LRESULT OnActivate(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return OnActivate(LOWORD(wParam), (HWND) lParam, (BOOL)HIWORD(wParam)); }
+        virtual BOOL OnActivate(UINT nState, HWND hWndOther, BOOL bMinimized) { return FALSE; }
+
+        virtual LRESULT OnSetFocus(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return OnSetFocus((HWND)wParam); }
+        virtual BOOL OnSetFocus(HWND hOldWnd) { return FALSE; } 
+
+        virtual LRESULT OnKillFocus(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return OnKillFocus((HWND)wParam); }
+        virtual BOOL OnKillFocus(HWND hNewWnd) { return FALSE; }
+        
         virtual LRESULT OnSetRedraw(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
         virtual LRESULT OnSetText(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
         virtual LRESULT OnGetText(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
         virtual LRESULT OnGetTextLength(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
-        virtual LRESULT OnPaint(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
-        virtual LRESULT OnEraseBackground(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
-        virtual LRESULT OnSetCursor(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
+        
+        virtual LRESULT OnPaint(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return OnPaint(); }
+        virtual BOOL OnPaint() { return FALSE; }
+        
+        virtual LRESULT OnEraseBackground(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return OnEraseBackground((HDC) wParam); }
+        virtual BOOL OnEraseBackground(HDC hdc) { return FALSE; }
+
+        virtual LRESULT OnSetCursor(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return OnSetCursor((HWND) wParam, LOWORD(lParam), HIWORD(lParam)); }
+        virtual BOOL OnSetCursor(HWND hWnd, UINT nHitTest, UINT message) { return FALSE; }
+
         virtual LRESULT OnNotify(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
         virtual LRESULT OnHelp(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }
         virtual LRESULT OnKeyDown(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam) { return FALSE; }




More information about the sword-cvs mailing list