欢迎来到我的博客https://www.cnblogs.com/veis/

https://www.cnblogs.com/veis/p/14182037.html

MFC char与TCAHR互转

`

char Path[MAX_PATH] = {0};
TCHAR T_Path[MAX_PATH] = L"aaaaaaaaaa";

//TCHAR 转 char
wcstombs(Path, T_Path, MAX_PATH);

//char 转 TCHAR
memset(T_Path, 0, MAX_PATH); 
mbstowcs(T_Path, Path, MAX_PATH);

`

posted @ 2024-01-04 10:55  veis  阅读(11)  评论(0编辑  收藏  举报