myhookdata[index].hhook = setwindowshookex(
myhookdata[index].ntype,
myhookdata[index].hkprc,
(hinstance) null, getcurrentthreadid());
checkmenuitem(hmenu, index,
mf_bycommand | mf_checked);
afhooks[index] = true;
}
// if the selected type of hook procedure is
// already installed, remove it and remove the
// check mark from the associated menu item.
else
{
unhookwindowshookex(myhookdata[index].hhook);
checkmenuitem(hmenu, index,