--- /dev/null
+///////////////////////////////////////////////////\r
+// Output.cpp - Definitions for the CViewOutput, CContainOutput\r
+// and CDockOutput classes\r
+\r
+\r
+#include "stdafx.h"\r
+#include "TabbedMDIApp.h"\r
+#include "Output.h"\r
+#include "resource.h"\r
+\r
+\r
+///////////////////////////////////////////////\r
+// CViewOutput functions\r
+CViewOutput::CViewOutput()\r
+{\r
+ m_hRichEdit = ::LoadLibrary(_T("Riched20.dll")); // RichEdit ver 2.0\r
+ if (!m_hRichEdit)\r
+ {\r
+ ::MessageBox(NULL,_T("CRichView::CRichView Failed to load Riched20.dll"), _T(""), MB_ICONWARNING);\r
+ }\r
+}\r
+\r
+CViewOutput::~CViewOutput(void)\r
+{\r
+ if (m_hRichEdit)\r
+ ::FreeLibrary(m_hRichEdit);\r
+}\r
+\r
+void CViewOutput::OnInitialUpdate()\r
+{\r
+ m_Font.CreateFont(16, 0, 0, 0, FW_NORMAL, 0, 0, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS,\r
+ CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FF_MODERN, _T("Courier New"));\r
+\r
+ SetFont(&m_Font, FALSE);\r
+ SetWindowText(_T("Read Only Output Window"));\r
+}\r
+\r
+void CViewOutput::PreCreate(CREATESTRUCT &cs)\r
+{\r
+ cs.style = ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | WS_CHILD | \r
+ WS_CLIPCHILDREN | WS_HSCROLL | WS_VISIBLE | WS_VSCROLL | ES_READONLY;\r
+\r
+ cs.lpszClass = RICHEDIT_CLASS; // RichEdit ver 2.0\r
+}\r
+\r
+\r
+//////////////////////////////////////////////\r
+// Definitions for the CContainOutput class\r
+CContainOutput::CContainOutput() \r
+{\r
+ SetView(m_ViewOutput); \r
+ SetDockCaption (_T("Output View - Docking container"));\r
+ SetTabText(_T("Output"));\r
+ SetTabIcon(IDI_TEXT);\r
+} \r
+\r
+\r
+//////////////////////////////////////////////\r
+// Definitions for the CDockOutput class\r
+CDockOutput::CDockOutput()\r
+{\r
+ // Set the view window to our edit control\r
+ SetView(m_View);\r
+}\r
+\r
+void CDockOutput::OnInitialUpdate()\r
+{\r
+ // Set the width of the splitter bar\r
+ SetBarWidth(8);\r
+}\r
+\r
+\r