atl: Reuse code of AtlModuleRegisterWndClassInfoW for AtlModuleRegisterWndClassInfoA.
This commit is contained in:
parent
03b335b926
commit
2d658e656f
|
@ -37,7 +37,7 @@
|
||||||
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
|
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
|
||||||
44 stdcall AtlModuleExtractCreateWndData(ptr)
|
44 stdcall AtlModuleExtractCreateWndData(ptr)
|
||||||
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
|
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
|
||||||
46 stub AtlModuleRegisterWndClassInfoA
|
46 stdcall AtlModuleRegisterWndClassInfoA(ptr ptr ptr)
|
||||||
47 stdcall AtlAxGetControl(long ptr)
|
47 stdcall AtlAxGetControl(long ptr)
|
||||||
48 stdcall AtlAxGetHost(long ptr)
|
48 stdcall AtlAxGetHost(long ptr)
|
||||||
49 stub AtlRegisterClassCategoriesHelper
|
49 stub AtlRegisterClassCategoriesHelper
|
||||||
|
|
|
@ -438,6 +438,45 @@ HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW *pm, const CLSID *clsid)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* AtlModuleRegisterWndClassInfoA [ATL.@]
|
||||||
|
*
|
||||||
|
* See AtlModuleRegisterWndClassInfoW.
|
||||||
|
*/
|
||||||
|
ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEA *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc)
|
||||||
|
{
|
||||||
|
ATOM atom;
|
||||||
|
|
||||||
|
FIXME("%p %p %p semi-stub\n", pm, wci, pProc);
|
||||||
|
|
||||||
|
atom = wci->m_atom;
|
||||||
|
if (!atom)
|
||||||
|
{
|
||||||
|
WNDCLASSEXA wc;
|
||||||
|
|
||||||
|
TRACE("wci->m_wc.lpszClassName = %s\n", wci->m_wc.lpszClassName);
|
||||||
|
|
||||||
|
if (!wci->m_wc.lpszClassName)
|
||||||
|
{
|
||||||
|
static const CHAR szFormat[] = "ATL%08x";
|
||||||
|
sprintf(wci->m_szAutoName, szFormat, (UINT)(UINT_PTR)wci);
|
||||||
|
TRACE("auto-generated class name %s\n", wci->m_szAutoName);
|
||||||
|
wci->m_wc.lpszClassName = wci->m_szAutoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
atom = GetClassInfoExA(pm->m_hInst, wci->m_wc.lpszClassName, &wc);
|
||||||
|
if (!atom)
|
||||||
|
atom = RegisterClassExA(&wci->m_wc);
|
||||||
|
|
||||||
|
wci->pWndProc = wci->m_wc.lpfnWndProc;
|
||||||
|
wci->m_atom = atom;
|
||||||
|
}
|
||||||
|
*pProc = wci->pWndProc;
|
||||||
|
|
||||||
|
TRACE("returning 0x%04x\n", atom);
|
||||||
|
return atom;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* AtlModuleRegisterWndClassInfoW [ATL.@]
|
* AtlModuleRegisterWndClassInfoW [ATL.@]
|
||||||
*
|
*
|
||||||
|
|
|
@ -43,7 +43,7 @@ typedef struct _ATL_WNDCLASSINFOW_TAG
|
||||||
WCHAR m_szAutoName[14];
|
WCHAR m_szAutoName[14];
|
||||||
} _ATL_WNDCLASSINFOW;
|
} _ATL_WNDCLASSINFOW;
|
||||||
|
|
||||||
ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc);
|
ATOM WINAPI AtlModuleRegisterWndClassInfoA(_ATL_MODULEA *pm, _ATL_WNDCLASSINFOA *wci, WNDPROC *pProc);
|
||||||
ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW *wci, WNDPROC *pProc);
|
ATOM WINAPI AtlModuleRegisterWndClassInfoW(_ATL_MODULEW *pm, _ATL_WNDCLASSINFOW *wci, WNDPROC *pProc);
|
||||||
|
|
||||||
HDC WINAPI AtlCreateTargetDC(HDC hdc, DVTARGETDEVICE *ptd);
|
HDC WINAPI AtlCreateTargetDC(HDC hdc, DVTARGETDEVICE *ptd);
|
||||||
|
|
Loading…
Reference in New Issue