Files
ppsspp/Windows/W32Util/DialogManager.h

43 lines
872 B
C
Raw Permalink Normal View History

2012-11-01 16:19:01 +01:00
#pragma once
#include "Common/CommonWindows.h"
2012-11-01 16:19:01 +01:00
class Dialog
{
public:
Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent);
virtual ~Dialog();
virtual void Show(bool _bShow, bool includeToTop = true);
virtual void Update() {}
HWND GetDlgHandle() {
return m_hDlg;
}
2012-11-01 16:19:01 +01:00
protected:
virtual void Create();
void Destroy();
2022-08-14 09:12:57 -07:00
HINSTANCE m_hInstance;
2012-11-01 16:19:01 +01:00
HWND m_hParent;
HWND m_hDlg;
LPCSTR m_hResource;
2013-09-15 10:36:19 -07:00
bool m_bValid;
UINT m_bShowState = SW_HIDE;
2012-11-01 16:19:01 +01:00
virtual BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) = 0;
2012-11-01 16:19:01 +01:00
static INT_PTR CALLBACK DlgProcStatic(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
};
class DialogManager
{
public:
static void AddDlg(Dialog *dialog);
static void RemoveDlg(Dialog *dialog);
2012-11-01 16:19:01 +01:00
static bool IsDialogMessage(LPMSG message);
static void EnableAll(BOOL enable);
static void DestroyAll();
static void UpdateAll();
};