How can I popup an edit box (or another modal that can type something) in MFC app when I click a button

145 views Asked by At

I want to popup an edit box or another modal when I click a button. I can type something in this box and when I close it, I will receive the data I've just typed. How can I do?

1

There are 1 answers

1
Vlad Feinstein On

Most obvious way would be to create a dialog box with one edit control and OK and Cancel buttons (you would probably want to alow user to cancel).

Then you provide a method in that dialog to access typed-in value after it was closed.