#include <Windows.h>
#include "resource.h"
int main(void)
{
HINSTANCE hInst = GetModuleHandle(NULL);
LPWSTR p = NULL;
LoadStringW(hInst, IDS_STRING101, (LPWSTR)&p, 0);
printf("长度为: %d\n", wcslen(p));
}

目前共有3篇帖子。
【方法】获取字符串资源中某个字符串的长度的方法
回復帖子 |