ntdll: Add an futimens syscall wrapper for Android.
[wine.git] / dlls / atl90 / atl90.c
blob06e8066c87bf9565183e487839f3194c7e701397
1 /*
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
19 #include <stdarg.h>
20 #include <stdio.h>
22 #define COBJMACROS
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winerror.h"
27 #include "winuser.h"
28 #include "atlbase.h"
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);
41 return _ATL_VER;
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) );
53 if (!ptr)
54 return 1;
55 GetWindowTextW( hwnd, ptr, len );
56 AtlAxCreateControlEx( ptr, hwnd, NULL, NULL, NULL, NULL, NULL );
57 HeapFree( GetProcessHeap(), 0, ptr );
58 return 0;
60 return DefWindowProcW( hwnd, msg, wparam, lparam );
63 BOOL WINAPI AtlAxWinInit(void)
65 WNDCLASSEXW wcex;
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) ) )
72 return FALSE;
74 wcex.cbSize = sizeof(wcex);
75 wcex.style = CS_GLOBALCLASS | CS_DBLCLKS;
76 wcex.cbClsExtra = 0;
77 wcex.cbWndExtra = 0;
78 wcex.hInstance = GetModuleHandleW( NULL );
79 wcex.hIcon = NULL;
80 wcex.hCursor = NULL;
81 wcex.hbrBackground = NULL;
82 wcex.lpszMenuName = NULL;
83 wcex.hIconSm = 0;
85 wcex.lpfnWndProc = AtlAxWin_wndproc;
86 wcex.lpszClassName = AtlAxWin90;
87 if ( !RegisterClassExW( &wcex ) )
88 return FALSE;
90 wcex.lpszClassName = AtlAxWinLic90;
91 if ( !RegisterClassExW( &wcex ) )
92 return FALSE;
94 return TRUE;