how to get string in non-console Win32 app?

Started by
5 comments, last by Brocketino 17 years, 7 months ago
Hello everyone - I was wondering if there is any simple way for the user to input a string into a Win32 app (_not_ a console app.) I'm assuming there is some sort of MessageBox()-ish function that you can do this with (ie., a function that creates a simple dialog box with an "OK" button and a field for entering a string. But I've never heard the specifics for how to do this. Thanks in advance for any help! -synth_cat
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
Advertisement
You'll probably have to create the window yourself, and have the okay button return the string in the text box.
"I'd rather know one thing, no matter how ordinary, than discourse endlessly on great issues." -- Galileo
You can include a dialogbox as a resource in your application. Then you will have to supply your own dialogbox messagehandler.
To create the actual DialogBox you can use the DialogBox, DialogBoxParam functions or similar.
there are MANY ways to do this.
it depends on the library you use.
you could use:
.NET, MFC, WinAPI,...
or "external" libs like QT, SDL, etc.
Thanks for all the replies!

The DialogBox is new to me - is this something that you have to write a CALLBACK function for?

Quote:
there are MANY ways to do this.
it depends on the library you use.
you could use:
.NET, MFC, WinAPI,...
or "external" libs like QT, SDL, etc.

I would be using WinAPI, with no MFC or externals.
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
Check this out
daerid@gmail.com
Or you can check this out

This topic is closed to new replies.

Advertisement