I have already started using EVC for 2 days, I couldn't help but feel it, Microsoft is too old, what is not as good as before.
Due to the familiarity of VC, in addition, the media is the same as the MFC and VCs used by EVC, so they will be made in VC6.
The program, then transplant it to EVC, compiled yesterday afternoon, simply fainting! All places using CString
An error, STRCPY, ATOI, ATOF, full report. Check out carefully, it is a UNICODE problem, EVC compiles cstring
As a Unicode format, the ANSI character's function strcpy et al. Cannot be converted to const char * and char *.
I hope that EVC compiles cstring into an ASI character, so it is removied by the switch _unicade, unicode, the result is still.
It's just big! Insert stdafx.h with #ifdefenene ire # Endif,
Found that the macro Unicode is defined in the #inlude afx.h file, continue to track, and finally discover directly defined in the WCE.h header file.
There is no use of the switch, it seems that this road is blocked. Want to change CString to other classes, such as CMYSTRING, but and interface
The interface has been defined, how many parameters use CSTRING, what should I do? Already 9 o'clock in the evening, how to go home early? Finally decided to put char
The array of definitions is replaced with tchar, replace the strcpy to LSTRCPY, ATOI to replace _wtoi, but ATOF can not find WTOF
This function. Online query, did not find it, it is determined that Windows CE can only use unicode. Hey! 5 years ago, I have been this
Sample use, I didn't expect to carry this problem today. It seems that I have misunderstand that embedded development is not the province's memory!
Continue to solve the ATOF, I check the help, F_CRT is conversion, but there is no way to convert the string into float, peak loop, think of
SSCANF can format data in characters, can you use SWSCAF! Finally, Unicode is converted into
ANSI character, ANSI character is converted into unicode, finally find MultibyTowideChar and WideChartomultibyte
Two functions resolved.
With the use of EVC these two days, there is an experience:
In the future, use the compatible type as much as possible, such as using Tchar, don't use CHAR, use int, don't use int.
In a non-Windows platform, typedef tchar char; is also available.
MFC's cstring can be said to be the most bad one in the String class, try not to use. If you don't use CString, what is it used?
EVC does not support STL, it seems to write a string class instead of cstring!
The last, international issues should pay attention to, otherwise you have to eat.