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

Posted on 2003-02-28
Medium Priority
Last Modified: 2013-11-20
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!!!  
Question by:Moyea
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

kusamson earned 140 total points
ID: 8046075
when you design your dialog with the 3 edit boxes, you should be able to associate the edit controls with variables.  
Bring out the class wizard, under "member variable" tag, find the ID of your edit controls and add the variables.
You can set the variables to type int.

When you want to retrieve the data in the edit box, call UpdateData(TRUE),  the variables will get the values in the boxes.

Expert Comment

ID: 8046763
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;
//use n1,n2,n3 for whatever purpose you like

//to set values to editboxes


Author Comment

ID: 8049891
great job and ... it works

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question