text file as resource?

Started by
0 comments, last by Emmanuel Deloget 19 years, 2 months ago
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?
Advertisement
Hi,

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

To load this resource in your code, use:
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,

This topic is closed to new replies.

Advertisement