Unicode or

xiaoxiao2021-03-06  94

In Windows programming, you often compile the Unicode version, the method is the configuration of the project file plus Unicode or _unicode compilation conditions, which one is used?

Jeffrey Richter said in "Windows Core Programming", _unicode macro is used for C run files, while Unicode Macro is used for Windows header files. When compiling the source code module, it is usually necessary to simultaneously define these two macros. How is it? What?

I searched in the MFC's header file, found such a code in the AFXV_W32.h file:

#ifdef _unicode

#ifndef unicode

#define unicode

#ENDIF

#ENDIF

#ifdef unicode

#ifndef _unicore

#define _unicode

#ENDIF

#ENDIF

So, in the MFC program, as long as one of the two is set.

But for the SDK program, I found that the number of occurrences in the header file is Unicode, _Unicode only in a few files, and there are not many places defined, so write an SDK program, if you want to compile into a Unicode program, As long as the Unicode macro can be set

转载请注明原文地址:https://www.9cbs.com/read-123804.html

New Post(0)