0

I am making a small app in Visual C++ in Microsoft Visual Studio and want to get some text from the user. I want to have a message box with a text box where the user can input the data. I know how to display a message box, but there is no text box for input. How can make a message box with input.

tstew
  • 131
  • 2
  • 11

3 Answers3

0

There isn't anything pre-packaged that does this exactly but you can create a form and use the ShowDialog() method. You'll need to design the form but it doesn't sound like you need to put a lot on it. I recommend reading the following: http://msdn.microsoft.com/en-us/library/c7ykbedk.aspx

sedavidw
  • 11,116
  • 13
  • 61
  • 95
0

Check this: Prompting a user with an input box? [C++]

Shortly, you must make your own input dialog with current WinSDK. Wether you going to stick with the WinSDK or going to Qt, wxwidget, or anything else is up to you.

Community
  • 1
  • 1
ardhitama
  • 1,949
  • 2
  • 18
  • 29
0

You could use DialogBoxIndirect()^ to instantiate an in-memory dialog template^.

It does not require any resources (you compose it in code), it's reusable... but it's not very easy to build.

PS: You can also take a look on CodeProject.com^, maybe they have what you need^.

CodeAngry
  • 12,760
  • 3
  • 50
  • 57