void CUrlinfo::CreateIndirect()
{KISO;
ATLASSERT(m_hWnd == NULL);
_AtlWinModule.AddCreateWndData(&m_thunk.cd, (CDialogImplBaseT<CWindow>*)this);
WORD *p, *pdlgtemplate;
int nchar;
DWORD lStyle;
pdlgtemplate = p = (PWORD) LocalAlloc(LPTR, 100);
lStyle = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | DS_SETFONT;
*p++ = LOWORD (lStyle);
*p++ = HIWORD (lStyle);
*p++ = 0; *p++ = 0; *p++ = 0; *p++ = 0; *p++ = 0;
*p++ = 1; *p++ = 1; *p++ = 0; *p++ = 0;
nchar = MultiByteToWideChar(GetACP(), MB_PRECOMPOSED, "", 0, p, 0) + 1;
p += nchar; *p++ = 8;
nchar = MultiByteToWideChar(GetACP(), MB_PRECOMPOSED, "MS Sans Serif", 13, p, 13) + 1;
p += nchar;
*p = 0;
HWND hWnd = ::CreateDialogIndirectParam(_AtlBaseModule.GetResourceInstance(), (LPDLGTEMPLATE) pdlgtemplate,
m_wndParent, (DLGPROC) CUrlinfo::StartDialogProc, 0);
LocalFree(LocalHandle(pdlgtemplate));
ATLASSERT(m_hWnd == hWnd);
}
|