-
Edit Boxes
I have an edit box that is a child to a simple window. I created it with CreateWindow(). I want to be notified when something is typed into the edit box. I tried using WM_CHAR and WM_KEYDOWN in my wndproc but it didn't work. Does anyone know how i could go about doing this?
Thx.
-
You could either continue checking the message box and see if anything has been added or changed or you could subclass the edit control and intercept any messages about a charecter being typed.
- Sean
-
Subclass it. Here is an example I wrote for someone else, shows the technique...
-
Thx a lot for this example. I got it to work now.
-
isn't there just a message that the window receives when somebody types into its edit child?
-
Code:
case WM_COMMAND:
if ( (HWND)lParam == hEdit ) {
switch( HIWORD(wParam) ) {
case EN_CHANGE:
hEdit has changed
}
}
-
Quote:
Originally posted by pear shaped
Code:
case WM_COMMAND:
if ( (HWND)lParam == hEdit ) {
switch( HIWORD(wParam) ) {
case EN_CHANGE:
hEdit has changed
}
}
okay, i figured there was a message you could just use. thanks.