--- /dev/null
+///////////////////////////////////////\r
+// DlgSubclassApp.h\r
+\r
+#ifndef DLGSUBCLASSAPP_H\r
+#define DLGSUBCLASSAPP_H\r
+\r
+#include "MyDialog.h"\r
+\r
+\r
+// Declaration of the CDialogApp class\r
+class CDlgSubclassApp : public CWinApp\r
+{\r
+public:\r
+ CDlgSubclassApp();\r
+ virtual ~CDlgSubclassApp();\r
+ virtual BOOL InitInstance();\r
+ CMyDialog& GetDialog() {return m_MyDialog;}\r
+\r
+private:\r
+ CMyDialog m_MyDialog;\r
+};\r
+\r
+\r
+// returns a reference to the CDlgSubclassApp object\r
+inline CDlgSubclassApp& GetSubApp() { return *((CDlgSubclassApp*)GetApp()); }\r
+\r
+\r
+#endif // define DLGSUBCLASSAPP_H\r
+\r