Jump to content
  • Advertisement
Sign in to follow this  
MetaCipher

Win32 Help

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

I'm opening an Open file dialog, and then grabbing the string. I want it so it points to the file from the current directory. Example: C:\Folder\file.txt If my program is in C:\, I want the string to be like this instead: .\Folder\file.txt (or similar) Is there a flag I can set or something to do this?

Share this post


Link to post
Share on other sites
Advertisement
I wouldn't think there is, but if you really need it, you could write a routine to translate from absolute path to relative. Although, this begs the question: why does it matter? Most file-related routines function just fine with both absolute and relative paths, so the only reason I can think of is that you need to manipulate it somehow, correct? If you provide us with more information we can probably point you to a better solution.

Share this post


Link to post
Share on other sites
Hrm, I believe I came up with a solution that would work, but this is assuming that the person always puts their tilesets in one folder. I could then strip the path, and then add the path to that tileset folder. Or taking it further, copy that tileset file over to the tileset folder.

P.S. Thanks for the help.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Use PathSkipRoot() and copy it to a string that already has ".\"

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!