使用字符串资源的传统方法是使用LoadString,分配65536个字符的数组即可。
// main.cpp
#include <windows.h>
__declspec(thread) static wchar_t g_resstr[65536];
int main()
{
LoadString(NULL, 1001, g_resstr, 65536);
MessageBox(NULL, g_resstr, L"资源字符串", MB_OK);
return 0;
}
</windows.h>