|
Windows API TutorialsThis variability can be encapsulated in two custom client classes: the argument list class and the dialog controller class. The argument list class encapsulates the in and out arguments and provides access for retrieving and changing them. The definition and the implementation of this class is under complete control of the client (the programmer who reuses our code). The dialog controller class contains control objects for all the gizmos in the dialog and implements interactions between them. The client is supposed to derive this class from the abstract DlgController class and implement all its pure virtual methods. The rest is just glue. We need to instantiate a template CtrlFactory class that is used by our generic implementation of the ModalDialog class. The controller factory creates the appropriate client-defined controller and returns a polymorphic pointer to it. Fig 1. shows the relationships between various classes involved in the implementation of a dialog box. Fig 1. Classes involved in the dialog box design pattern ...» | Код для вставки книги в блог HTML
phpBB
текст
|
|