ppsspp/Windows/W32Util/DialogManager.h
Diogo Franco (Kovensky) 6108e36ae9 Several fixes to build under stricter C++11
Add missing #include to various files.

strings.h isn't provided by MSVC so we don't include it there; it's needed
for other OSes/compilers.

Get rid of pre-ISO-C malloc.h includes; malloc is provided by stdlib.h.

Fixes some linuxisms.

Prepend __builtin_ to __clear_cache, calling it without the prefix is a
GNU extension.
2012-11-21 14:33:50 -03:00

43 lines
791 B
C++

#pragma once
#include <windows.h>
class Dialog
{
protected:
HINSTANCE m_hInstance;
HWND m_hParent;
HWND m_hDlg;
LPCSTR m_hResource;
virtual BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
{
MessageBox(0,"WTF? Pure Call",0,0);
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 bool IsDialogMessage(LPMSG message);
static void EnableAll(BOOL enable);
static void DestroyAll();
static void UpdateAll();
};