The UNICODE character affects declarations in the Windows API headers (mainly <windows.h> ), and the _UNICODE and _MBCS affect declarations in the C library.
Example Windows API: with UNICODE defined by MessageBox cards, in Windows terminology the Unicode version, and with UNICODE undefined MessageBox displayed in MessageBoxA , ANSI version.
The C library example is more involved.
Despite the two characters _UNICODE and _MBCS , only three cases stand out:
None of these are defined and, for example, _tcslen displayed in strlen , a narrow character version.
_MBCS and _UNICODE not defined; _tcsclen displayed in _mbslen , a multibyte version of the character.
_UNICODE and _MBCS not defined, and for example, _tcslen displayed in wcslen , a wide-character version.
It is worth noting that all this was in support of Windows 9x, which did not have a widescreen API.
However, in 2001, Microsoft introduced Layer for Unicode , which essentially provided a broad-class API for Windows 9x. And at the same time, the whole scheme above was outdated, with the exception of one case: the use of MFC as a DLL in Windows 9x and the inability or inability to rebuild it. Well, besides the fact that the one who supports the creation of Visual Studio code, from 11 years ago, did not understand this fact ten years ago, and that this, in turn, misleads the hordes of newcomers who, while professionals are seriously unwilling to stop using this is a waste of time.
Cheers and hth.,
source share