hdc = getdc(hwndmain);
cch = wsprintf(szbuf, "keyboard - ncode: %d, vk: %d, %d times ",
ncode, wparam, c++);
textout(hdc, 2, 115, szbuf, cch);
releasedc(hwndmain, hdc);
return callnexthookex(myhookdata[keyboard].hhook, ncode, wparam,
lparam);
}
/****************************************************************
wh_msgfilter hook procedure
****************************************************************/
lresult callback messageproc(int ncode, wparam wparam, lparam lparam)
{
char szbuf[128];
char szmsg[16];
char szcode[32];
hdc hdc;
static int c = 0;
int cch;
if (ncode < 0) // do not process message
return callnexthookex(myhookdata[msgfilter].hhook, ncode,
wparam, lparam);