Click here to Skip to main content
15,894,180 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: unit test Pin
Waldermort17-Aug-06 6:28
Waldermort17-Aug-06 6:28 
GeneralRe: unit test Pin
Zac Howland17-Aug-06 6:54
Zac Howland17-Aug-06 6:54 
GeneralRe: unit test Pin
led mike17-Aug-06 8:51
led mike17-Aug-06 8:51 
GeneralRe: unit test Pin
Zac Howland17-Aug-06 9:53
Zac Howland17-Aug-06 9:53 
GeneralRe: unit test Pin
led mike17-Aug-06 10:31
led mike17-Aug-06 10:31 
GeneralRe: unit test Pin
lucy17-Aug-06 6:09
lucy17-Aug-06 6:09 
GeneralRe: unit test Pin
Waldermort17-Aug-06 6:26
Waldermort17-Aug-06 6:26 
QuestionCRT string macros Pin
Waldermort17-Aug-06 5:17
Waldermort17-Aug-06 5:17 
What with ANSI, UNICODE and MBCS there's a lot can go wrong. Usualy I build MBCS only apps, but I am now taking into account that I may one day re-use my code in a UNICODE build. So I am making use of tchar.h.

Now, I have created a function which performs various tasks on a string
int DrawVertText(HDC hdc,LPCTSTR lpString,int nCount,LPRECT lpRect,UINT uFormat)

According to MSDN with a MBCS build, that LPCTSTR Resolves to a "constant string of TCHAR (const TCHAR*)" which in turn resolves to a "constant string of char (const char*)", and for a UNICODE build a "constant string of wchar_t (const wchar_t*)". I later use the string
int iLength = _tcsclen(lpString);
In my MBCS build it works, when I switch to UNICODE I get the following error

error C2664: 'wcslen' : cannot convert parameter 1 from 'const char *' to 'const unsigned short *'

Why has the string not been resolved to wchar_t ? Also, the mouseover popup in MSVS tells me that lpString is an unsigned short*.
AnswerRe: CRT string macros Pin
Waldermort17-Aug-06 6:03
Waldermort17-Aug-06 6:03 
GeneralRe: CRT string macros Pin
Zac Howland17-Aug-06 6:07
Zac Howland17-Aug-06 6:07 
GeneralRe: CRT string macros Pin
Michael Dunn17-Aug-06 13:21
sitebuilderMichael Dunn17-Aug-06 13:21 
Questionpost build event in makefile Pin
rana7417-Aug-06 5:11
rana7417-Aug-06 5:11 
QuestionMultiByteToWide does not work without printf??? Pin
fvandun17-Aug-06 5:02
fvandun17-Aug-06 5:02 
AnswerRe: MultiByteToWide does not work without printf??? Pin
Zac Howland17-Aug-06 5:14
Zac Howland17-Aug-06 5:14 
GeneralRe: MultiByteToWide does not work without printf??? Pin
fvandun17-Aug-06 5:29
fvandun17-Aug-06 5:29 
GeneralRe: MultiByteToWide does not work without printf??? Pin
Zac Howland17-Aug-06 5:41
Zac Howland17-Aug-06 5:41 
GeneralRe: MultiByteToWide does not work without printf??? Pin
fvandun17-Aug-06 5:55
fvandun17-Aug-06 5:55 
GeneralRe: MultiByteToWide does not work without printf??? Pin
Zac Howland17-Aug-06 5:58
Zac Howland17-Aug-06 5:58 
GeneralRe: MultiByteToWide does not work without printf??? Pin
fvandun17-Aug-06 6:07
fvandun17-Aug-06 6:07 
QuestionLimited Users Pin
Dave Kerr17-Aug-06 4:58
Dave Kerr17-Aug-06 4:58 
QuestionMicrosoft Access Database Import to VC++ Windows Forms Pin
Nokoff17-Aug-06 4:56
Nokoff17-Aug-06 4:56 
AnswerRe: Microsoft Access Database Import to VC++ Windows Forms Pin
cje17-Aug-06 5:15
cje17-Aug-06 5:15 
QuestionWindows Directory Pin
si_6917-Aug-06 4:49
si_6917-Aug-06 4:49 
AnswerRe: Windows Directory Pin
Dave Kerr17-Aug-06 4:56
Dave Kerr17-Aug-06 4:56 
GeneralRe: Windows Directory Pin
Michael Dunn17-Aug-06 13:23
sitebuilderMichael Dunn17-Aug-06 13:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.