Advertisement

MSVC 2005

Started by July 27, 2007 02:57 AM
1 comment, last by joanusdmentia 17 years, 4 months ago
i m getting error while using messagebox error C2664: 'CWnd::MessageBoxA' : cannot convert parameter 1 from 'const wchar_t [14]' to 'LPCTSTR' pls solve it
You're passing a wide character string (wchar_t*) to a function expecting a char*.
Advertisement
Or, if you must use a wide-character string call MessageBoxW() instead of MessageBoxA(). Plain old MessageBox() (without the A or W) is actually a macro that is defined as one of the previous 2 functions depending on if UNICODE is defined or not, so in your case UNICODE isn't defined (can be set in project options -> general -> character set) and is calling MessageBoxA().
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V

This topic is closed to new replies.

Advertisement