Hi,
I have an editbox problem. I create the editbox with the following:
Code:
settings.hSEdit = CreateWindow("edit",
"", WS_CHILD | WS_VISIBLE | WS_BORDER
| ES_AUTOHSCROLL | ES_MULTILINE | ES_WANTRETURN,
rect.left - 1, rect.bottom - 17, rect.right + 2 - rect.left, 18,
hwnd, NULL, g_hInst, NULL);
The odd thing about this is if I changed hwnd to settings.hStatus (which is an HWND that I use to store the parent window's handle upon creation in another function), in that function call it wont work. I've even tried comparing hwnd to settings.hStatus and using a MessageBox() call to determine the results and it says that they don't match. But thats not even a huge issue cause I can deal with it this way, but it might be a part of my next problem so thats why I included it. The above code is from my windows procedure function for the window in which the editbox is being created for.
Now what my true problem is, is I never receive the messages in which I should be receiving in that very same windows procedure. I use the following to see if I even receive the messages:
Code:
case WM_KEYDOWN:
MessageBox(NULL, "a key is pressed right now (StatusWndProc)", "keypress", MB_OK);
return(DefMDIChildProc(hwnd, Message, wParam, lParam)); // so normal results still occur
break;
But I never see the message box ever popup. I've tried to do this with also the WM_CHAR message and others but it's never received. I've checked the MSDN for all possible windows messages related to an editbox but I can't find any others that would inform me of text being entered into the editbox (I know I could use the EN_CHANGE notification of the WM_COMMAND message to see if changes were made, but I'm looking for a message where I can determine if certain keys were being pressed and not just if changes were made to the editbox's contents).
I'm using MSVC++ .NET 2003 on WinXP, incase thats needed.
Any help would be greatly appreciated,
Tyouk