一。控件

CRect rect;//矩形
m_pic.GetWindowRect(rect); //得到控件矩形信息
m_pic.MoveWindow(0, 0, SavedImage.cols, SavedImage.rows); //设置控件位置(相对于客户区), 大小

 

二。窗口

1 CWnd* pWnd1 = GetDlgItem(IDD_MFC_OPENCV_DIALOG);//获得句柄

2 SetWindowPos(pWnd1, x, y, SavedImage.cols+15, SavedImage.rows+58, SWP_SHOWWINDOW);//设置窗口位置,大小
  GetWindowRect(rect); //得到窗口位置,大小

 

相关文章:

  • 2021-07-25
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-23
猜你喜欢
  • 2021-09-09
  • 2022-12-23
  • 2021-07-03
  • 2022-12-23
  • 2021-06-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案