Click here to Skip to main content
15,890,435 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CList Vs CArray MFC Pin
Christian Graus6-Aug-06 10:48
protectorChristian Graus6-Aug-06 10:48 
GeneralRe: CList Vs CArray MFC Pin
Zac Howland7-Aug-06 4:01
Zac Howland7-Aug-06 4:01 
GeneralRe: CList Vs CArray MFC Pin
Christian Graus6-Aug-06 11:01
protectorChristian Graus6-Aug-06 11:01 
GeneralRe: CList Vs CArray MFC Pin
Kevin McFarlane6-Aug-06 23:18
Kevin McFarlane6-Aug-06 23:18 
GeneralRe: CList Vs CArray MFC Pin
Christian Graus6-Aug-06 23:53
protectorChristian Graus6-Aug-06 23:53 
GeneralRe: CList Vs CArray MFC Pin
Zac Howland7-Aug-06 3:56
Zac Howland7-Aug-06 3:56 
GeneralRe: CList Vs CArray MFC Pin
Christian Graus7-Aug-06 10:32
protectorChristian Graus7-Aug-06 10:32 
GeneralRe: CList Vs CArray MFC Pin
Zac Howland7-Aug-06 14:48
Zac Howland7-Aug-06 14:48 
Christian Graus wrote:
My understanding has always been that the MFC containers existed because there was no STL at the time, MFC containers do not have any special purpose beyond that. They naturally integrate somewhat with MFC, they are part of it.


STL "existed" when the MFC containers were designed, but the S part was missing (that is, there wasn't a formalized standard yet (which is why many systems still have the .h versions of the standard header files). They were not designedas a gap filler until STL was formalized; they were designed to provide convinient containers to make MFC programming easier. Hence the reason they have built-in serialization support.

Christian Graus wrote:
MFC containers are in my opinion a real pain to iterate over compared to STL, not least because they follow no standard or pattern. This is worse if you need to copy items between containers.


MFC containers use iteration techniques tha follow a logical pattern for the type of a given container. It can be confusing (and a grave, and all to common, mistake) to assume that you can just change the type of a STL container in a "drop-in" fashion. MFC at least makes you think, "Do I really want to change this array container to a list?" I view that as more of a feature than a pain; especially when dealing with newer programmers.

Christian Graus wrote:
Yes, even a pointer is a random access iterator. This is one way in which the STL shows sign of intelligent design and the MFC containers do not.


While this is a nice feature for STL, it also makes it more complicated to teach to newer programmers (try explaining why you should use iterators to someone who has been programming for 3 weeks after you just got them to understand pointers).

Christian Graus wrote:
Most people who use MFC containers don't even know the STL exists, or assume they need to use the MFC ones because they were written by MS. That is the sort of ignorance that leads me to tell people to look into the STL.


While I don't disagree with that statement (not completely anyway), that is a bold jump from the original question. And the fact remains, use the correct datatype (and correct library) for the task at hand.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

AnswerRe: CList Vs CArray MFC Pin
Hamid_RT6-Aug-06 3:08
Hamid_RT6-Aug-06 3:08 
AnswerRe: CList Vs CArray MFC Pin
David Crow7-Aug-06 3:59
David Crow7-Aug-06 3:59 
Questioncalling another window from dialog box and display data Pin
With_problem5-Aug-06 18:05
With_problem5-Aug-06 18:05 
AnswerRe: calling another window from dialog box and display data Pin
A_Fa5-Aug-06 20:10
A_Fa5-Aug-06 20:10 
GeneralRe: calling another window from dialog box and display data Pin
With_problem6-Aug-06 16:34
With_problem6-Aug-06 16:34 
AnswerRe: calling another window from dialog box and display data Pin
Vipin Aravind6-Aug-06 2:12
Vipin Aravind6-Aug-06 2:12 
GeneralRe: calling another window from dialog box and display data Pin
With_problem6-Aug-06 16:29
With_problem6-Aug-06 16:29 
AnswerRe: calling another window from dialog box and display data Pin
Hamid_RT6-Aug-06 3:04
Hamid_RT6-Aug-06 3:04 
GeneralRe: calling another window from dialog box and display data Pin
With_problem6-Aug-06 16:32
With_problem6-Aug-06 16:32 
GeneralRe: calling another window from dialog box and display data Pin
Kiran Pinjala6-Aug-06 19:12
Kiran Pinjala6-Aug-06 19:12 
GeneralRe: calling another window from dialog box and display data [modified] Pin
With_problem6-Aug-06 19:27
With_problem6-Aug-06 19:27 
GeneralRe: calling another window from dialog box and display data Pin
Hamid_RT6-Aug-06 19:35
Hamid_RT6-Aug-06 19:35 
QuestionHow to disable one button in toolbar [modified] Pin
xuwenq885-Aug-06 18:01
xuwenq885-Aug-06 18:01 
AnswerRe: How to disable one button in toolbar Pin
Steve Echols5-Aug-06 18:25
Steve Echols5-Aug-06 18:25 
AnswerRe: How to disable one button in toolbar Pin
ThatsAlok5-Aug-06 23:52
ThatsAlok5-Aug-06 23:52 
AnswerRe: How to disable one button in toolbar Pin
Hamid_RT6-Aug-06 2:43
Hamid_RT6-Aug-06 2:43 
GeneralRe: How to disable one button in toolbar Pin
xuwenq886-Aug-06 5:37
xuwenq886-Aug-06 5:37 

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.