I need to Read the value that is typed into a EditBox and save into into a Int.
Does anyone know how to do this?? this is the code i have so far..
case EditAge: {
if (HIWORD(wParam) == EN_CHANGE)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, that’s a start, but did you even try to retrieve the text? Or do you have issues converting the text to a number? For future questions, try to be more specific. You’re most likely looking for something like this line (don’t forget to check to see if you’re in the right text box!):
Once you’ve got the text, you can use e.g.
strtol()to parse the string and retrieve a number.Edit:
You could actually use
GetDlgItemInt(), documented here, to retrieve an integer right away.