Discussion Community

IT Acumens Forum => Programming Discussions for Engineers => Programming in "Vc++" => Topic started by: Kalyan on Jul 29, 2008, 05:02 PM

Title: Pattern Creations Using MFC in VC++
Post by: Kalyan on Jul 29, 2008, 05:02 PM
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.