Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to use IDC_EDIT objects from dialog box

Posted on 1998-11-08
1
Medium Priority
?
1,558 Views
Last Modified: 2013-11-20
I have created a dialog box to pop up on the creation of a new document.  The box has IDC_EDIT objects to enter the names of the 2 players of the game.  How can I access the IDC_EDIT1 and IDC_EDIT2?  I want to perhaps convert them to strings for use with my program.

Thanks,
0
Comment
Question by:Mephisto
1 Comment
 
LVL 1

Accepted Solution

by:
TheGrinch earned 80 total points
ID: 1324354
Use ClassWizard. Select your dialog class.

Click the member variables tab. Highlight each of the IDC_EDIT items and click "Add Variable". Add a variable of category "Value" and type "CString" with a name of your choosing.

Now, invoke your dialog with ...DoModal(). When DoModal() returns the variables will contain the data entered (if "OK" was clicked).

Note: DoModal returns IDOK if OK is clicked, or IDCANCEL if CANCEL was clicked. In the latter case the variables won't be set.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

972 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