提交 | 用户 | age
|
418cb3
|
1 |
// MyPaneRules.cpp : 实现文件
|
Q |
2 |
//
|
|
3 |
|
|
4 |
#include "pch.h"
|
|
5 |
#include "MTerm1.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->CreateEx(NULL, _T("CMyPaneLog"),_T("日志窗口"), WS_CHILD | WS_VISIBLE, rect, this, IDD_FORM_LOG, NULL);
|
|
49 |
m_pMyFormLog->Create(NULL, NULL, WS_CHILD|WS_VISIBLE, rect, this, IDD_FORM_LOG, NULL);
|
|
50 |
// m_MyDialogLog.Create(m_MyDialogLog.IDD,this);
|
|
51 |
// m_MyDialogLog.ShowWindow(SW_SHOW);
|
|
52 |
// m_MyDialogLog.OnInitDialog();
|
|
53 |
// MyLogEdit1.Create(ES_MULTILINE|ES_WANTRETURN|WS_VSCROLL|WS_VISIBLE,rect,this,5678);
|
|
54 |
// myLoger1.AttachWnd(MyLogEdit1.m_hWnd);
|
|
55 |
// myLoger1.ShowTime=0;
|
|
56 |
// myLoger1.showLineCount=0;
|
|
57 |
return 0;
|
|
58 |
}
|
|
59 |
|
|
60 |
|
|
61 |
void CMyPaneLog::OnSize(UINT nType, int cx, int cy)
|
|
62 |
{
|
|
63 |
CDockablePane::OnSize(nType, cx, cy);
|
|
64 |
|
|
65 |
// TODO: 在此处添加消息处理程序代码
|
|
66 |
if (GetSafeHwnd() == NULL)
|
|
67 |
{
|
|
68 |
return;
|
|
69 |
}
|
|
70 |
/*
|
|
71 |
if (MyLogEdit1.GetSafeHwnd()!=NULL)
|
|
72 |
{
|
|
73 |
CRect rect;
|
|
74 |
GetClientRect(rect);
|
|
75 |
MyLogEdit1.SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
|
|
76 |
MyLogEdit1.ReplaceSel(_T("On size \r\n"));
|
|
77 |
}
|
|
78 |
*/
|
|
79 |
///*
|
|
80 |
if(m_pMyFormLog->GetSafeHwnd()!=NULL)
|
|
81 |
{
|
|
82 |
CRect rect;
|
|
83 |
GetClientRect(rect);
|
|
84 |
m_pMyFormLog->SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
|
|
85 |
}
|
|
86 |
//*/
|
|
87 |
/*
|
|
88 |
if(m_MyDialogLog.GetSafeHwnd()!=NULL)
|
|
89 |
{
|
|
90 |
CRect rect;
|
|
91 |
GetClientRect(rect);
|
|
92 |
m_MyDialogLog.SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
|
|
93 |
}
|
|
94 |
//*/
|
|
95 |
|
|
96 |
}
|
|
97 |
|
|
98 |
|
|
99 |
void CMyPaneLog::OnDestroy()
|
|
100 |
{
|
|
101 |
CDockablePane::OnDestroy();
|
|
102 |
|
|
103 |
// TODO: 在此处添加消息处理程序代码
|
|
104 |
}
|