https://msdn.microsoft.com/zh-cn/library/cc468269 (vs. 71). Aspx
Also directly copy and paste the code, and then the response DTN_FORMAT notice, code using the wsprintf function (note: when the cursor to the function display # define wsprintf wsprintfW), is the following two lines:
Wsprintf (pDTFormat1 - & gt; PszDisplay,
"% d", oCurTime GetDayOfYear ());
Then prompt me pDTFormat - & gt; PszDisplay LPCWSTR types of the parameters, and the type LPWSTR parameter incompatible
I tried to convert the first argument to cstrings type, and then converted to type LPWSTR, no error, but after the operation is not the desired effect,
Anyone know how to modify?
CodePudding user response:
Try using a static variable
The static TCHAR szBuff [64].
_stprintf_s (szBuff, 64, _T (" % d "), oCurTime. GetDayOfYear ());
PDTFormat1 - & gt; PszDisplay=szBuff;
CodePudding user response:
Don't use your engineering unicode environmentCodePudding user response:
Look at the document, you write in the incoming parameters is to revolt... <) _ _ (: 3)CodePudding user response:
I think it is wrong to "% d"?Should use _T (" % d)"
CodePudding user response: