Play-/Source/ui_win32/CommandSink.cpp
2015-05-06 01:27:59 -04:00

33 lines
499 B
C++

#include "CommandSink.h"
using namespace boost;
using namespace std;
CCommandSink::CCommandSink()
{
}
CCommandSink::~CCommandSink()
{
}
void CCommandSink::RegisterCallback(HWND hWnd, CallbackType Callback)
{
m_Callbacks[hWnd] = Callback;
}
long CCommandSink::OnCommand(unsigned short nId, unsigned short nCmd, HWND hWnd)
{
CallbackList::iterator itCallback;
itCallback = m_Callbacks.find(hWnd);
if(itCallback != m_Callbacks.end())
{
return (itCallback->second)();
}
return TRUE;
}