QuakeGod
2023-10-20 6fa60de2b0d0237054aa7571191df0f291838031
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#include "pch.h"
#include "MTerm1.h"
#include "CMyPaneInputShow.h"
 
 
// CMyPaneRules
 
IMPLEMENT_DYNAMIC(CMyPaneInputShow, CDockablePane)
 
CMyPaneInputShow::CMyPaneInputShow()
{
 
    m_pMyFormInputShow = (CMyFormInputShow*)(RUNTIME_CLASS(CMyFormInputShow)->CreateObject());
    //    m_pMyDialogLog=(CMyDialogLog*) (RUNTIME_CLASS(CMyDialogLog)->CreateObject());
}
 
CMyPaneInputShow::~CMyPaneInputShow()
{
}
 
 
BEGIN_MESSAGE_MAP(CMyPaneInputShow, CDockablePane)
    ON_WM_CREATE()
    ON_WM_SIZE()
    ON_WM_DESTROY()
END_MESSAGE_MAP()
 
 
 
// CMyPaneRules ÏûÏ¢´¦Àí³ÌÐò
 
 
 
 
int CMyPaneInputShow::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CDockablePane::OnCreate(lpCreateStruct) == -1)
        return -1;
 
    // TODO:  ÔÚ´ËÌí¼ÓÄúרÓõĴ´½¨´úÂë
    RECT rect;
 
    GetClientRect(&rect);
 
    //    m_pMyFormLog->CreateEx(NULL, _T("CMyPaneLog"),_T("ÈÕÖ¾´°¿Ú"), WS_CHILD | WS_VISIBLE, rect, this, IDD_FORM_LOG, NULL);
    m_pMyFormInputShow->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, rect, this, IDD_FORM_INPUTSHOW, NULL);
    //    m_MyDialogLog.Create(m_MyDialogLog.IDD,this);
    //    m_MyDialogLog.ShowWindow(SW_SHOW);
    //    m_MyDialogLog.OnInitDialog();
    //    MyLogEdit1.Create(ES_MULTILINE|ES_WANTRETURN|WS_VSCROLL|WS_VISIBLE,rect,this,5678);
    //    myLoger1.AttachWnd(MyLogEdit1.m_hWnd);
    //    myLoger1.ShowTime=0;
    //    myLoger1.showLineCount=0;
    return 0;
}
 
 
void CMyPaneInputShow::OnSize(UINT nType, int cx, int cy)
{
    CDockablePane::OnSize(nType, cx, cy);
 
    // TODO: ÔÚ´Ë´¦Ìí¼ÓÏûÏ¢´¦Àí³ÌÐò´úÂë
    if (GetSafeHwnd() == NULL)
    {
        return;
    }
    /*
        if (MyLogEdit1.GetSafeHwnd()!=NULL)
        {
            CRect rect;
            GetClientRect(rect);
            MyLogEdit1.SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
            MyLogEdit1.ReplaceSel(_T("On size \r\n"));
        }
        */
        ///*
    if (m_pMyFormInputShow->GetSafeHwnd() != NULL)
    {
        CRect rect;
        GetClientRect(rect);
        m_pMyFormInputShow->SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
    }
    //*/
    /*
        if(m_MyDialogLog.GetSafeHwnd()!=NULL)
        {
            CRect rect;
            GetClientRect(rect);
            m_MyDialogLog.SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER);
        }
    //*/
 
}
 
 
void CMyPaneInputShow::OnDestroy()
{
    CDockablePane::OnDestroy();
 
    // TODO: ÔÚ´Ë´¦Ìí¼ÓÏûÏ¢´¦Àí³ÌÐò´úÂë
}