Solved

How to use IDC_EDIT objects from dialog box

Posted on 1998-11-08
1
1,548 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
[X]
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
1 Comment
 
LVL 1

Accepted Solution

by:
TheGrinch earned 20 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 123
method notes when mouse over in eclipse 5 96
has22 challenge 11 111
zeroMAx challenge 20 135
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

751 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