Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
A dialog asking for a value.
To use InputBox , #include the header file dialogs.hpp.
const String userInput = InputBox(
"Hello World", //The caption of the InputBox
"What do you want me to say?", //The question asked
"Nothing"); //The default value
if (userInput!="Nothing") ShowMessage(userInput);
If successful, the user's input is returned, else the default value is returned.
* ShowMessage: the VCL equivalent of std::cout
* MessageDlg: A yes/no/cancel/etc. dialog box.
* InputBox: Ask the user for a value
* InputQuery: Ask the user for a value