Link to home
Start Free TrialLog in
Avatar of silentthread2k
silentthread2kFlag for United States of America

asked on

The annoying LPCWSTR in as WinAPI parameter

I'm just trying to launch a message box in visual c++

This does not work....

MessageBox(NULL,TCHAR("test"),(LPCWSTR)"test",NULL);

Help. :-)
ASKER CERTIFIED SOLUTION
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of silentthread2k

ASKER

It rocks man! Clean, short and to the point!
Here is also a reference to the .NET version with various other options such as icons (code is in the lower section of the page:

http://msdn.microsoft.com/en-us/library/system.windows.forms.messagebox.aspx

...and the native Win32 version reference:

http://msdn.microsoft.com/en-us/library/ms645505(VS.85).aspx