atl: Don't forward AtlAxWinInit to atl100.
This commit is contained in:
parent
cd321cbea8
commit
6b616f3ea8
|
@ -33,7 +33,7 @@
|
|||
39 stdcall AtlAxCreateControl(ptr ptr ptr ptr) atl100.AtlAxCreateControl
|
||||
40 stdcall AtlAxCreateControlEx(ptr ptr ptr ptr ptr ptr ptr) atl100.AtlAxCreateControlEx
|
||||
41 stdcall AtlAxAttachControl(ptr ptr ptr) atl100.AtlAxAttachControl
|
||||
42 stdcall AtlAxWinInit() atl100.AtlAxWinInit
|
||||
42 stdcall AtlAxWinInit()
|
||||
43 stdcall AtlModuleAddCreateWndData(ptr ptr ptr)
|
||||
44 stdcall AtlModuleExtractCreateWndData(ptr)
|
||||
45 stdcall AtlModuleRegisterWndClassInfoW(ptr ptr ptr)
|
||||
|
|
|
@ -584,3 +584,51 @@ DWORD WINAPI AtlGetVersion(void *pReserved)
|
|||
{
|
||||
return _ATL_VER;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* AtlAxWin class window procedure
|
||||
*/
|
||||
static LRESULT CALLBACK AtlAxWin_wndproc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
if ( wMsg == WM_CREATE )
|
||||
{
|
||||
DWORD len = GetWindowTextLengthW( hWnd ) + 1;
|
||||
WCHAR *ptr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) );
|
||||
if (!ptr)
|
||||
return 1;
|
||||
GetWindowTextW( hWnd, ptr, len );
|
||||
AtlAxCreateControlEx( ptr, hWnd, NULL, NULL, NULL, NULL, NULL );
|
||||
HeapFree( GetProcessHeap(), 0, ptr );
|
||||
return 0;
|
||||
}
|
||||
return DefWindowProcW( hWnd, wMsg, wParam, lParam );
|
||||
}
|
||||
|
||||
BOOL WINAPI AtlAxWinInit(void)
|
||||
{
|
||||
WNDCLASSEXW wcex;
|
||||
const WCHAR AtlAxWin[] = {'A','t','l','A','x','W','i','n',0};
|
||||
|
||||
FIXME("semi-stub\n");
|
||||
|
||||
if ( FAILED( OleInitialize(NULL) ) )
|
||||
return FALSE;
|
||||
|
||||
wcex.cbSize = sizeof(wcex);
|
||||
wcex.style = CS_GLOBALCLASS;
|
||||
wcex.cbClsExtra = 0;
|
||||
wcex.cbWndExtra = 0;
|
||||
wcex.hInstance = GetModuleHandleW( NULL );
|
||||
wcex.hIcon = NULL;
|
||||
wcex.hCursor = NULL;
|
||||
wcex.hbrBackground = NULL;
|
||||
wcex.lpszMenuName = NULL;
|
||||
wcex.hIconSm = 0;
|
||||
|
||||
wcex.lpfnWndProc = AtlAxWin_wndproc;
|
||||
wcex.lpszClassName = AtlAxWin;
|
||||
if ( !RegisterClassExW( &wcex ) )
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <olectl.h>
|
||||
#include <ocidl.h>
|
||||
#include <exdisp.h>
|
||||
#include <atlbase.h>
|
||||
|
||||
static HRESULT (WINAPI *pAtlAxAttachControl)(IUnknown *, HWND, IUnknown **);
|
||||
|
||||
|
@ -114,6 +115,24 @@ static void test_AtlAxAttachControl(void)
|
|||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
static void test_ax_win(void)
|
||||
{
|
||||
BOOL ret;
|
||||
WNDCLASSEXW wcex;
|
||||
static const WCHAR AtlAxWin[] = {'A','t','l','A','x','W','i','n',0};
|
||||
static HMODULE hinstance = 0;
|
||||
|
||||
ret = AtlAxWinInit();
|
||||
ok(ret, "AtlAxWinInit failed\n");
|
||||
|
||||
hinstance = GetModuleHandleA(NULL);
|
||||
memset(&wcex, 0, sizeof(wcex));
|
||||
wcex.cbSize = sizeof(wcex);
|
||||
ret = GetClassInfoExW(hinstance, AtlAxWin, &wcex);
|
||||
ok(ret, "AtlAxWin has not registered\n");
|
||||
ok(wcex.style == CS_GLOBALCLASS, "wcex.style %08x\n", wcex.style);
|
||||
}
|
||||
|
||||
START_TEST(atl_ax)
|
||||
{
|
||||
init_function_pointers();
|
||||
|
@ -128,5 +147,7 @@ START_TEST(atl_ax)
|
|||
else
|
||||
win_skip("AtlAxAttachControl is not available\n");
|
||||
|
||||
test_ax_win();
|
||||
|
||||
CoUninitialize();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue