[HELP] Messagebox help

Posts 18 of 8 · Page 1 of 1
[HELP] Messagebox help
Well i have just finished my C++ hack
Its a hotkey hack.

I needed to change the character bytes to multiset otherwise it doesnt work.
But when i use multi, My messagebox wont compile. I get this error.

error C2664: 'MessageBoxA' : cannot convert parameter 2 from 'const wchar_t [82]' to 'LPCSTR'

When i set it to unicode, I get errors from the hack.

How can i fix this? Halp me pl0x.

ac1d_buRn
Psst.... Try with this :
#include <tchar.h>

If this simply does not work, Then Add (T_(WHATEVERTEXT/COMMAND));

Hope this helped

Melodia
Yeh that should work.
Basically your trying to turn a unicode string into a char*, Might want to change ur properties to Multibyte, that's what I did because I like using ASCII more then Unicode.

Just Project > Properties > Configuration Properties > General: then select Multibyte set
Quote Originally Posted by Melodia View Post
Psst.... Try with this :
#include <tchar.h>

If this simply does not work, Then Add (T_(WHATEVERTEXT/COMMAND));

Hope this helped

Melodia
OK, Thanks for that.
Ill try nao.

EDIT: Didnt work .
Thnx anyway.

Quote Originally Posted by why06 View Post
Yeh that should work.
Basically your trying to turn a unicode string into a char*, Might want to change ur properties to Multibyte, that's what I did because I like using ASCII more then Unicode.

Just Project > Properties > Configuration Properties > General: then select Multibyte set
It is on multibyte when i get that error D:
LPCSTR a = (LPCSTR)"string goes here";
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?