#include "StdAfx.h"
#include "HotKeys.h"
// default constructer... add code here if you like, but not needed really
HotKeys::HotKeys(void)
{
}
HotKeys::~HotKeys(void)
{
}
// This function will call the necessary code needed to allow a user program to trap the hotkeys on a PPC
BOOL HotKeys::SetupHotKeys(HWND hWnd)
{
HINSTANCE hCoreDLL;
UnregisterFunc1Proc procUndergisterFunc;
hCoreDLL = LoadLibrary (_T("coredll.dll"));
ASSERT(hCoreDLL);
procUndergisterFunc = (UnregisterFunc1Proc)GetProcAddress(hCoreDLL, _T("UnregisterFunc1"));
ASSERT(procUndergisterFunc);
for(int i=0xc1; i<0xcf; i++)
{
procUndergisterFunc(MOD_WIN, i);
RegisterHotKey(hWnd, i, MOD_WIN, i);
}
FreeLibrary(hCoreDLL);
return TRUE;
}
|