Link to home
Start Free TrialLog in
Avatar of Moyea
Moyea

asked on

Edit Box Problem??.. Urgen... Really need help

Hi All smart experts:
  Now I try to edit a dialog box with 3 edit boxs to run a controller void function. I created a member function for ID_ok to execute the controller void function but I don't know how to let Edit Boxs to read int values to the 3 different int variables..working for this part long time... still not get it.....Really need help now.. PLease give me the code!!!  
                                            Moyea  
ASKER CERTIFIED SOLUTION
Avatar of kusamson
kusamson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Belfry
Belfry

i don't know what did you mean, but i assume you want to assign values to edit boxes and get values from the edit boxes. you can use GetDlgItemInt() to get the values in integer and SetDlgItemInt() to set the value for the edit boxes.
//to get values in editboxes
int n1,n2,n3;
n1=GetDlgItemInt(IDC_EDIT1);
n2=GetDlgItemInt(IDC_EDIT2);
n3=GetDlgItemInt(IDC_EDIT3);
//use n1,n2,n3 for whatever purpose you like
//...

//to set values to editboxes
SetDlgItemInt(IDC_EDIT1,n1);
SetDlgItemInt(IDC_EDIT2,n2);
SetDlgItemInt(IDC_EDIT3,n3);
//...

enjoy:)
Avatar of Moyea

ASKER

great job and ... it works