Jump to content
  • Advertisement
Sign in to follow this  
Nahrix

Text fields using C++

This topic is 4904 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello again gentlemen, patrons, and developers. I have yet another problem to share with you. I've successfully implemented saving and loading in my program, and now I want to allow files to be loaded and saved using more than one file name. I need to know two things: 1: What command is available to obtain information pertaining to the files in a directory? 2: How can I implement a graphical text-field for inputting filenames? All I know is cin, which uses the console. Thank you very much for your time. Edit: Sorry everyone - To make things clearer, I'm using the SDL API.

Share this post


Link to post
Share on other sites
Advertisement
2 questions
1. how long have you been programming

2. can you use plain english?

assuming you have just finished fstream.h, you have a ways ahead of you before you will be on graphics.

Share this post


Link to post
Share on other sites
Quote:
Original post by Nahrix
Hello again gentlemen, patrons, and developers. I have yet another problem to share with you. I've successfully implemented saving and loading in my program, and now I want to allow files to be loaded and saved using more than one file name. I need to know two things:

1: What command is available to obtain information pertaining to the files in a directory?

2: How can I implement a graphical text-field for inputting filenames? All I know is cin, which uses the console.

Thank you very much for your time.


1. That's operating system-specific, to the best of my knowledge. Apparently it's getting rolled into C++0x though. In the meantime, consult POSIX and the MS knowledge base for OS-dependent crap.

2. That's also operating system-specific. What GUI API are you using? I recommend FLTK, though I suppose Win32 is fine.

Share this post


Link to post
Share on other sites
Quote:
Original post by game mercenary
2 questions
1. how long have you been programming

2. can you use plain english?

assuming you have just finished fstream.h, you have a ways ahead of you before you will be on graphics.


I'm not sure I understand the nature of your reply - be it serious or sarcastic. Nonetheless, I will attempt to explain my situation further.

1: I have been programming since I was three. Specifically, though, I have been programming C++ since I was eighteen. I am twenty-one now. As well, I am in the middle of a somewhat-complicated 2D simulation using the SDL API. I'm capable of grasping the basics of graphical programming by now, but I am no expert.

2: I have used cin in text-based programs to obtain C-style strings from the user. What I need now is the equvilant of Java's textfield, since I'm running a win32 window instead of a console. As well, I need to obtain a list of files in a directory, perhaps in array or vector format, to list the available map files which can be loaded.

Edit: I would like to appologise if I'm not making enough sense. My knowledge of graphical API's are limited to the basics of SDL, and I'm using what information I have to explain my situation to the best of my ability. Please excuse any explanation that doesn't use proper terminology.

Share this post


Link to post
Share on other sites
Quote:
assuming you have just finished fstream.h, you have a ways ahead of you before you will be on graphics.


Givin his journal, I don't think this will be a problem.

Nahrix, if your using SDL, you probably will still be able to use Win32 API functions. Try MSDN and see If you can find any info on text fields. There is also a windows programming site that has some good info. I'll look it up and see if the site has anything.

Hope this helps.

Share this post


Link to post
Share on other sites
Does the win32 API need any sort of library implementation equivilant to SDL, or is it out-of-the-box with Visual Studio 6?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!