• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

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.

変更サマリ

差分

--- a/ChangeLog
+++ b/ChangeLog
@@ -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+
18 2012-09-11 Keith Marshall <keithmarshall@users.sourceforge.net>
29
310 Change package name from wtk/wtkplus to wtklite.
--- a/wndproc.cpp
+++ b/wndproc.cpp
@@ -119,6 +119,7 @@ namespace WTK
119119 OnEventCase( WM_VSCROLL, OnVerticalScroll( SplitWord(w_param), (HWND)(l_param)) );
120120 OnEventCase( WM_PAINT, OnPaint() );
121121 OnEventCase( WM_DESTROY, OnDestroy() );
122+ OnEventCase( WM_CLOSE, OnClose() );
122123 }
123124 /* In the event that no handler is provided for any particular message,
124125 * fall back to MS-Windows own default handler.
--- a/wtklite.h
+++ b/wtklite.h
@@ -122,7 +122,6 @@ namespace WTK
122122 */
123123 virtual long OnCreate(){ return 1L; }
124124 virtual long OnCommand( WPARAM ){ return 1L; }
125- virtual long OnDestroy(){ return 0L; }
126125 virtual long OnSize( WPARAM, int, int ){ return 1L; }
127126 virtual long OnHorizontalScroll( int, int, HWND ){ return 1L; }
128127 virtual long OnVerticalScroll( int, int, HWND ){ return 1L; }
@@ -131,6 +130,8 @@ namespace WTK
131130 virtual long OnLeftButtonDown(){ return 1L; }
132131 virtual long OnLeftButtonUp(){ return 1L; }
133132 virtual long OnMouseMove( WPARAM ){ return 1L; }
133+ virtual long OnDestroy(){ return 0L; }
134+ virtual long OnClose(){ return 1L; }
134135 };
135136
136137 class WindowClassMaker: protected WNDCLASS, protected GenericWindow