-
Another Edit question
What im trying to do is when the user changes something in an edit box i want the edit box to be be set to something so i was just trying to test this thing out but when i do it, my program just goes away. Here's the code
Code:
case ID_MAG_MIN:
SendMessage(GetDlgItem(hwnd,ID_MAG_MIN),WM_SETTEXT,0,"34.0");
break;
-
>>when the user changes something in an edit box<<
Handle the EN_CHANGE notification (as HIWORD(wParam) of the parent's WM_COMMAND).
-
do u have an example of how to do it. i tried this, but it didnt work...
Code:
case EN_CHANGE:
switch(HIWORD(wParam))
{
case ID_MAG_MIN:
SendMessage(GetDlgItem(hwnd,ID_MAG_MIN),WM_SETTEXT,0,"34.0");
break;
}
-
EN_CHANGE is delivered in a WM_COMMAND message. Ken has posted code before demonstrating how to handle WM_COMMAND messages:
http://cboard.cprogramming.com/showt...ght=WM_COMMAND
-
I dont understand how to code EN_CHANGE as a HIWORD param, i mean i was thinkin
EN_CHANGE=HIWORD(param), but i got an error doing that
-
i figured it out, so thanks everyone!