A light-weight C++ object model framework Windows API Tool Kit
リビジョン | 1df0d3aab10d692ed39a82670c0f5ddcf7d57ed5 (tree) |
---|---|
日時 | 2013-07-12 17:41:30 |
作者 | Keith Marshall <keithmarshall@user...> |
コミッター | Keith Marshall |
Add default handler for WM_CLOSE message.
@@ -1,3 +1,10 @@ | ||
1 | +2013-07-12 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Add default handler for WM_CLOSE message. | |
4 | + | |
5 | + * wtklite.h (GenericWindow::OnClose): New inline method. | |
6 | + * wndproc.cpp (GenericWindow::OnClose): Map it to WM_CLOSE. | |
7 | + | |
1 | 8 | 2012-09-11 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 9 | |
3 | 10 | Change package name from wtk/wtkplus to wtklite. |
@@ -119,6 +119,7 @@ namespace WTK | ||
119 | 119 | OnEventCase( WM_VSCROLL, OnVerticalScroll( SplitWord(w_param), (HWND)(l_param)) ); |
120 | 120 | OnEventCase( WM_PAINT, OnPaint() ); |
121 | 121 | OnEventCase( WM_DESTROY, OnDestroy() ); |
122 | + OnEventCase( WM_CLOSE, OnClose() ); | |
122 | 123 | } |
123 | 124 | /* In the event that no handler is provided for any particular message, |
124 | 125 | * fall back to MS-Windows own default handler. |
@@ -122,7 +122,6 @@ namespace WTK | ||
122 | 122 | */ |
123 | 123 | virtual long OnCreate(){ return 1L; } |
124 | 124 | virtual long OnCommand( WPARAM ){ return 1L; } |
125 | - virtual long OnDestroy(){ return 0L; } | |
126 | 125 | virtual long OnSize( WPARAM, int, int ){ return 1L; } |
127 | 126 | virtual long OnHorizontalScroll( int, int, HWND ){ return 1L; } |
128 | 127 | virtual long OnVerticalScroll( int, int, HWND ){ return 1L; } |
@@ -131,6 +130,8 @@ namespace WTK | ||
131 | 130 | virtual long OnLeftButtonDown(){ return 1L; } |
132 | 131 | virtual long OnLeftButtonUp(){ return 1L; } |
133 | 132 | virtual long OnMouseMove( WPARAM ){ return 1L; } |
133 | + virtual long OnDestroy(){ return 0L; } | |
134 | + virtual long OnClose(){ return 1L; } | |
134 | 135 | }; |
135 | 136 | |
136 | 137 | class WindowClassMaker: protected WNDCLASS, protected GenericWindow |