Archived

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

TheBartman

Simple C++ directory navigation question...

Recommended Posts

TheBartman    122
Hello everyone, I have been working on a C++ project for some time now, and I have run across this problem that should be simple, but has me stumped. The problem is, I want to store the data for my program in a seperate directory than the programs executable. In this case, the /data subdirectory. But no matter what, I can''t get the code to navigate to that directory. I had originally thought it would be ./data/textures/filename.bmp, but that did not work. If you can help me out, I would be grateful. Also, if you need more information from me I can provide more information about the problem. Thankyou, Michael Bartman Dark Omen Studios

Share this post


Link to post
Share on other sites
TheBartman    122
*edit*Turns out it didn't like the bitmap file for some reason and I was right the very first time I tried it, the way sysOp said Thank you

Nope That didn't work. I will show you how I am loading the file :

...
lpddsOffscreen = bitmap_surface("Data\\textures\\grass.bmp");
...
LPDIRECTDRAWSURFACE7 bitmap_surface(LPCSTR filename)
{
...
hBitmap = (HBITMAP)LoadImage(NULL, filename, IMAGE_BITMAP, 0, 0,
LR_DEFAULTSIZE | LR_LOADFROMFILE);
...
}

Thankyou,
Michael Bartman
Dark Omen Studios

edit: By the way, that is a little bit of Win32 GDI and DirectDraw7 mixed up

[edited by - TheBartman on October 21, 2002 10:26:09 PM]

[edited by - TheBartman on October 21, 2002 10:49:33 PM]

Share this post


Link to post
Share on other sites