PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

loading pic

I tried loading picture file as this with gapidraw201

CGapiSurface(0,TEXT("..\\my app\\pic\\01.gif"));

but it didn't work

anyone can show me a sample to solve this problem?

I don't want to load like below

CGapiSurface(0,TEXT("\\Storage Card\\my app\\pic\\01.gif"));

Its not dynamic, not good :(

Please help, Thank you
Windows CE doesn't support the concept of a Current Working Directory. All paths must be explicit and relative to the root.

You can use GetModuleFileName to retrieve the full path and filename of the current running EXE. After you strip the filename off you can use that path as the base for your datafiles.

Dan East
Take a look through my posts (do view profile and you can find a list of all my posts there) and you'll find source for a getFullPath method. It will return the absolute path of a relative path filename.

EDIT: Also, I 'believe' GD201b supports this method internally although I've not tested it.