text file as resource?

This topic is 5000 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Does anyone know if you can add a text file as a win32 resource? If so, how would I load the text file from the resource?

Share on other sites
Hi,

You can add the text file (or whatever file in fact) in the resource file using user defined resources.

HRSRC hrsrc = FindResource(NULL, my_name, my_user_type);HGLOBAL hresdata = LoadResource(NULL, hrsrc);char *pText = (char *)(LockResource(hresdata);

It is not necessary to unlock the resource after that.

HTH,

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 104
• 11
• Forum Statistics

• Total Topics
632979
• Total Posts
3009682
• Who's Online (See full list)

There are no registered users currently online

×