ARGH
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / DockContainer / src / Output.cpp
1 ///////////////////////////////////////////////////\r
2 // Output.cpp -  Definitions for the CViewOutput, CContainOutput\r
3 //              and CDockOutput classes\r
4 \r
5 \r
6 #include "stdafx.h"\r
7 #include "ContainerApp.h"\r
8 #include "Output.h"\r
9 #include "resource.h"\r
10 \r
11 \r
12 ///////////////////////////////////////////////\r
13 // CViewOutput functions\r
14 CViewOutput::CViewOutput()\r
15 {\r
16         m_hRichEdit = ::LoadLibrary(_T("Riched20.dll")); // RichEdit ver 2.0\r
17     if (!m_hRichEdit)\r
18     {\r
19                 ::MessageBox(NULL,_T("CRichView::CRichView  Failed to load Riched20.dll"), _T(""), MB_ICONWARNING);\r
20     }\r
21 }\r
22 \r
23 CViewOutput::~CViewOutput(void)\r
24 {\r
25         if (m_hRichEdit)\r
26                 ::FreeLibrary(m_hRichEdit);\r
27 }\r
28 \r
29 void CViewOutput::OnInitialUpdate()\r
30 {\r
31         SetWindowText(_T("Output Window"));\r
32 }\r
33 \r
34 void CViewOutput::PreCreate(CREATESTRUCT &cs)\r
35 {\r
36         cs.style = ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | WS_CHILD | \r
37                                 WS_CLIPCHILDREN | WS_HSCROLL | WS_VISIBLE | WS_VSCROLL;\r
38 \r
39         cs.lpszClass = RICHEDIT_CLASS; // RichEdit ver 2.0\r
40 }\r
41 \r
42 \r
43 //////////////////////////////////////////////\r
44 //  Definitions for the CDockOutput class\r
45 CDockOutput::CDockOutput()\r
46 {\r
47         // Set the view window to our edit control\r
48         SetView(m_View);\r
49 }\r
50 \r
51 void CDockOutput::OnInitialUpdate()\r
52 {\r
53         // Set the width of the splitter bar\r
54         SetBarWidth(8);\r
55 }\r
56 \r
57 \r

UCC git Repository :: git.ucc.asn.au