Solution46
CWndParamAuto.cpp
[詳解]
1 //=============================================================================
2 /// @file
3 /// ウィンドウメッセージ引数自動保存クラス実装ファイル
4 ///
5 /// ウィンドウメッセージ引数自動保存クラス実装ファイルです。
6 ///
7 /// $Id: CWndParamAuto.cpp 245 2019-03-20 15:03:41Z admin $
8 /// $Date: 2019-03-21 00:03:41 +0900 (2019/03/21 (木)) $
9 /// $Author: admin $
10 ///
11 /// @attention なし
12 
13 #pragma managed( push, off )
14 
15 //=============================================================================
16 // インクルードファイル
17 #include <CWndParamAuto.h>
18 
19 //=============================================================================
20 // ウィンドウライブラリ名前空間
21 namespace LibWindow {
22  //=========================================================================
23  // ウィンドウメッセージ引数自動保存クラス
24  //=========================================================================
25  // 構築子と解体子
26  //-------------------------------------------------------------------------
27  // コンストラクタ
28  CWndParamAuto::CWndParamAuto( CWndBase& rcWndBase ) noexcept
29  // メンバ変数初期化
30  : m_rcWindow( rcWndBase )
31  , m_hWnd( rcWndBase.GetHandle() )
32  , m_uMsg( rcWndBase.GetMessage() )
33  , m_wParam( rcWndBase.GetWParam() )
34  , m_lParam( rcWndBase.GetLParam() )
35  {}
36 
37  //-------------------------------------------------------------------------
38  // デストラクタ
40  // ウィンドウ状態を調べる
41  if ( 0 != ::IsWindow( m_hWnd ) ) {
42  // ウィンドウメッセージ引数を復元する
47  }
48  }
49 }
50 
51 #pragma managed( pop )
virtual WPARAM & GetWParam() noexcept
ウィンドウメッセージ第1引数取得関数
Definition: CWndBase.h:91
virtual HWND & GetHandle() noexcept
ウィンドウハンドル取得関数
Definition: CWndBase.h:69
CWndBase & m_rcWindow
ウィンドウクラス参照
Definition: CWndParamAuto.h:59
HWND m_hWnd
ウィンドウハンドル
Definition: CWndParamAuto.h:60
CWndParamAuto(CWndBase &rcWndBase) noexcept
コンストラクタ
ウィンドウメッセージ引数自動保存クラスヘッダファイル
WPARAM m_wParam
メッセージ第1引数
Definition: CWndParamAuto.h:62
UINT m_uMsg
メッセージID
Definition: CWndParamAuto.h:61
ウィンドウライブラリ名前空間
Definition: CommandIdDef.h:22
virtual LPARAM & GetLParam() noexcept
ウィンドウメッセージ第2引数取得関数
Definition: CWndBase.h:102
virtual ~CWndParamAuto() noexcept
デストラクタ
基本ウィンドウクラス
Definition: CWndBase.h:31
virtual UINT & GetMessage() noexcept
ウィンドウメッセージ取得関数
Definition: CWndBase.h:80
LPARAM m_lParam
メッセージ第2引数
Definition: CWndParamAuto.h:63