News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

Main Menu

Pattern Creations Using MFC in VC++

Started by Kalyan, Jul 29, 2008, 11:32 AM

Previous topic - Next topic

Kalyan

Creational Patterns in MFC

Creational patterns find a number of uses in MFC. The standard method of creating objects is almost always direct instatiation of MFC classes or their application-specific subclasses. When patterns are required, the CObject-supported dynamic creation is most often used. This is equivalent to having classes as first-class objects in a language, which makes comparing the patterns to C++ pattern examples complicated.

Some situations take advantage of mechanisms similar to the abstract factory and builder patterns. The abstract factory pattern is used for creating OLE (Object Linking and Embedding) objects, which is a fairly specialized case. The builder pattern is used with the fundamental document/view structure of all MFC applications. Neither of the examples discussed here is a very typical pattern use; however, the patterns are recognizable.