how to get string in non-console Win32 app?
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
You'll probably have to create the window yourself, and have the okay button return the string in the text box.
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.
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.
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?
I would be using WinAPI, with no MFC or externals.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement