-
Notifications
You must be signed in to change notification settings - Fork 0
/
CDlgBase.h
57 lines (48 loc) · 1.19 KB
/
CDlgBase.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef H_CLASS_DLG_BASE___
#define H_CLASS_DLG_BASE___
// ===================================================================
// main.h
// ダイアログ・ヘッダー
// ===================================================================
#include <windows.h>
#include <TCHAR.h>
#include <stdlib.h>
#include <stdio.h>
#include "util.h"
#include "resource.h"
class CDlgBase
{
public:
CDlgBase();
virtual ~CDlgBase();
virtual HWND Create(HINSTANCE hInst, const TCHAR* lpTemplateName, HWND hWnd);
virtual void Destroy()
{
if (m_hWnd)
DestroyWindow(m_hWnd);
};
// Get
inline HWND GetWndHwnd()
{ return m_hWnd; };
inline HWND GetDlgHwnd()
{ return m_hDlg; };
inline void SetDlgHwnd(HWND hWnd)
{ m_hDlg = hWnd; };
inline HINSTANCE GetHInstance()
{ return m_hInst; };
inline BOOL IsCreated()
{ return m_bCreated; };
inline BOOL SetCreated(BOOL b)
{ m_bCreated = b; };
protected:
// ダイアログプロシージャ
static BOOL CALLBACK StaticDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
// ダイアログプロシージャ
virtual BOOL CALLBACK MyDlgProc(HWND hDlg, UINT msg, WPARAM wp, LPARAM lp);
CDlgBase* m_pSelf;
HINSTANCE m_hInst;
HWND m_hWnd;
HWND m_hDlg;
BOOL m_bCreated;
};
#endif