[C++] textbox

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
User avatar
crzyrbl
Calc Wizard
Posts: 518
Joined: Wed 06 Jul, 2005 4:56 pm
Location: 3rd rock....

[C++] textbox

Post by crzyrbl »

how do I make a simple text box that returns what's in it after it's closed?
something like:
char* attr=somesortoftextbox("Text box message, enter stuff below");

I've never really done anything with the windows gui before except for stuff like:
MessageBox (NULL, TEXT ("Hey! Listen!") , TEXT ("Navi"), MB_OK);
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

It depends on what API you are programming. If you’re using raw win32, there’s no such a simple way to do that. The easiest way I can think of is creating a dialog box resource, using the DialogBox function and extracting the text from the edit control you put on it with a WM_GETTEXT message.
User avatar
crzyrbl
Calc Wizard
Posts: 518
Joined: Wed 06 Jul, 2005 4:56 pm
Location: 3rd rock....

Post by crzyrbl »

thanks for the reply. Unfortunately I'm using win32 like you said :x
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.

Image
Post Reply