Advertisement

Inserting custom resources

Started by November 24, 2003 08:28 AM
1 comment, last by Blowin 21 years, 3 months ago
Hi all, i''m writing an MFC / OPENGL application in vc++ 6.0 and in the init procedures i''d like to load a 3ds sample file. Basically 3ds files are text files. I wonder if it is possible to include the text file into project resources and if it is possible to parse it with the same procedure i use to parse the files on the hard disk. Can anybody help? B.
Yes you can add the 3ds file to your projects resources. Just go to Insert\Resource click the import button, then locate the file you want to bring in.

Then in your code, you can use FindResource(), LoadResource(), and LockResource() to get a pointer to memory containing that file.

Depending on how you wrote your model loading code, it might need some modifications to read the file from memory instead of from the disk, but it could be written in such a way that it can use either source.

J.W.
Advertisement
Thank you very much

B.

This topic is closed to new replies.

Advertisement