Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to use IDC_EDIT objects from dialog box

Posted on 1998-11-08
1
Medium Priority
?
1,555 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 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

719 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