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