// MyPaneRules.cpp : ʵÏÖÎļþ // #include "pch.h" #include "MTerm1.h" #include "MyPaneLog.h" // CMyPaneRules IMPLEMENT_DYNAMIC(CMyPaneLog, CDockablePane) CMyPaneLog::CMyPaneLog() { m_pMyFormLog=(CMyFormLog*) (RUNTIME_CLASS(CMyFormLog)->CreateObject()); // m_pMyDialogLog=(CMyDialogLog*) (RUNTIME_CLASS(CMyDialogLog)->CreateObject()); } CMyPaneLog::~CMyPaneLog() { } BEGIN_MESSAGE_MAP(CMyPaneLog, CDockablePane) ON_WM_CREATE() ON_WM_SIZE() ON_WM_DESTROY() END_MESSAGE_MAP() // CMyPaneRules ÏûÏ¢´¦Àí³ÌÐò int CMyPaneLog::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_pMyFormLog->Create(NULL, NULL, WS_CHILD|WS_VISIBLE, rect, this, IDD_FORM_LOG, 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 CMyPaneLog::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_pMyFormLog->GetSafeHwnd()!=NULL) { CRect rect; GetClientRect(rect); // m_pMyFormLog->SetWindowPos(NULL, rect.left, rect.top, rect.Width(), rect.Height(), SWP_NOACTIVATE | SWP_NOZORDER); m_pMyFormLog->SetWindowPos(NULL, rect.left, rect.top, cx, cy, 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 CMyPaneLog::OnDestroy() { CDockablePane::OnDestroy(); // TODO: ÔÚ´Ë´¦Ìí¼ÓÏûÏ¢´¦Àí³ÌÐò´úÂë }