DragonNest/Server/ServiceMonitorEx/Source/SubControlBaseView.cpp
2024-12-20 16:56:44 +08:00

33 lines
1.3 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "StdAfx.h"
#include "SubControlBaseView.h"
IMPLEMENT_DYNAMIC(CSubControlBaseView, CDialog)
CSubControlBaseView::CSubControlBaseView(EF_CONTROLTYPE pControlType, UINT nIDTemplate, CWnd* pParentWnd)
: CDialog(nIDTemplate, pParentWnd), m_ControlType(pControlType), m_nIDTemplate(nIDTemplate)
{
ASSERT(0 <= m_ControlType && EV_CTT_CNT > m_ControlType);
}
CSubControlBaseView::~CSubControlBaseView()
{
}
CWndDetachSafe::CWndDetachSafe(CWnd *pWnd, HWND hWnd) : m_Wnd(pWnd)
{
ASSERT(NULL != pWnd);
ASSERT(NULL != hWnd);
pWnd->Attach(hWnd);
}
CWndDetachSafe::~CWndDetachSafe()
{
if (m_Wnd) {
m_Wnd->Detach();
}
}