QuakeGod
2024-12-24 61deef5cdf96cbfdd6ad45be49e80d597c00ca65
MTerm1/MTerm1CtrlView.cpp
@@ -34,6 +34,7 @@
   ON_BN_CLICKED(IDC_BUTTON_TRNS_TOTXT, &CMTerm1CtrlView::OnBnClickedButtonTrnsTotxt)
   ON_BN_CLICKED(IDC_BUTTON_TRNS_PRG, &CMTerm1CtrlView::OnBnClickedButtonTrnsPrg)
   ON_BN_CLICKED(IDC_BUTTON4, &CMTerm1CtrlView::OnBnClickedButton4)
   ON_WM_SIZE()
END_MESSAGE_MAP()
@@ -161,10 +162,35 @@
{
   // TODO: 在此添加控件通知处理程序代码
   CMTerm1Doc * pDoc = (CMTerm1Doc *)GetDocument();
   pDoc->MyKLink1.fnTest1(2);
   theApp.MyKLink1.fnTest1(2);
   CRect rect1;
   this->GetClientRect(&rect1);
//   this->GetParentFrame()->SetWindowPos(NULL, rect1.left, rect1.top, 100, 200, SWP_NOZORDER);
}
void CMTerm1CtrlView::OnSize(UINT nType, int cx, int cy)
{
   CFormView::OnSize(nType, cx, cy);
   CString s1;
   CWnd* pwnd;
   ///*
   pwnd = GetDlgItem(IDC_EDIT1);
   if (pwnd != NULL)
   {
      CRect   rect1;
      pwnd->GetWindowRect(rect1);
      ScreenToClient(rect1);
      pwnd->SetWindowPos(NULL, 0, 0, rect1.Width(), cy - 20, NULL);
      //      s1.Format(_T("OnSize %d  %d %d \r\n"), nType, cx, cy);
      //((CEdit*)GetDlgItem(IDC_EDIT1))->ReplaceSel(s1);
   }
   // */
   //
   // TODO: 在此处添加消息处理程序代码
}