Thread: En_change

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    215

    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

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    26
    Are you trying to put text in an edit box.

    Instead of using SendMessage, use

    Code:
    SetDlgItemText(hwnd,ID_MAG_MAX, "87");

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    215
    still didnt work, i tried debugging it, but it doesnt even get to that point, i dont even know why it doesnt go there

  4. #4
    Registered User
    Join Date
    May 2004
    Posts
    215
    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;
    		}
    		}

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    26
    could you post all your window procedures if it's not too big.

  6. #6
    Registered User
    Join Date
    May 2004
    Posts
    215
    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;
    		   }
    		}

  7. #7
    Registered User
    Join Date
    May 2004
    Posts
    215
    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

  8. #8
    Registered User
    Join Date
    May 2004
    Posts
    215
    nevermind, i got it, thanks!

Popular pages Recent additions subscribe to a feed