4 ms·
You can get by using the agnostic names for the functions, because the windows header files will handle the conversions for you. For example, inside the WinUse
by jussij 3y ago
You can get by using the agnostic names for the functions, because the windows header files will handle the conversions for you.
For example, inside the WinUser.h header you'll find this MessageBox definition:
#ifdef UNICODE
#define MessageBox MessageBoxW
#else
#define MessageBox MessageBoxA
#endif // !UNICODE
These agnostic definitions help if you want the code to compile as both 32 bit and 64 bit without code changes.
- projektfu 3y agoYes, then you should make sure UNICODE is not defined, probably by #ifdef UNICODE #error This is written only for ANSI windows. #endif Or you can use TCHAR and _T().