Commit 2d658e65 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

atl: Reuse code of AtlModuleRegisterWndClassInfoW for AtlModuleRegisterWndClassInfoA.

parent 03b335b9
......@@ -37,7 +37,7 @@
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
44 stdcall AtlModuleExtractCreateWndData(ptr)
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
46 stub AtlModuleRegisterWndClassInfoA
46 stdcall AtlModuleRegisterWndClassInfoA(ptr ptr ptr)
47 stdcall AtlAxGetControl(long ptr)
48 stdcall AtlAxGetHost(long ptr)
49 stub AtlRegisterClassCategoriesHelper
......
......@@ -439,6 +439,45 @@ HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW *pm, const CLSID *clsid)
}
/***********************************************************************
* 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.@]
*
* PARAMS
......
......@@ -43,7 +43,7 @@ typedef struct _ATL_WNDCLASSINFOW_TAG
WCHAR m_szAutoName[14];
} _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);
HDC WINAPI AtlCreateTargetDC(HDC hdc, DVTARGETDEVICE *ptd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment