Hi Jaken
I am not processing in the WndProc function.
Lets say the class that I created, the custom edit box class, is called CMyEditControl. Then the function that I use to process the event that a key was pressed in the edit box looks like this:
Code:
void CMyEditControl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
char pressedKey;
pressedKey = char(nChar);
short keystate;
switch(nChar)
{
case VK_SHIFT:
// do whatever
case VK_LEFT:
// do whatever
}
}
The OnKeyDown is the default name for the event handler( the one that MFC creates for you). How do I get hold of the HWND handle from here (from within this function).