2008-12-08 05:25:12 +00:00
|
|
|
#include <windows.h>
|
|
|
|
#include <vector>
|
|
|
|
#include "DialogManager.h"
|
|
|
|
|
|
|
|
typedef std::vector <HWND> WindowList;
|
|
|
|
WindowList dialogs;
|
|
|
|
|
|
|
|
void DialogManager::AddDlg(HWND hDialog)
|
|
|
|
{
|
|
|
|
dialogs.push_back(hDialog);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DialogManager::IsDialogMessage(LPMSG message)
|
|
|
|
{
|
|
|
|
WindowList::iterator iter;
|
2010-05-28 23:14:16 +00:00
|
|
|
for (iter=dialogs.begin(); iter!=dialogs.end(); ++iter)
|
2008-12-08 05:25:12 +00:00
|
|
|
{
|
|
|
|
if (::IsDialogMessage(*iter,message))
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DialogManager::EnableAll(BOOL enable)
|
|
|
|
{
|
|
|
|
WindowList::iterator iter;
|
2010-05-28 23:14:16 +00:00
|
|
|
for (iter=dialogs.begin(); iter!=dialogs.end(); ++iter)
|
2008-12-08 05:25:12 +00:00
|
|
|
EnableWindow(*iter,enable);
|
|
|
|
}
|