Is CMake compatible with VS 2015 Express?

Is CMake compatible with Visual Studio 2015 Express?

CMake GUI asks user to select a compiler from a list. I chose “Visual Studio 14 2015”, as that selection would appear to be the closest to VS 2015 Express. Express versions are not included in the list.

I used CMake to create a *.exe version of an app I had previous built under VS 2015 Express. Said *.exe runs OK, except that

SendMessage(hEdit,WM_SETTEXT,0,LPARAM(szText));

returns 0, the contents of edit box “hEdit” update to contain only the first character of szText, and no runtime errors occur.

I have tried several speculative edits in the source code but without success.

Can anyone help?
VS 14 2015 is any version of Visual Studio of that year, CE (Community Edition/Express) or any other. It is compatible.

If it were not you wouldn't even have a build from the CMake output, and CMake isn't doing much of anything that would make such an error, where most of the program works but some minor thing is not working as expected.

So, this is a general Windows programming issue, not a make or build issue.

It is likely that you have a mismatch of string type. It may be, for example, that Windows GUI is expecting a Unicode string, but you're sending ASCII or UTF-8. Or, the reverse might be true, that you've set for a Unicode build, and are sending a Unicode string to a control expecting ASCII or UTF-8. You might try setting for "not set" or "MCBS" if you're currently set to Unicode, or set to Unicode if you're currently one of the other two.

I suspect you're sending Unicode to a control expecting ASCII, because most encoded characters would produce the end result you've described.
Thanks for the info. Among the remedies I tried within VS 2015 IDE were both options
Use Unicode Character Set
and
Use Multi-Byte Character Set
under Properties -> Configuration Properties -> Character Set,

along with the appropriate coding.

Both versions built w/o incident but exhibit the same runtime anomaly. Would you have any additional suggestions re project settings?
Last edited on
Microsoft's documentation gives this for the WM_SETTEXT message.

The return value is TRUE if the text is set. It is FALSE (for an edit control), LB_ERRSPACE (for a list box), or CB_ERRSPACE (for a combo box) if insufficient space is available to set the text in the edit control. It is CB_ERR if this message is sent to a combo box without an edit control.


So, false for an edit control is a return of 0, which this states is saying there isn't sufficient room in the edit control to store the text. Check the configuration of the edit control for how much room it sets aside for storage. I suspect you'll find it is set to 1, since that's the amount of text it took.

You could also try to change the text to a string with length of 1 to see if the return is true, as an experimental verification of this notion.
Thank you for your assistance, but I have given up on CMake and have reverted to vanilla-flavored VS 2015.
Topic archived. No new replies allowed.