Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I use C++ in VS 2008, I usually add .bmp file into resource file .rc. But now I want to add .txt file, .wav and so on. But I don't know how to, can anybody help me ?

Adding resource files is one work, using resources is a another work. Therefore I want to know how to use it. For example how to read .txt file from resource.

I hope you can help me. Thank you so much !
Posted
Updated 25-May-10 0:57am
v2

1 solution

To add special resources, select Custom after selecting Add Resource.

To use these resources you can use the following APIs in order.
FindResource - Use type parameter as RT_RCDATA.
LoadResource

LockResource


The pointer returned by LockResource can be used to copy the .txt or .wav contents.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900