Guest User

Untitled

a guest
Jan 17th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. // カスタムウィンドウクラスCCustomWindowの定義
  2. class CCustomWindow : public CWindowImpl<CCustomWindow>{ // CWindowImpl<CCustomWindow>の派生クラスとして, CCustomWindowを定義.
  3.  
  4. // publicメンバ
  5. public:
  6.  
  7. // ウィンドウクラス名登録マクロ
  8. DECLARE_WND_CLASS(_T("CCustomWindow")); // マクロDECLARE_WND_CLASSでウィンドウクラス名"CCustomWindow"を登録.
  9.  
  10. // privateメンバ
  11. private:
  12.  
  13. // メッセーマップマクロ
  14. BEGIN_MSG_MAP(CCustomWindow)
  15. MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
  16. END_MSG_MAP()
  17.  
  18. // メンバ関数の定義
  19. // ウィンドウ破棄時のイベントハンドラOnDestroy
  20. LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled){
  21.  
  22. // 終了メッセージの送信
  23. PostQuitMessage(0); // PostQuitMessageで終了コードを0としてWM_QUITメッセージを送信.
  24. return 0; // 0を返す.
  25.  
  26. }
  27.  
  28. };
Add Comment
Please, Sign In to add comment