Home > Software engineering >  Questions about MFC data types
Questions about MFC data types

Time:09-18

I found that there is a MFC LOGFONT structure body, its definition is
Typedef struct tagLOGFONTW
{
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
WCHAR lfFaceName [LF_FACESIZE];
PLOGFONTW} LOGFONTW, * and * NPLOGFONTW NEAR and FAR * LPLOGFONTW;
One final WCHAR lfFaceName [LF_FACESIZE]; Value, I with the assignment lf lfFaceName [LF_FACESIZE]=_T (" tahoma "); Tip me cannot be "const would *" types of values assigned to "WCHAR" types of entities,

Then I found LPCTSTR types of data can be used _T (" * * * * ") to the assignment,
Don't _T (" * * * * ") is often a pointer data? , that how to use=assignment to WCHAR data type Chinese

CodePudding user response:

L "Chinese characters"

CodePudding user response:

reference 1st floor zgl7903 response:
L "Chinese characters"
tried or not

CodePudding user response:

I want to see

CodePudding user response:

wcscpy_s

CodePudding user response:

The
reference 4 floor zgl7903 reply:
wcscpy_s
yes, yes, yes, I remember arrays cannot one-time assignment

CodePudding user response:

_tcscpy (lfFaceName, T (" tahoma "));

CodePudding user response:

_tcscpy (lfFaceName, _T (" tahoma "));

Just reply sent an underscore

CodePudding user response:

The
reference 7 floor guolianghu response:
_tcscpy (lfFaceName, _T (" tahoma "));

Just reply sent an underscore
yes, yes, I know
  • Related