Solved

InputBox ??

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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.

943 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now