-
En_change
Im trying to use EN_CHANGE, and i found some stuff on it, this is what ive code:
Code:
case WM_COMMAND:
switch(HIWORD(wParam)) {
case EN_CHANGE:
SendMessage(GetDlgItem(hwnd,ID_MAG_MAX),WM_SETTEXT,0,"87");
break;
}
however, it does not work for some reason
-
Are you trying to put text in an edit box.
Instead of using SendMessage, use
Code:
SetDlgItemText(hwnd,ID_MAG_MAX, "87");
-
still didnt work, i tried debugging it, but it doesnt even get to that point, i dont even know why it doesnt go there
-
this is the code i have now:
Code:
if ( (HWND)lParam == GetDlgItem(hwnd,ID_MAG_MIN) ){
switch(HIWORD(wParam)) {
case EN_CHANGE:
//SendMessage(GetDlgItem(hwnd,ID_MAG_MAX),WM_SETTEXT,0,"87");
SetDlgItemText(hwnd,ID_MAG_MAX, "87");
break;
}
}
-
could you post all your window procedures if it's not too big.
-
well it is kind of big, but thats all i have for the EN_CHANGE part however
heres the code again tho:
Code:
case WM_COMMAND:
if ( (HWND)lParam == GetDlgItem(hwnd,ID_MAG_MIN) ){
switch(HIWORD(wParam)) {
case EN_CHANGE:
//SendMessage(GetDlgItem(hwnd,ID_MAG_MAX),WM_SETTEXT,0,"87");
SetDlgItemText(hwnd,ID_MAG_MAX, "87");
break;
}
}
-
i searched for EN_CHANGE on these boards, and i found something like this so i decided to make it like it, but it doesnt seem to work
-
nevermind, i got it, thanks!