Reputation: 17842
I like to know how to initialize and how to copy the contents of one wchar_t* variable into another wchar_t* variable.
wchar_t *lfFace = new wchar_t;
dc.GetTextFaceW(LF_FACESIZE,lfFace);
This sample will throw runtime error.Please correct these.
Thnks
Upvotes: 1
Views: 1730
Reputation: 6809
According to MSDN, you'll want something like this:
wchar_t *lfFace = new wchar_t[LF_FACESIZE];
dc.GetTextFaceW(LF_FACESIZE, lfFace);
// do stuff with lfFace
delete [] lfFace;
Upvotes: 1
Reputation: 36896
Use CStringW
instead. Like this:
CStringW faceName;
dc.GetTextFaceW(faceName);
Upvotes: 4