Hi Alvein
I am not processing in the WndProc function where the HWND handle is passed as parameter.
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:
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
}
}
where CMyEditControl is the custom edit box class I created.
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).
This above function is called when any of the edit boxes generates a WM_KEYDOWN message, I want to know how to know which one it was.