--- /dev/null
+////////////////////////////////////////\r
+// MainWnd.h\r
+// Declaration of the CMainWindow class\r
+\r
+#ifndef MAINWND_H\r
+#define MAINWND_H\r
+\r
+#include "TestWnd.h"\r
+\r
+typedef Shared_Ptr<CTestWindow> TestWndPtr;\r
+\r
+class CMainWindow : public CWnd\r
+{\r
+public:\r
+ CMainWindow();\r
+ virtual ~CMainWindow() {}\r
+ virtual HWND Create(CWnd* pParent = 0);\r
+ virtual void OnAllWindowsCreated();\r
+\r
+protected:\r
+ virtual void OnCreate();\r
+ virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);\r
+\r
+private:\r
+ enum Constants\r
+ {\r
+ WM_WINDOWCREATED = WM_USER+1, // the message sent when window is created\r
+ WM_TESTMESSAGE = WM_USER+2 // the test message\r
+ };\r
+\r
+ std::vector<TestWndPtr> m_vTestWnd; // A vector of CTestWin smart pointers\r
+ int m_nTestWin; // Number of additional test windows to be created\r
+ int m_nWindowsCreated; // Count of windows actually created\r
+};\r
+\r
+\r
+#endif //MAINWND_H\r