zxd
2023-10-21 89cd7441c184d37f90d4d5311b348e938119765f
提交 | 用户 | age
0ed438 1 // MyPaneRules.cpp : 实现文件
Q 2 //
3
4 #include "pch.h"
5 #include "MTerm2.h"
6 #include "MyPaneLog.h"
7
8
9 // CMyPaneRules
10
11 IMPLEMENT_DYNAMIC(CMyPaneLog, CDockablePane)
12
13 CMyPaneLog::CMyPaneLog()
14 {
15
16 //    m_pMyFormLog=(CMyFormLog*) (RUNTIME_CLASS(CMyFormLog)->CreateObject());
17 //    m_pMyDialogLog=(CMyDialogLog*) (RUNTIME_CLASS(CMyDialogLog)->CreateObject());
18 }
19
20 CMyPaneLog::~CMyPaneLog()
21 {
22 }
23
24
25 BEGIN_MESSAGE_MAP(CMyPaneLog, CDockablePane)
26     ON_WM_CREATE()
27     ON_WM_SIZE()
28     ON_WM_DESTROY()
29 END_MESSAGE_MAP()
30
31
32
33 // CMyPaneRules 消息处理程序
34
35
36
37
38 int CMyPaneLog::OnCreate(LPCREATESTRUCT lpCreateStruct)
39 {
40     if (CDockablePane::OnCreate(lpCreateStruct) == -1)
41         return -1;
42
43     // TODO:  在此添加您专用的创建代码
44     RECT rect;   
45
46     GetClientRect(&rect);     
47
48 //    m_pMyFormLog->Create(NULL, NULL,  WS_CHILD|WS_VISIBLE, rect, this, IDD_FORM_RULES, NULL);
49     m_MyDialogLog.Create(m_MyDialogLog.IDD,this);
50     m_MyDialogLog.ShowWindow(SW_SHOW);
51 //    m_MyDialogLog.OnInitDialog();
52 //    MyLogEdit1.Create(ES_MULTILINE|ES_WANTRETURN|WS_VSCROLL|WS_VISIBLE,rect,this,5678);
53 //    myLoger1.AttachWnd(MyLogEdit1.m_hWnd);
54 //    myLoger1.ShowTime=0;
55 //    myLoger1.showLineCount=0;
56     return 0;
57 }
58
59
60 void CMyPaneLog::OnSize(UINT nType, int cx, int cy)
61 {
62     CDockablePane::OnSize(nType, cx, cy);
63
64     // TODO: 在此处添加消息处理程序代码
65     if (GetSafeHwnd() == NULL) 
66     { 
67         return; 
68     } 
69 /*
70     if (MyLogEdit1.GetSafeHwnd()!=NULL)
71     {
72         CRect rect; 
73         GetClientRect(rect); 
74         MyLogEdit1.SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER); 
75         MyLogEdit1.ReplaceSel(_T("On size \r\n"));
76     }
77     */
78 /*
79     if(m_pMyFormLog->GetSafeHwnd()!=NULL) 
80     { 
81         CRect rect; 
82         GetClientRect(rect); 
83         m_pMyFormLog->SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER); 
84     }
85 //*/
86     if(m_MyDialogLog.GetSafeHwnd()!=NULL) 
87     { 
88         CRect rect; 
89         GetClientRect(rect); 
90         m_MyDialogLog.SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER); 
91     }
92
93 }
94
95
96 void CMyPaneLog::OnDestroy()
97 {
98     CDockablePane::OnDestroy();
99
100     // TODO: 在此处添加消息处理程序代码
101 }