7fd59977 |
1 | // OCC_3dDoc.cpp: implementation of the OCC_3dDoc class. |
2 | // |
3 | ////////////////////////////////////////////////////////////////////// |
4 | |
5 | #include <stdafx.h> |
6 | #include "OCC_3dDoc.h" |
7 | |
8 | ////////////////////////////////////////////////////////////////////// |
9 | // Construction/Destruction |
10 | ////////////////////////////////////////////////////////////////////// |
11 | |
12 | OCC_3dDoc::OCC_3dDoc() |
13 | { |
14 | |
15 | myCResultDialog.Create(CResultDialog::IDD,NULL); |
16 | |
17 | RECT dlgrect; |
18 | myCResultDialog.GetWindowRect(&dlgrect); |
19 | LONG width = dlgrect.right-dlgrect.left; |
20 | LONG height = dlgrect.bottom-dlgrect.top; |
21 | |
22 | RECT MainWndRect; |
23 | AfxGetApp()->m_pMainWnd->GetWindowRect(&MainWndRect); |
24 | LONG left = MainWndRect.left+3; |
25 | LONG top = MainWndRect.top + 112; |
26 | |
27 | myCResultDialog.MoveWindow(left,top,width,height); |
28 | |
29 | } |
30 | |
31 | OCC_3dDoc::~OCC_3dDoc() |
32 | { |
33 | |
34 | } |
35 | |
36 | void OCC_3dDoc::PocessTextInDialog(char* aTitle, TCollection_AsciiString& aMessage) |
37 | { |
38 | // aMessage+= "-------------------------------- END ----------------------------------------\n"; |
39 | CString text(aMessage.ToCString()); |
40 | myCResultDialog.SetTitle(CString(aTitle)); |
41 | myCResultDialog.SetText(text); |
42 | SetTitle(CString(aTitle)); |
43 | |
44 | } |
45 | |
46 | void OCC_3dDoc::ClearDialog() |
47 | { |
48 | myCResultDialog.Empty(); |
49 | } |
50 | |
51 | void OCC_3dDoc::AddTextInDialog(TCollection_AsciiString& aMessage) |
52 | { |
53 | CString TextToAdd(aMessage.ToCString()); |
54 | CString CurrentText; |
55 | myCResultDialog.GetText(CurrentText); |
56 | |
57 | CString Text; |
58 | Text = TextToAdd + CurrentText; |
59 | |
60 | myCResultDialog.SetText(Text); |
61 | |
62 | } |
63 | |
64 | CString OCC_3dDoc::GetDialogText() |
65 | { |
66 | CString CurrentText; |
67 | myCResultDialog.GetText(CurrentText); |
68 | |
69 | return CurrentText; |
70 | |
71 | } |
72 | |
73 | void OCC_3dDoc::SetDialogTitle(TCollection_AsciiString theTitle) |
74 | { |
75 | myCResultDialog.SetTitle(CString(theTitle.ToCString())); |
76 | } |