Solved

InputBox ??

Posted on 1998-08-28
2
289 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
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

832 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