Skip to main content
gamedev.net
🔒 Locked

a MessageBox-type command for inputting string?

Started by synth_cat Jan 16, 2007 at 2:44 PM 4 replies 650+ views
Original Post
synth_cat
synth_cat
Hello all, I am currently working on my handmade world maker tool (win32 app) for my game, and I am interested in finding a way to input a string to help speed up the process of choosing files to load. Is there a one-line command like MessageBox() that will do this for me? What I basically want to happen is that when the user selects "Load" within my program, a Windows box will appear with a space for typing in a string and an "OK" button (or something like that.) -synth_cat
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
Dancin_Fool
Dancin_Fool
You could use the actual windows open file dialog, you should be able to find the source code on msdn. It's quite easy to use from what I remember, just fill out a struct with the parameters and then fire it off to the function.
LessBread
LessBread
Have you considered using the File Open Dialog? You can find a tut here. See also GetOpenFileName.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Kwizatz
Kwizatz
In VB there is InputBox, but I doubt thats part of the system dll's, it should be easy to create a Dialog resource and use that in case GetOpenFileName doesn't cut it for you.
synth_cat
synth_cat
Thanks, guys. I guess that using the 'Open' dialog would actually be the best idea for this - just a matter of implementation.
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith
synth_cat
synth_cat
Just finished working GetOpenFileName and GetSaveFileName into my code. These are great; exactly what I was looking for. Thanks!
Greg Philbrick, Game Developercoming soon . . . Overhauled CellZenith

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.