Archived

This topic is now archived and is closed to further replies.

Curtis123

Reading strings into a program....

Recommended Posts

How can I prompt the user with a textbox and ask them to type some stuff in, and then have a bigger text box below that has information pertaining to what the user input. It would be kind of like a datbase sort of thing, but I want to be able to get the string the user entered and alter or direct it to my needs. All of this done using Visual C++ 6, and I ''m using the MFC AppWizard.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Since you''re using MFC, the easiest way is probably to create a modal dialog.

- In the Resource view, add a new dialog resource.
- Bring up the MFC ClassWizard (Ctrl+W) and select "Create a new class".
- When you have a new CDialog derived class, go back to the dialog editor and add a textbox, OK/Cancel buttons etc.
- Use the ClassWizard to add member variables for the controls.
- Check MSDN to see how CDialog::DoModal() works.

Share this post


Link to post
Share on other sites
Another solution is to add a handler for the edit box in terms of changes. Thus, as the user types in text, the edit box updates the dialog box. The dialog box could then update its parent via messages.

Kuphryn

Share this post


Link to post
Share on other sites