Reading strings into a program....

Started by
2 comments, last by Curtis123 21 years, 1 month ago
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.
Advertisement
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.
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
Thanks, I''ll try that!

This topic is closed to new replies.

Advertisement