myhookdata[idm_debug].hkprc = debugproc;
myhookdata[idm_getmessage].ntype = wh_getmessage;
myhookdata[idm_getmessage].hkprc = getmsgproc;
myhookdata[idm_keyboard].ntype = wh_keyboard;
myhookdata[idm_keyboard].hkprc = keyboardproc;
myhookdata[idm_mouse].ntype = wh_mouse;
myhookdata[idm_mouse].hkprc = mouseproc;
myhookdata[idm_msgfilter].ntype = wh_msgfilter;
myhookdata[idm_msgfilter].hkprc = messageproc;
// initialize all flags in the array to false.
memset(afhooks, false, sizeof(afhooks));
return 0;
case wm_command:
switch (loword(wparam))
{
// the user selected a hook command from the menu.