All im processing in the subclassed WndProc handles WM_KEYDOWN like this:
Code:
static bool bKeys[256];
switch(Msg)
{ case WM_KEYDOWN:
{ bKeys[wParam] = true;
if(bKeys[VK_RETURN] == true)
{ SendMessage(hParent,MW_USER+1,0,0);
return(0);
}
else
{ return Def(hWnd,Msg,wParam,lParam);
}
break;
}
case WM_KEYUP:
{ bKeys[wParam] = false;
return Def(hWnd,Msg,wParam,lParam);
}
default:
return Def(hWnd,Msg,wParam,lParam);
}
Def is the WNDPROC returned from GetWindowLong btw. Im using WM_USER+1 for custom app things. Thanks in advance