| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- // ContainerDlg.cpp: 实现文件
- //
- #include "pch.h"
- #include "DMS.h"
- #include "ContainerDlg.h"
- #include "afxdialogex.h"
- // ContainerDlg 对话框
- IMPLEMENT_DYNAMIC(ContainerDlg, CDialogEx)
- ContainerDlg::ContainerDlg(CWnd* pParent /*=nullptr*/)
- : CDialogEx(IDD_VIEW_CONTAINER, pParent)
- {
- }
- ContainerDlg::~ContainerDlg()
- {
- }
- void ContainerDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialogEx::DoDataExchange(pDX);
- }
- BEGIN_MESSAGE_MAP(ContainerDlg, CDialogEx)
- ON_BN_CLICKED(IDOK, &ContainerDlg::OnBnClickedOk)
- END_MESSAGE_MAP()
- // ContainerDlg 消息处理程序
- // CMyDlg message handlers
- void ContainerDlg::SetWindowName(LPCTSTR _lpcName)
- {
- SetDlgItemText(IDC_STATIC_NAME, _lpcName);
- }
- void ContainerDlg::SetChildHWnd(HWND _hWnd)
- {
- m_hChildWnd = _hWnd;
- CRect rect;
- GetWindowRect(rect);
- ::SetParent(_hWnd, GetSafeHwnd());
- ScreenToClient(rect);
- ::MoveWindow(m_hChildWnd, rect.left, rect.top, rect.Width(), rect.Height(), 1);
- SetWindowLong(m_hChildWnd, GWL_STYLE, GetWindowLong(m_hChildWnd, GWL_STYLE) & ~WS_CAPTION);
- ::ShowWindow(_hWnd, SW_SHOW);
- ::SetActiveWindow(_hWnd);
- ::InvalidateRect(_hWnd, NULL, 1);
- ::UpdateWindow(_hWnd);
- //::SetWindowLong(_hWnd, GWL_STYLE, GetWindowLong(_hWnd, GWL_STYLE) &~WS_POPUP | WS_CHILD);
- }
- void ContainerDlg::OnBnClickedOk()
- {
- // TODO: Add your control notification handler code here
- CDialogEx::OnOK();
- }
|