Archived

This topic is now archived and is closed to further replies.

Allowing user to pick a bitmap from file...

This topic is 6016 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

Hi, I''m currently using Win98, VC++6 and DirectX 7. I''m writing a simply map editor for a first time game project (very simple RPG style game). What I would like to do is give the user of the map editor the ability to load in any bitmaps from the hard drive. This I can do by allowing the user to type in the path and filename. However, MFC has the CFileDialog ''thing'' built in that would allow the user to simply browse for a file and then it returns the path for me to save into a string. The problem is, I don''t know much C++ (enough to bumble around a bit), so I don''t really know how to set up such a simple code piece to do what I mentioned. I suppose you use the constructor first, but MSDN doesn''t give any examples. I code mainly in C as it is. I''m sure there must be some great pieces of code out there already doing what I''m talking about, or at least some good info on getting it all set up. I''d imagine it could be done in just a few lines of code. Any help would be greatly appreciated. Even a link to some samples. Thanks in advance for anyone willing to help me out. -qf

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Sorry lad ... I don''t think it''s good for you to stick
around with MFC while u dunno a lot o'' C++. C differs a
lot from C++ ... MFC will teach u that

Share this post


Link to post
Share on other sites
If you would like to open a standard "Open File" dialog box without mucking with MFC, then you can use the function GetOpenFileName.
I hope that link works, MS seems to rearrange their webpages every now and then. If the link doesn't work, then go to msdn.microsoft.com and search for the function name.

Edited by - Dactylos on June 27, 2001 5:20:31 AM

Share this post


Link to post
Share on other sites