|
-
June 30th, 1999, 10:12 AM
#1
compile error
I get
"error C2664: 'MessageBoxW':cannot convert parameter 2 from 'char [5]' to 'const unsigned short *'"
when using ::messageBox.
If I comment out the following two lines then the message box will work fine.
#define UNICODE
#define _UNICODE
but if I leave the comments in and compile, then I get:
error C2440: 'initializing'
error C2664: 'SetCommandText'
both saying that they can't convert a parameter.
What gives???
TIA, Woody
[email protected]
-
June 30th, 1999, 10:28 AM
#2
Re: compile error
you are building a unicode app, which means each char is 2 bytes (a short), but you are trying to pass in a char* which is only a one byte char. These types are not compatible.
If you wish to use char* (one byte char's), then do not build a unicode build. If you want to build a unicode version, then you are going to have to use WCHAR's or some other 2 byte data type to store your chars in.
HTH
--michael
-
June 30th, 1999, 10:31 AM
#3
Re: compile error
What's your active configuration? If it's Unicode, then you might want to change it to Debug.
Go to Menu itme Build\Set Active Configuration.., change it to Debug and try the build again.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|