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
I am working with dialog based application,I have created a menu bar for that,Now i want by clicking a menu option like "quote" it will open a another window and from that window function I want to call other function so taht it start display what in that window.How is that possible.
By which function i will do this.
no kiran i dont want to create second dialog,
let me expalin you....
I have function which i am calling through dialog box.now i want that by clicking a button it will open a window(which will open untill click to exit) and from that window i will b able to call all other function so that it will start display the data getting from server.
Hope i am clear if not pls remind me
Thanks for your reply
I am using an instance of the CMonthCalCtrl class. However when I executed the application and click on the a specific date, the date disappears and in some cases half of a rectangled border develope around the normally oval blue date. When I use the CDateTimeCtrl class (with the calendar functionality) this does not happen.
I believe this is simply a redraw error because when I click forward a month the selected date redraws properly.
I am using Visual Studio 2003 and I am running XP Multimedia. I am using a digital widescreen flat panel display (24") which occaisionally has problems properly rendering borders on objects on web pages.
-- modified at 19:45 Saturday 5th August, 2006
When I rotate my monitor 90 degrees the control renders properly (as do the webpages that exhibit the rendering problem mentioned above).
The fact that things change when you move the monitor indicates that you have a 'brown' connection somewhere. This has absolutely nothing to do with programming,(unless if you in moving the screen inadvertely move the mouse, touch the keyboard, or, if you have a touch screen, when moving the monitor).
In that case, be more carefull, and debug the appropriate input!
Otherwise,You are in the wrong forum for this type of problem, but, as free advice (for once) I offer the following:-
Place your system, (Desk and all), in the middle of the room!
Get your System up and running, and gently move the Cables around one by one, without disturbing the other cables.
Start with the Powe Cables, and Plugs. Differentiate between the Plug and the cable!
Put Tension on each cable. When the system dies, you found a 'brown' circuit!
Replace the Cable, If the problem persists, it is either the Connector protruding from the equipment, or the inner hardware soldered to the connector.
If the problem has gone, it probably was the Lead! THROW IT OUT! (If you keep it in the garage, just foor keeps, you may be on to this bulletin board again with the same problem, stating that you tried the above with a flex you had in the garage, and you cannot find the problem!