ppsspp/Windows/W32Util/DialogManager.h

45 lines
861 B
C
Raw 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
{
protected:
HINSTANCE m_hInstance;
HWND m_hParent;
HWND m_hDlg;
LPCSTR m_hResource;
2013-09-15 10:36:19 -07:00
bool m_bValid;
2012-11-01 16:19:01 +01:00
virtual BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
{
MessageBox(0,L"WTF? Pure Call",0,0);
2012-11-01 16:19:01 +01:00
return 0;
}
static INT_PTR CALLBACK DlgProcStatic(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
virtual void Create();
void Destroy();
public:
Dialog(LPCSTR res, HINSTANCE _hInstance, HWND _hParent);
virtual ~Dialog();
void Show(bool _bShow);
virtual void Update() {}
HWND GetDlgHandle()
{
return m_hDlg;
}
};
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();
};