Solved

InputBox ??

Posted on 1998-08-28
2
296 Views
Last Modified: 2010-04-10
Is there a counterpart to the MessageBox function in C++, something that acts like an InputBox.
0
Comment
Question by:jtm082698
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
milenvk earned 50 total points
ID: 1171519
There is no such a standard dialog, though Visual Basic adds one, but it is still not available in Win32 SDK. The good news is that it's fairly easy to create that kind of dialog yourself and put it in a dll for instance...
0
 

Expert Comment

by:rabbitears
ID: 1171520
simple answer.. nope :) it would be INCREDIBLY simple to write your own class to do this.. you wouldn't even need a dialog template.. you could create the dialog, static text, and edit control dynamically and call it like this:

CInputBox input("What is your name?");
answer = input.DoModal();

Actually, DoModal() can be placed in your constructor so all you would have to do is call the first line..

the reason why there's not really anything like this is because there ARE  few set backs to that situation.. think about all the style bits that are involved with an edit box..  if there were a general function to do this, it would require SEVERAL parameters in order for you to get the input box you want..

hope this helps
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ Language error 28 314
FMX enumerated colours 2 155
How can i compile this github project?? 2 103
One named event, multiple event handlers 2 58
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question