2 * Copyright 2013 Zhenbo Li
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 [atl90.@]
38 DWORD WINAPI
AtlGetVersion(void *reserved
)
40 TRACE("version %04x (%p)\n", _ATL_VER
, reserved
);
44 /**********************************************************************
45 * AtlAxWin class window procedure
47 static LRESULT CALLBACK
AtlAxWin_wndproc( HWND hwnd
, UINT msg
, WPARAM wparam
, LPARAM lparam
)
49 if ( msg
== 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
, msg
, wparam
, lparam
);
63 BOOL WINAPI
AtlAxWinInit(void)
66 const WCHAR AtlAxWin90
[] = {'A','t','l','A','x','W','i','n','9','0',0};
67 const WCHAR AtlAxWinLic90
[] = {'A','t','l','A','x','W','i','n','L','i','c','9','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
= AtlAxWin90
;
87 if ( !RegisterClassExW( &wcex
) )
90 wcex
.lpszClassName
= AtlAxWinLic90
;
91 if ( !RegisterClassExW( &wcex
) )