CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Windows/W32Util/DialogManager.h
Views: 1401
1
#pragma once
2
3
#include "Common/CommonWindows.h"
4
5
class Dialog
6
{
7
public:
8
Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent);
9
virtual ~Dialog();
10
11
virtual void Show(bool _bShow, bool includeToTop = true);
12
virtual void Update() {}
13
14
HWND GetDlgHandle() {
15
return m_hDlg;
16
}
17
protected:
18
virtual void Create();
19
void Destroy();
20
21
HINSTANCE m_hInstance;
22
HWND m_hParent;
23
HWND m_hDlg;
24
LPCSTR m_hResource;
25
bool m_bValid;
26
UINT m_bShowState = SW_HIDE;
27
28
virtual BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) = 0;
29
static INT_PTR CALLBACK DlgProcStatic(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
30
};
31
32
33
class DialogManager
34
{
35
public:
36
static void AddDlg(Dialog *dialog);
37
static void RemoveDlg(Dialog *dialog);
38
static bool IsDialogMessage(LPMSG message);
39
static void EnableAll(BOOL enable);
40
static void DestroyAll();
41
static void UpdateAll();
42
};
43
44