2 * Copyright 2013 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
30 #include "wine/debug.h"
31 #include "wine/unicode.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(atl
);
35 /***********************************************************************
36 * AtlGetVersion [atl110.@]
38 DWORD WINAPI
AtlGetVersion(void *pReserved
)
40 TRACE("version %04x (%p)\n", _ATL_VER
, pReserved
);
44 /**********************************************************************
45 * AtlAxWin class window procedure
47 static LRESULT CALLBACK
AtlAxWin_wndproc( HWND hWnd
, UINT wMsg
, WPARAM wParam
, LPARAM lParam
)
49 if ( wMsg
== WM_CREATE
)
51 DWORD len
= GetWindowTextLengthW( hWnd
) + 1;
52 WCHAR
*ptr
= HeapAlloc( GetProcessHeap(), 0, len
*sizeof(WCHAR
) );
55 GetWindowTextW( hWnd
, ptr
, len
);
56 AtlAxCreateControlEx( ptr
, hWnd
, NULL
, NULL
, NULL
, NULL
, NULL
);
57 HeapFree( GetProcessHeap(), 0, ptr
);
60 return DefWindowProcW( hWnd
, wMsg
, wParam
, lParam
);
63 BOOL WINAPI
AtlAxWinInit(void)
66 const WCHAR AtlAxWin110
[] = {'A','t','l','A','x','W','i','n','1','1','0',0};
67 const WCHAR AtlAxWinLic110
[] = {'A','t','l','A','x','W','i','n','L','i','c','1','1','0',0};
69 FIXME("version %04x semi-stub\n", _ATL_VER
);
71 if ( FAILED( OleInitialize(NULL
) ) )
74 wcex
.cbSize
= sizeof(wcex
);
75 wcex
.style
= CS_GLOBALCLASS
| CS_DBLCLKS
;
78 wcex
.hInstance
= GetModuleHandleW( NULL
);
81 wcex
.hbrBackground
= NULL
;
82 wcex
.lpszMenuName
= NULL
;
85 wcex
.lpfnWndProc
= AtlAxWin_wndproc
;
86 wcex
.lpszClassName
= AtlAxWin110
;
87 if ( !RegisterClassExW( &wcex
) )
90 wcex
.lpszClassName
= AtlAxWinLic110
;
91 if ( !RegisterClassExW( &wcex
) )