Click here to Skip to main content
15,885,309 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Loading two versions of Common Controls Pin
Jonathan Davies13-Jul-13 9:05
Jonathan Davies13-Jul-13 9:05 
GeneralRe: Loading two versions of Common Controls Pin
Jonathan Davies14-Jul-13 5:25
Jonathan Davies14-Jul-13 5:25 
QuestionCStringArray vs. CArray<CString> Pin
hans.sch11-Jul-13 5:33
hans.sch11-Jul-13 5:33 
AnswerRe: CStringArray vs. CArray<CString> Pin
pasztorpisti11-Jul-13 6:25
pasztorpisti11-Jul-13 6:25 
GeneralRe: CStringArray vs. CArray<CString> Pin
hans.sch11-Jul-13 6:43
hans.sch11-Jul-13 6:43 
GeneralRe: CStringArray vs. CArray<CString> Pin
pasztorpisti11-Jul-13 8:21
pasztorpisti11-Jul-13 8:21 
GeneralRe: CStringArray vs. CArray<CString> Pin
hans.sch11-Jul-13 9:14
hans.sch11-Jul-13 9:14 
GeneralRe: CStringArray vs. CArray<CString> Pin
pasztorpisti11-Jul-13 9:29
pasztorpisti11-Jul-13 9:29 
Here is a nice page that can help you in choosing between the two options: http://msdn.microsoft.com/en-us/library/y1z022s1%28v=vs.71%29.aspx[^]. In my previous post I mentioned that in the early days of MFC there were no template usage in the mfc library so they created several array implementation for some basic types like WORD, CString, Int,... Later they introduced templated classes like CArray<> but they kept the earlier container classes as well for backward compatibility so as to keep old legacy code compilable. Today you can use either of them but probably the CArray<cstring> is preferred in new code.

I would compile only a single unicode-aware version from my program and I would convert my strings to ascii only before sending them over serial connection and converting them back after receiving the string from serial but of course this is your choice. If you used utf-8 to represent strings then the conversion would be unnecessary - with utf8 you should convert between utf8 and utf16 only when you call winapi that has string parameters and/or return values. I like using utf-8 internally because its compatible with ascii, unicode aware, and its very easy to port to unix like systems at the same time.
GeneralRe: CStringArray vs. CArray<CString> Pin
hans.sch11-Jul-13 10:34
hans.sch11-Jul-13 10:34 
GeneralRe: CStringArray vs. CArray<CString> Pin
pasztorpisti11-Jul-13 13:01
pasztorpisti11-Jul-13 13:01 
AnswerRe: CStringArray vs. CArray<CString> Pin
Joe Woodbury15-Jul-13 12:00
professionalJoe Woodbury15-Jul-13 12:00 
QuestionThe Serical Port Question? Pin
dave62112711-Jul-13 0:27
dave62112711-Jul-13 0:27 
AnswerRe: The Serical Port Question? Pin
«_Superman_»11-Jul-13 1:19
professional«_Superman_»11-Jul-13 1:19 
GeneralRe: The Serical Port Question? Pin
dave62112711-Jul-13 2:43
dave62112711-Jul-13 2:43 
GeneralRe: The Serical Port Question? Pin
Erudite_Eric11-Jul-13 6:06
Erudite_Eric11-Jul-13 6:06 
GeneralRe: The Serical Port Question? Pin
dave62112711-Jul-13 15:15
dave62112711-Jul-13 15:15 
AnswerRe: The Serical Port Question? Pin
Erudite_Eric11-Jul-13 6:08
Erudite_Eric11-Jul-13 6:08 
GeneralRe: The Serical Port Question? Pin
dave62112711-Jul-13 15:29
dave62112711-Jul-13 15:29 
GeneralRe: The Serical Port Question? Pin
Erudite_Eric11-Jul-13 20:59
Erudite_Eric11-Jul-13 20:59 
GeneralRe: The Serical Port Question? Pin
dave62112712-Jul-13 5:35
dave62112712-Jul-13 5:35 
QuestionCompile error caused from big header file Pin
andreas049-Jul-13 22:02
andreas049-Jul-13 22:02 
AnswerRe: Compile error caused from big header file Pin
Richard MacCutchan10-Jul-13 1:33
mveRichard MacCutchan10-Jul-13 1:33 
AnswerRe: Compile error caused from big header file Pin
Erudite_Eric10-Jul-13 2:19
Erudite_Eric10-Jul-13 2:19 
QuestionRe: Compile error caused from big header file Pin
David Crow10-Jul-13 6:17
David Crow10-Jul-13 6:17 
AnswerRe: Compile error caused from big header file Pin
Erudite_Eric10-Jul-13 23:12
Erudite_Eric10-Jul-13 23:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.