|
|
template<class TBase = CWindow, class TWinTraits = CControlWinTraits>
Definition at line 495 of file atlwin.h.
{
HWND hWnd;
ATLASSERT(m_hWnd == NULL);
ATLASSERT(atom != 0);
if (atom == 0)
return NULL;
if (m_thunk.Init(NULL, NULL) == FALSE)
{
SetLastError(ERROR_OUTOFMEMORY);
return NULL;
}
_AtlWinModule.AddCreateWndData(&m_thunk.cd, this);
if (MenuOrID.m_hMenu == NULL && (dwStyle & WS_CHILD) != 0)
MenuOrID.m_hMenu = (HMENU)(UINT_PTR)this;
if (rect.m_lpRect == NULL)
rect.m_lpRect = &TBase::rcDefault;
hWnd = ::CreateWindowEx(dwExStyle, reinterpret_cast<LPCWSTR>(MAKEINTATOM(atom)), szWindowName, dwStyle, rect.m_lpRect->left,
rect.m_lpRect->top, rect.m_lpRect->right - rect.m_lpRect->left, rect.m_lpRect->bottom - rect.m_lpRect->top,
hWndParent, MenuOrID.m_hMenu, _AtlBaseModule.GetModuleInstance(), lpCreateParam);
ATLASSERT(m_hWnd == hWnd);
return hWnd;
}
|