2 * Active Template Library ActiveX functions (atl.dll)
4 * Copyright 2006 Andrey Turkin
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #include <wine/atlwin.h>
29 IOleClientSite IOleClientSite_iface
;
30 IOleContainer IOleContainer_iface
;
31 IOleInPlaceSiteWindowless IOleInPlaceSiteWindowless_iface
;
32 IOleInPlaceFrame IOleInPlaceFrame_iface
;
33 IOleControlSite IOleControlSite_iface
;
40 BOOL fActive
, fInPlace
, fWindowless
;
43 static const WCHAR wine_atl_iocsW
[] = {'_','_','W','I','N','E','_','A','T','L','_','I','O','C','S','\0'};
45 /**********************************************************************
46 * AtlAxWin class window procedure
48 static LRESULT CALLBACK
AtlAxWin_wndproc( HWND hWnd
, UINT wMsg
, WPARAM wParam
, LPARAM lParam
)
50 if ( wMsg
== WM_CREATE
)
52 DWORD len
= GetWindowTextLengthW( hWnd
) + 1;
53 WCHAR
*ptr
= HeapAlloc( GetProcessHeap(), 0, len
*sizeof(WCHAR
) );
56 GetWindowTextW( hWnd
, ptr
, len
);
57 AtlAxCreateControlEx( ptr
, hWnd
, NULL
, NULL
, NULL
, NULL
, NULL
);
58 HeapFree( GetProcessHeap(), 0, ptr
);
61 return DefWindowProcW( hWnd
, wMsg
, wParam
, lParam
);
64 /***********************************************************************
65 * AtlAxWinInit [atl100.@]
66 * Initializes the control-hosting code: registering the AtlAxWin,
67 * AtlAxWin7 and AtlAxWinLic7 window classes and some messages.
73 BOOL WINAPI
AtlAxWinInit(void)
77 #if _ATL_VER <= _ATL_VER_30
78 #define ATL_NAME_SUFFIX 0
79 #elif _ATL_VER == _ATL_VER_80
80 #define ATL_NAME_SUFFIX '8','0',0
81 #elif _ATL_VER == _ATL_VER_90
82 #define ATL_NAME_SUFFIX '9','0',0
83 #elif _ATL_VER == _ATL_VER_100
84 #define ATL_NAME_SUFFIX '1','0','0',0
85 #elif _ATL_VER == _ATL_VER_110
86 #define ATL_NAME_SUFFIX '1','1','0',0
88 #error Unsupported version
91 const WCHAR AtlAxWinW
[] = {'A','t','l','A','x','W','i','n',ATL_NAME_SUFFIX
};
93 FIXME("version %04x semi-stub\n", _ATL_VER
);
95 if ( FAILED( OleInitialize(NULL
) ) )
98 wcex
.cbSize
= sizeof(wcex
);
99 wcex
.style
= CS_GLOBALCLASS
| (_ATL_VER
> _ATL_VER_30
? CS_DBLCLKS
: 0);
102 wcex
.hInstance
= GetModuleHandleW( NULL
);
105 wcex
.hbrBackground
= NULL
;
106 wcex
.lpszMenuName
= NULL
;
109 wcex
.lpfnWndProc
= AtlAxWin_wndproc
;
110 wcex
.lpszClassName
= AtlAxWinW
;
111 if ( !RegisterClassExW( &wcex
) )
114 if(_ATL_VER
> _ATL_VER_30
) {
115 const WCHAR AtlAxWinLicW
[] = {'A','t','l','A','x','W','i','n','L','i','c',ATL_NAME_SUFFIX
};
117 wcex
.lpszClassName
= AtlAxWinLicW
;
118 if ( !RegisterClassExW( &wcex
) )
125 /***********************************************************************
126 * Atl container component implementation
129 /****** IOleClientSite *****/
130 static inline IOCS
*impl_from_IOleClientSite(IOleClientSite
*iface
)
132 return CONTAINING_RECORD(iface
, IOCS
, IOleClientSite_iface
);
135 static HRESULT
IOCS_Detach( IOCS
*This
) /* remove subclassing */
139 SetWindowLongPtrW( This
->hWnd
, GWLP_WNDPROC
, (ULONG_PTR
) This
->OrigWndProc
);
140 RemovePropW( This
->hWnd
, wine_atl_iocsW
);
145 IOleObject
*control
= This
->control
;
147 This
->control
= NULL
;
148 IOleObject_Close( control
, OLECLOSE_NOSAVE
);
149 IOleObject_SetClientSite( control
, NULL
);
150 IOleObject_Release( control
);
155 static HRESULT WINAPI
OleClientSite_QueryInterface(IOleClientSite
*iface
, REFIID riid
, void **ppv
)
157 IOCS
*This
= impl_from_IOleClientSite(iface
);
159 TRACE("(%p)->(%s %p)\n", This
, debugstr_guid(riid
), ppv
);
163 if (IsEqualIID(&IID_IUnknown
, riid
) ||
164 IsEqualIID(&IID_IOleClientSite
, riid
))
168 else if (IsEqualIID(&IID_IOleContainer
, riid
))
170 *ppv
= &This
->IOleContainer_iface
;
172 else if (IsEqualIID(&IID_IOleInPlaceSite
, riid
) ||
173 IsEqualIID(&IID_IOleInPlaceSiteEx
, riid
) ||
174 IsEqualIID(&IID_IOleInPlaceSiteWindowless
, riid
))
176 *ppv
= &This
->IOleInPlaceSiteWindowless_iface
;
178 else if (IsEqualIID(&IID_IOleInPlaceFrame
, riid
))
180 *ppv
= &This
->IOleInPlaceFrame_iface
;
182 else if (IsEqualIID(&IID_IOleControlSite
, riid
))
184 *ppv
= &This
->IOleControlSite_iface
;
189 IOleClientSite_AddRef(iface
);
193 WARN("unsupported interface %s\n", debugstr_guid(riid
));
194 return E_NOINTERFACE
;
197 static ULONG WINAPI
OleClientSite_AddRef(IOleClientSite
*iface
)
199 IOCS
*This
= impl_from_IOleClientSite(iface
);
200 ULONG ref
= InterlockedIncrement(&This
->ref
);
201 TRACE("(%p)->(%d)\n", This
, ref
);
205 static ULONG WINAPI
OleClientSite_Release(IOleClientSite
*iface
)
207 IOCS
*This
= impl_from_IOleClientSite(iface
);
208 ULONG ref
= InterlockedDecrement(&This
->ref
);
210 TRACE("(%p)->(%d)\n", This
, ref
);
215 HeapFree( GetProcessHeap(), 0, This
);
221 static HRESULT WINAPI
OleClientSite_SaveObject(IOleClientSite
*iface
)
223 IOCS
*This
= impl_from_IOleClientSite(iface
);
224 FIXME( "(%p) - stub\n", This
);
228 static HRESULT WINAPI
OleClientSite_GetMoniker(IOleClientSite
*iface
, DWORD dwAssign
, DWORD dwWhichMoniker
, IMoniker
**ppmk
)
230 IOCS
*This
= impl_from_IOleClientSite(iface
);
232 FIXME( "(%p, 0x%x, 0x%x, %p)\n", This
, dwAssign
, dwWhichMoniker
, ppmk
);
236 static HRESULT WINAPI
OleClientSite_GetContainer(IOleClientSite
*iface
, IOleContainer
**container
)
238 IOCS
*This
= impl_from_IOleClientSite(iface
);
239 TRACE("(%p, %p)\n", This
, container
);
240 return IOleClientSite_QueryInterface(iface
, &IID_IOleContainer
, (void**)container
);
243 static HRESULT WINAPI
OleClientSite_ShowObject(IOleClientSite
*iface
)
245 IOCS
*This
= impl_from_IOleClientSite(iface
);
246 FIXME( "(%p) - stub\n", This
);
250 static HRESULT WINAPI
OleClientSite_OnShowWindow(IOleClientSite
*iface
, BOOL fShow
)
252 IOCS
*This
= impl_from_IOleClientSite(iface
);
253 FIXME( "(%p, %s) - stub\n", This
, fShow
? "TRUE" : "FALSE" );
257 static HRESULT WINAPI
OleClientSite_RequestNewObjectLayout(IOleClientSite
*iface
)
259 IOCS
*This
= impl_from_IOleClientSite(iface
);
260 FIXME( "(%p) - stub\n", This
);
265 /****** IOleContainer *****/
266 static inline IOCS
*impl_from_IOleContainer(IOleContainer
*iface
)
268 return CONTAINING_RECORD(iface
, IOCS
, IOleContainer_iface
);
271 static HRESULT WINAPI
OleContainer_QueryInterface( IOleContainer
* iface
, REFIID riid
, void** ppv
)
273 IOCS
*This
= impl_from_IOleContainer(iface
);
274 return IOleClientSite_QueryInterface(&This
->IOleClientSite_iface
, riid
, ppv
);
277 static ULONG WINAPI
OleContainer_AddRef(IOleContainer
* iface
)
279 IOCS
*This
= impl_from_IOleContainer(iface
);
280 return IOleClientSite_AddRef(&This
->IOleClientSite_iface
);
283 static ULONG WINAPI
OleContainer_Release(IOleContainer
* iface
)
285 IOCS
*This
= impl_from_IOleContainer(iface
);
286 return IOleClientSite_Release(&This
->IOleClientSite_iface
);
289 static HRESULT WINAPI
OleContainer_ParseDisplayName(IOleContainer
* iface
, IBindCtx
* pbc
,
290 LPOLESTR pszDisplayName
, ULONG
* pchEaten
, IMoniker
** ppmkOut
)
292 IOCS
*This
= impl_from_IOleContainer(iface
);
293 FIXME( "(%p,%p,%s,%p,%p) - stub\n", This
, pbc
, debugstr_w(pszDisplayName
), pchEaten
, ppmkOut
);
297 static HRESULT WINAPI
OleContainer_EnumObjects(IOleContainer
* iface
, DWORD grfFlags
, IEnumUnknown
** ppenum
)
299 IOCS
*This
= impl_from_IOleContainer(iface
);
300 FIXME( "(%p, %u, %p) - stub\n", This
, grfFlags
, ppenum
);
304 static HRESULT WINAPI
OleContainer_LockContainer(IOleContainer
* iface
, BOOL fLock
)
306 IOCS
*This
= impl_from_IOleContainer(iface
);
307 FIXME( "(%p, %s) - stub\n", This
, fLock
?"TRUE":"FALSE" );
312 /****** IOleInPlaceSiteWindowless *******/
313 static inline IOCS
*impl_from_IOleInPlaceSiteWindowless(IOleInPlaceSiteWindowless
*iface
)
315 return CONTAINING_RECORD(iface
, IOCS
, IOleInPlaceSiteWindowless_iface
);
318 static HRESULT WINAPI
OleInPlaceSiteWindowless_QueryInterface(IOleInPlaceSiteWindowless
*iface
, REFIID riid
, void **ppv
)
320 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
321 return IOleClientSite_QueryInterface(&This
->IOleClientSite_iface
, riid
, ppv
);
324 static ULONG WINAPI
OleInPlaceSiteWindowless_AddRef(IOleInPlaceSiteWindowless
*iface
)
326 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
327 return IOleClientSite_AddRef(&This
->IOleClientSite_iface
);
330 static ULONG WINAPI
OleInPlaceSiteWindowless_Release(IOleInPlaceSiteWindowless
*iface
)
332 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
333 return IOleClientSite_Release(&This
->IOleClientSite_iface
);
336 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetWindow(IOleInPlaceSiteWindowless
* iface
, HWND
* phwnd
)
338 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
340 TRACE("(%p,%p)\n", This
, phwnd
);
345 static HRESULT WINAPI
OleInPlaceSiteWindowless_ContextSensitiveHelp(IOleInPlaceSiteWindowless
* iface
, BOOL fEnterMode
)
347 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
348 FIXME("(%p,%d) - stub\n", This
, fEnterMode
);
352 static HRESULT WINAPI
OleInPlaceSiteWindowless_CanInPlaceActivate(IOleInPlaceSiteWindowless
*iface
)
354 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
355 TRACE("(%p)\n", This
);
359 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceActivate(IOleInPlaceSiteWindowless
*iface
)
361 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
363 TRACE("(%p)\n", This
);
365 This
->fInPlace
= TRUE
;
369 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnUIActivate(IOleInPlaceSiteWindowless
*iface
)
371 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
373 TRACE("(%p)\n", This
);
377 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetWindowContext(IOleInPlaceSiteWindowless
*iface
,
378 IOleInPlaceFrame
**frame
, IOleInPlaceUIWindow
**ppDoc
, LPRECT lprcPosRect
,
379 LPRECT lprcClipRect
, LPOLEINPLACEFRAMEINFO lpFrameInfo
)
381 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
383 TRACE("(%p,%p,%p,%p,%p,%p)\n", This
, frame
, ppDoc
, lprcPosRect
, lprcClipRect
, lpFrameInfo
);
386 *lprcClipRect
= This
->size
;
388 *lprcPosRect
= This
->size
;
392 *frame
= &This
->IOleInPlaceFrame_iface
;
393 IOleInPlaceFrame_AddRef(*frame
);
401 lpFrameInfo
->fMDIApp
= FALSE
;
402 lpFrameInfo
->hwndFrame
= This
->hWnd
;
403 lpFrameInfo
->haccel
= NULL
;
404 lpFrameInfo
->cAccelEntries
= 0;
410 static HRESULT WINAPI
OleInPlaceSiteWindowless_Scroll(IOleInPlaceSiteWindowless
*iface
, SIZE scrollExtent
)
412 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
413 FIXME("(%p) - stub\n", This
);
417 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnUIDeactivate(IOleInPlaceSiteWindowless
*iface
, BOOL fUndoable
)
419 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
420 FIXME("(%p,%d) - stub\n", This
, fUndoable
);
424 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceDeactivate(IOleInPlaceSiteWindowless
*iface
)
426 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
428 TRACE("(%p)\n", This
);
430 This
->fInPlace
= This
->fWindowless
= FALSE
;
434 static HRESULT WINAPI
OleInPlaceSiteWindowless_DiscardUndoState(IOleInPlaceSiteWindowless
*iface
)
436 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
437 FIXME("(%p) - stub\n", This
);
441 static HRESULT WINAPI
OleInPlaceSiteWindowless_DeactivateAndUndo(IOleInPlaceSiteWindowless
*iface
)
443 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
444 FIXME("(%p) - stub\n", This
);
448 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnPosRectChange(IOleInPlaceSiteWindowless
*iface
, LPCRECT lprcPosRect
)
450 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
451 FIXME("(%p,%p) - stub\n", This
, lprcPosRect
);
455 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceActivateEx( IOleInPlaceSiteWindowless
*iface
, BOOL
* pfNoRedraw
, DWORD dwFlags
)
457 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
461 This
->fActive
= This
->fInPlace
= TRUE
;
462 if ( dwFlags
& ACTIVATE_WINDOWLESS
)
463 This
->fWindowless
= TRUE
;
467 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceDeactivateEx( IOleInPlaceSiteWindowless
*iface
, BOOL fNoRedraw
)
469 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
473 This
->fActive
= This
->fInPlace
= This
->fWindowless
= FALSE
;
476 static HRESULT WINAPI
OleInPlaceSiteWindowless_RequestUIActivate( IOleInPlaceSiteWindowless
*iface
)
481 static HRESULT WINAPI
OleInPlaceSiteWindowless_CanWindowlessActivate( IOleInPlaceSiteWindowless
*iface
)
486 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetCapture( IOleInPlaceSiteWindowless
*iface
)
491 static HRESULT WINAPI
OleInPlaceSiteWindowless_SetCapture( IOleInPlaceSiteWindowless
*iface
, BOOL fCapture
)
496 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetFocus( IOleInPlaceSiteWindowless
*iface
)
501 static HRESULT WINAPI
OleInPlaceSiteWindowless_SetFocus( IOleInPlaceSiteWindowless
*iface
, BOOL fFocus
)
506 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetDC( IOleInPlaceSiteWindowless
*iface
, LPCRECT pRect
, DWORD grfFlags
, HDC
* phDC
)
511 static HRESULT WINAPI
OleInPlaceSiteWindowless_ReleaseDC( IOleInPlaceSiteWindowless
*iface
, HDC hDC
)
516 static HRESULT WINAPI
OleInPlaceSiteWindowless_InvalidateRect( IOleInPlaceSiteWindowless
*iface
, LPCRECT pRect
, BOOL fErase
)
521 static HRESULT WINAPI
OleInPlaceSiteWindowless_InvalidateRgn( IOleInPlaceSiteWindowless
*iface
, HRGN hRGN
, BOOL fErase
)
526 static HRESULT WINAPI
OleInPlaceSiteWindowless_ScrollRect( IOleInPlaceSiteWindowless
*iface
, INT dx
, INT dy
, LPCRECT pRectScroll
, LPCRECT pRectClip
)
531 static HRESULT WINAPI
OleInPlaceSiteWindowless_AdjustRect( IOleInPlaceSiteWindowless
*iface
, LPRECT prc
)
536 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnDefWindowMessage( IOleInPlaceSiteWindowless
*iface
, UINT msg
, WPARAM wParam
, LPARAM lParam
, LRESULT
* plResult
)
543 /****** IOleInPlaceFrame *******/
544 static inline IOCS
*impl_from_IOleInPlaceFrame(IOleInPlaceFrame
*iface
)
546 return CONTAINING_RECORD(iface
, IOCS
, IOleInPlaceFrame_iface
);
549 static HRESULT WINAPI
OleInPlaceFrame_QueryInterface(IOleInPlaceFrame
*iface
, REFIID riid
, void **ppv
)
551 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
552 return IOleClientSite_QueryInterface(&This
->IOleClientSite_iface
, riid
, ppv
);
555 static ULONG WINAPI
OleInPlaceFrame_AddRef(IOleInPlaceFrame
*iface
)
557 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
558 return IOleClientSite_AddRef(&This
->IOleClientSite_iface
);
561 static ULONG WINAPI
OleInPlaceFrame_Release(IOleInPlaceFrame
*iface
)
563 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
564 return IOleClientSite_Release(&This
->IOleClientSite_iface
);
567 static HRESULT WINAPI
OleInPlaceFrame_GetWindow(IOleInPlaceFrame
*iface
, HWND
*phWnd
)
569 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
571 TRACE( "(%p,%p)\n", This
, phWnd
);
577 static HRESULT WINAPI
OleInPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame
*iface
, BOOL fEnterMode
)
579 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
581 FIXME( "(%p,%d) - stub\n", This
, fEnterMode
);
585 static HRESULT WINAPI
OleInPlaceFrame_GetBorder(IOleInPlaceFrame
*iface
, LPRECT lprectBorder
)
587 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
589 FIXME( "(%p,%p) - stub\n", This
, lprectBorder
);
593 static HRESULT WINAPI
OleInPlaceFrame_RequestBorderSpace(IOleInPlaceFrame
*iface
, LPCBORDERWIDTHS pborderwidths
)
595 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
597 FIXME( "(%p,%p) - stub\n", This
, pborderwidths
);
601 static HRESULT WINAPI
OleInPlaceFrame_SetBorderSpace(IOleInPlaceFrame
*iface
, LPCBORDERWIDTHS pborderwidths
)
603 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
605 FIXME( "(%p,%p) - stub\n", This
, pborderwidths
);
609 static HRESULT WINAPI
OleInPlaceFrame_SetActiveObject(IOleInPlaceFrame
*iface
, IOleInPlaceActiveObject
*pActiveObject
, LPCOLESTR pszObjName
)
611 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
613 FIXME( "(%p,%p,%s) - stub\n", This
, pActiveObject
, debugstr_w(pszObjName
) );
617 static HRESULT WINAPI
OleInPlaceFrame_InsertMenus(IOleInPlaceFrame
*iface
, HMENU hmenuShared
, LPOLEMENUGROUPWIDTHS lpMenuWidths
)
619 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
621 FIXME( "(%p,%p,%p) - stub\n", This
, hmenuShared
, lpMenuWidths
);
625 static HRESULT WINAPI
OleInPlaceFrame_SetMenu(IOleInPlaceFrame
*iface
, HMENU hmenuShared
, HOLEMENU holemenu
, HWND hwndActiveObject
)
627 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
629 FIXME( "(%p,%p,%p,%p) - stub\n", This
, hmenuShared
, holemenu
, hwndActiveObject
);
633 static HRESULT WINAPI
OleInPlaceFrame_RemoveMenus(IOleInPlaceFrame
*iface
, HMENU hmenuShared
)
635 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
637 FIXME( "(%p, %p) - stub\n", This
, hmenuShared
);
641 static HRESULT WINAPI
OleInPlaceFrame_SetStatusText(IOleInPlaceFrame
*iface
, LPCOLESTR pszStatusText
)
643 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
645 FIXME( "(%p, %s) - stub\n", This
, debugstr_w( pszStatusText
) );
649 static HRESULT WINAPI
OleInPlaceFrame_EnableModeless(IOleInPlaceFrame
*iface
, BOOL fEnable
)
651 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
653 FIXME( "(%p, %d) - stub\n", This
, fEnable
);
657 static HRESULT WINAPI
OleInPlaceFrame_TranslateAccelerator(IOleInPlaceFrame
*iface
, LPMSG lpmsg
, WORD wID
)
659 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
661 FIXME( "(%p, %p, %x) - stub\n", This
, lpmsg
, wID
);
666 /****** IOleControlSite *******/
667 static inline IOCS
*impl_from_IOleControlSite(IOleControlSite
*iface
)
669 return CONTAINING_RECORD(iface
, IOCS
, IOleControlSite_iface
);
672 static HRESULT WINAPI
OleControlSite_QueryInterface(IOleControlSite
*iface
, REFIID riid
, void **ppv
)
674 IOCS
*This
= impl_from_IOleControlSite(iface
);
675 return IOleClientSite_QueryInterface(&This
->IOleClientSite_iface
, riid
, ppv
);
678 static ULONG WINAPI
OleControlSite_AddRef(IOleControlSite
*iface
)
680 IOCS
*This
= impl_from_IOleControlSite(iface
);
681 return IOleClientSite_AddRef(&This
->IOleClientSite_iface
);
684 static ULONG WINAPI
OleControlSite_Release(IOleControlSite
*iface
)
686 IOCS
*This
= impl_from_IOleControlSite(iface
);
687 return IOleClientSite_Release(&This
->IOleClientSite_iface
);
690 static HRESULT WINAPI
OleControlSite_OnControlInfoChanged( IOleControlSite
* This
)
695 static HRESULT WINAPI
OleControlSite_LockInPlaceActive( IOleControlSite
* This
, BOOL fLock
)
700 static HRESULT WINAPI
OleControlSite_GetExtendedControl( IOleControlSite
* This
, IDispatch
** ppDisp
)
705 static HRESULT WINAPI
OleControlSite_TransformCoords( IOleControlSite
* This
, POINTL
* pPtlHimetric
, POINTF
* pPtfContainer
, DWORD dwFlags
)
710 static HRESULT WINAPI
OleControlSite_TranslateAccelerator( IOleControlSite
* This
, MSG
* pMsg
, DWORD grfModifiers
)
715 static HRESULT WINAPI
OleControlSite_OnFocus( IOleControlSite
* This
, BOOL fGotFocus
)
720 static HRESULT WINAPI
OleControlSite_ShowPropertyFrame( IOleControlSite
* This
)
727 static const IOleClientSiteVtbl OleClientSite_vtbl
= {
728 OleClientSite_QueryInterface
,
729 OleClientSite_AddRef
,
730 OleClientSite_Release
,
731 OleClientSite_SaveObject
,
732 OleClientSite_GetMoniker
,
733 OleClientSite_GetContainer
,
734 OleClientSite_ShowObject
,
735 OleClientSite_OnShowWindow
,
736 OleClientSite_RequestNewObjectLayout
738 static const IOleContainerVtbl OleContainer_vtbl
= {
739 OleContainer_QueryInterface
,
741 OleContainer_Release
,
742 OleContainer_ParseDisplayName
,
743 OleContainer_EnumObjects
,
744 OleContainer_LockContainer
746 static const IOleInPlaceSiteWindowlessVtbl OleInPlaceSiteWindowless_vtbl
= {
747 OleInPlaceSiteWindowless_QueryInterface
,
748 OleInPlaceSiteWindowless_AddRef
,
749 OleInPlaceSiteWindowless_Release
,
750 OleInPlaceSiteWindowless_GetWindow
,
751 OleInPlaceSiteWindowless_ContextSensitiveHelp
,
752 OleInPlaceSiteWindowless_CanInPlaceActivate
,
753 OleInPlaceSiteWindowless_OnInPlaceActivate
,
754 OleInPlaceSiteWindowless_OnUIActivate
,
755 OleInPlaceSiteWindowless_GetWindowContext
,
756 OleInPlaceSiteWindowless_Scroll
,
757 OleInPlaceSiteWindowless_OnUIDeactivate
,
758 OleInPlaceSiteWindowless_OnInPlaceDeactivate
,
759 OleInPlaceSiteWindowless_DiscardUndoState
,
760 OleInPlaceSiteWindowless_DeactivateAndUndo
,
761 OleInPlaceSiteWindowless_OnPosRectChange
,
762 OleInPlaceSiteWindowless_OnInPlaceActivateEx
,
763 OleInPlaceSiteWindowless_OnInPlaceDeactivateEx
,
764 OleInPlaceSiteWindowless_RequestUIActivate
,
765 OleInPlaceSiteWindowless_CanWindowlessActivate
,
766 OleInPlaceSiteWindowless_GetCapture
,
767 OleInPlaceSiteWindowless_SetCapture
,
768 OleInPlaceSiteWindowless_GetFocus
,
769 OleInPlaceSiteWindowless_SetFocus
,
770 OleInPlaceSiteWindowless_GetDC
,
771 OleInPlaceSiteWindowless_ReleaseDC
,
772 OleInPlaceSiteWindowless_InvalidateRect
,
773 OleInPlaceSiteWindowless_InvalidateRgn
,
774 OleInPlaceSiteWindowless_ScrollRect
,
775 OleInPlaceSiteWindowless_AdjustRect
,
776 OleInPlaceSiteWindowless_OnDefWindowMessage
778 static const IOleInPlaceFrameVtbl OleInPlaceFrame_vtbl
=
780 OleInPlaceFrame_QueryInterface
,
781 OleInPlaceFrame_AddRef
,
782 OleInPlaceFrame_Release
,
783 OleInPlaceFrame_GetWindow
,
784 OleInPlaceFrame_ContextSensitiveHelp
,
785 OleInPlaceFrame_GetBorder
,
786 OleInPlaceFrame_RequestBorderSpace
,
787 OleInPlaceFrame_SetBorderSpace
,
788 OleInPlaceFrame_SetActiveObject
,
789 OleInPlaceFrame_InsertMenus
,
790 OleInPlaceFrame_SetMenu
,
791 OleInPlaceFrame_RemoveMenus
,
792 OleInPlaceFrame_SetStatusText
,
793 OleInPlaceFrame_EnableModeless
,
794 OleInPlaceFrame_TranslateAccelerator
796 static const IOleControlSiteVtbl OleControlSite_vtbl
=
798 OleControlSite_QueryInterface
,
799 OleControlSite_AddRef
,
800 OleControlSite_Release
,
801 OleControlSite_OnControlInfoChanged
,
802 OleControlSite_LockInPlaceActive
,
803 OleControlSite_GetExtendedControl
,
804 OleControlSite_TransformCoords
,
805 OleControlSite_TranslateAccelerator
,
806 OleControlSite_OnFocus
,
807 OleControlSite_ShowPropertyFrame
810 static void IOCS_OnSize( IOCS
* This
, LPCRECT rect
)
814 This
->size
.left
= rect
->left
; This
->size
.right
= rect
->right
; This
->size
.top
= rect
->top
; This
->size
.bottom
= rect
->bottom
;
816 if ( !This
->control
)
819 inPix
.cx
= rect
->right
- rect
->left
;
820 inPix
.cy
= rect
->bottom
- rect
->top
;
821 AtlPixelToHiMetric( &inPix
, &inHi
);
822 IOleObject_SetExtent( This
->control
, DVASPECT_CONTENT
, &inHi
);
824 if ( This
->fInPlace
)
826 IOleInPlaceObject
*wl
;
828 if ( SUCCEEDED( IOleObject_QueryInterface( This
->control
, &IID_IOleInPlaceObject
, (void**)&wl
) ) )
830 IOleInPlaceObject_SetObjectRects( wl
, rect
, rect
);
831 IOleInPlaceObject_Release( wl
);
836 static void IOCS_OnShow( IOCS
*This
, BOOL fShow
)
838 if (!This
->control
|| This
->fActive
|| !fShow
)
841 This
->fActive
= TRUE
;
844 static void IOCS_OnDraw( IOCS
*This
)
848 if ( !This
->control
|| !This
->fWindowless
)
851 if ( SUCCEEDED( IOleObject_QueryInterface( This
->control
, &IID_IViewObject
, (void**)&view
) ) )
853 HDC dc
= GetDC( This
->hWnd
);
856 rect
.left
= This
->size
.left
; rect
.top
= This
->size
.top
;
857 rect
.bottom
= This
->size
.bottom
; rect
.right
= This
->size
.right
;
859 IViewObject_Draw( view
, DVASPECT_CONTENT
, ~0, NULL
, NULL
, 0, dc
, &rect
, &rect
, NULL
, 0 );
860 IViewObject_Release( view
);
861 ReleaseDC( This
->hWnd
, dc
);
865 static LRESULT
IOCS_OnWndProc( IOCS
*This
, HWND hWnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
867 WNDPROC OrigWndProc
= This
->OrigWndProc
;
878 r
.right
= LOWORD( lParam
);
879 r
.bottom
= HIWORD( lParam
);
880 IOCS_OnSize( This
, &r
);
884 IOCS_OnShow( This
, (BOOL
) wParam
);
891 return CallWindowProcW( OrigWndProc
, hWnd
, uMsg
, wParam
, lParam
);
894 static LRESULT CALLBACK
AtlHost_wndproc( HWND hWnd
, UINT wMsg
, WPARAM wParam
, LPARAM lParam
)
896 IOCS
*This
= (IOCS
*) GetPropW( hWnd
, wine_atl_iocsW
);
897 return IOCS_OnWndProc( This
, hWnd
, wMsg
, wParam
, lParam
);
900 static HRESULT
IOCS_Attach( IOCS
*This
, HWND hWnd
, IUnknown
*pUnkControl
) /* subclass hWnd */
903 IUnknown_QueryInterface( pUnkControl
, &IID_IOleObject
, (void**)&This
->control
);
904 IOleObject_SetClientSite( This
->control
, &This
->IOleClientSite_iface
);
905 SetPropW( hWnd
, wine_atl_iocsW
, This
);
906 This
->OrigWndProc
= (WNDPROC
)SetWindowLongPtrW( hWnd
, GWLP_WNDPROC
, (ULONG_PTR
) AtlHost_wndproc
);
911 static HRESULT
IOCS_Init( IOCS
*This
)
914 static const WCHAR AXWIN
[] = {'A','X','W','I','N',0};
916 IOleObject_SetHostNames( This
->control
, AXWIN
, AXWIN
);
918 GetClientRect( This
->hWnd
, &rect
);
919 IOCS_OnSize( This
, &rect
);
920 IOleObject_DoVerb( This
->control
, OLEIVERB_INPLACEACTIVATE
, NULL
, &This
->IOleClientSite_iface
,
921 0, This
->hWnd
, &rect
);
926 /**********************************************************************
927 * Create new instance of Atl host component and attach it to window *
929 static HRESULT
IOCS_Create( HWND hWnd
, IUnknown
*pUnkControl
, IUnknown
**container
)
938 This
= HeapAlloc(GetProcessHeap(), 0, sizeof(IOCS
));
941 return E_OUTOFMEMORY
;
943 This
->IOleClientSite_iface
.lpVtbl
= &OleClientSite_vtbl
;
944 This
->IOleContainer_iface
.lpVtbl
= &OleContainer_vtbl
;
945 This
->IOleInPlaceSiteWindowless_iface
.lpVtbl
= &OleInPlaceSiteWindowless_vtbl
;
946 This
->IOleInPlaceFrame_iface
.lpVtbl
= &OleInPlaceFrame_vtbl
;
947 This
->IOleControlSite_iface
.lpVtbl
= &OleControlSite_vtbl
;
950 This
->OrigWndProc
= NULL
;
952 This
->fWindowless
= This
->fActive
= This
->fInPlace
= FALSE
;
954 hr
= IOCS_Attach( This
, hWnd
, pUnkControl
);
955 if ( SUCCEEDED( hr
) )
956 hr
= IOCS_Init( This
);
957 if ( SUCCEEDED( hr
) )
958 *container
= (IUnknown
*)&This
->IOleClientSite_iface
;
962 HeapFree(GetProcessHeap(), 0, This
);
969 /***********************************************************************
970 * AtlAxCreateControl [atl100.@]
972 HRESULT WINAPI
AtlAxCreateControl(LPCOLESTR lpszName
, HWND hWnd
,
973 IStream
*pStream
, IUnknown
**ppUnkContainer
)
975 return AtlAxCreateControlEx( lpszName
, hWnd
, pStream
, ppUnkContainer
,
988 static enum content
get_content_type(LPCOLESTR name
, CLSID
*control_id
)
990 WCHAR new_urlW
[MAX_PATH
];
991 DWORD size
= MAX_PATH
;
992 WCHAR mshtml_prefixW
[] = {'m','s','h','t','m','l',':','\0'};
994 if (!name
|| !name
[0])
996 WARN("name %s\n", wine_dbgstr_w(name
));
1000 if (CLSIDFromString(name
, control_id
) == S_OK
||
1001 CLSIDFromProgID(name
, control_id
) == S_OK
)
1004 if (PathIsURLW (name
) ||
1005 UrlApplySchemeW(name
, new_urlW
, &size
, URL_APPLY_GUESSSCHEME
|URL_APPLY_GUESSFILE
) == S_OK
)
1007 *control_id
= CLSID_WebBrowser
;
1011 if (!strncmpiW(name
, mshtml_prefixW
, 7))
1013 FIXME("mshtml prefix not implemented\n");
1014 *control_id
= CLSID_WebBrowser
;
1021 /***********************************************************************
1022 * AtlAxCreateControlEx [atl100.@]
1025 * See http://www.codeproject.com/com/cwebpage.asp for some background
1028 HRESULT WINAPI
AtlAxCreateControlEx(LPCOLESTR lpszName
, HWND hWnd
,
1029 IStream
*pStream
, IUnknown
**ppUnkContainer
, IUnknown
**ppUnkControl
,
1030 REFIID iidSink
, IUnknown
*punkSink
)
1034 IOleObject
*pControl
;
1035 IUnknown
*pUnkControl
= NULL
;
1036 IPersistStreamInit
*pPSInit
;
1037 IUnknown
*pContainer
= NULL
;
1038 enum content content
;
1040 TRACE("(%s %p %p %p %p %p %p)\n", debugstr_w(lpszName
), hWnd
, pStream
,
1041 ppUnkContainer
, ppUnkControl
, iidSink
, punkSink
);
1043 if (ppUnkContainer
) *ppUnkContainer
= NULL
;
1044 if (ppUnkControl
) *ppUnkControl
= NULL
;
1046 content
= get_content_type(lpszName
, &controlId
);
1048 if (content
== IsEmpty
)
1051 if (content
== IsUnknown
)
1052 return CO_E_CLASSSTRING
;
1054 hRes
= CoCreateInstance( &controlId
, 0, CLSCTX_ALL
, &IID_IOleObject
,
1055 (void**) &pControl
);
1056 if ( FAILED( hRes
) )
1058 WARN( "cannot create ActiveX control %s instance - error 0x%08x\n",
1059 debugstr_guid( &controlId
), hRes
);
1063 hRes
= IOleObject_QueryInterface( pControl
, &IID_IPersistStreamInit
, (void**) &pPSInit
);
1064 if ( SUCCEEDED( hRes
) )
1067 IPersistStreamInit_InitNew( pPSInit
);
1069 IPersistStreamInit_Load( pPSInit
, pStream
);
1070 IPersistStreamInit_Release( pPSInit
);
1072 WARN("cannot get IID_IPersistStreamInit out of control\n");
1074 IOleObject_QueryInterface( pControl
, &IID_IUnknown
, (void**) &pUnkControl
);
1075 IOleObject_Release( pControl
);
1078 hRes
= AtlAxAttachControl( pUnkControl
, hWnd
, &pContainer
);
1079 if ( FAILED( hRes
) )
1080 WARN("cannot attach control to window\n");
1082 if ( content
== IsURL
)
1084 IWebBrowser2
*browser
;
1086 hRes
= IOleObject_QueryInterface( pControl
, &IID_IWebBrowser2
, (void**) &browser
);
1088 WARN( "Cannot query IWebBrowser2 interface: %08x\n", hRes
);
1092 IWebBrowser2_put_Visible( browser
, VARIANT_TRUE
); /* it seems that native does this on URL (but do not on MSHTML:! why? */
1094 V_VT(&url
) = VT_BSTR
;
1095 V_BSTR(&url
) = SysAllocString( lpszName
);
1097 hRes
= IWebBrowser2_Navigate2( browser
, &url
, NULL
, NULL
, NULL
, NULL
);
1098 if ( FAILED( hRes
) )
1099 WARN( "IWebBrowser2::Navigate2 failed: %08x\n", hRes
);
1100 SysFreeString( V_BSTR(&url
) );
1102 IWebBrowser2_Release( browser
);
1108 *ppUnkContainer
= pContainer
;
1110 IUnknown_AddRef( pContainer
);
1114 *ppUnkControl
= pUnkControl
;
1116 IUnknown_AddRef( pUnkControl
);
1120 IUnknown_Release( pUnkControl
);
1122 IUnknown_Release( pContainer
);
1127 /***********************************************************************
1128 * AtlAxAttachControl [atl100.@]
1130 HRESULT WINAPI
AtlAxAttachControl(IUnknown
*control
, HWND hWnd
, IUnknown
**container
)
1134 TRACE("(%p %p %p)\n", control
, hWnd
, container
);
1137 return E_INVALIDARG
;
1139 hr
= IOCS_Create( hWnd
, control
, container
);
1140 return hWnd
? hr
: S_FALSE
;
1143 /**********************************************************************
1144 * Helper function for AX_ConvertDialogTemplate
1146 static inline BOOL
advance_array(WORD
**pptr
, DWORD
*palloc
, DWORD
*pfilled
, const WORD
*data
, DWORD size
)
1148 if ( (*pfilled
+ size
) > *palloc
)
1150 *palloc
= ((*pfilled
+size
) + 0xFF) & ~0xFF;
1151 *pptr
= HeapReAlloc( GetProcessHeap(), 0, *pptr
, *palloc
* sizeof(WORD
) );
1155 RtlMoveMemory( *pptr
+*pfilled
, data
, size
* sizeof(WORD
) );
1160 /**********************************************************************
1161 * Convert ActiveX control templates to AtlAxWin class instances
1163 static LPDLGTEMPLATEW
AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl
)
1165 #define GET_WORD(x) (*(const WORD *)(x))
1166 #define GET_DWORD(x) (*(const DWORD *)(x))
1167 #define PUT_BLOCK(x,y) do {if (!advance_array(&output, &allocated, &filled, (x), (y))) return NULL;} while (0)
1168 #define PUT_WORD(x) do {WORD w = (x);PUT_BLOCK(&w, 1);} while(0)
1169 const WORD
*tmp
, *src
= (const WORD
*)src_tmpl
;
1171 DWORD allocated
, filled
; /* in WORDs */
1173 WORD signature
, dlgver
, rescount
;
1176 filled
= 0; allocated
= 256;
1177 output
= HeapAlloc( GetProcessHeap(), 0, allocated
* sizeof(WORD
) );
1183 signature
= GET_WORD(src
);
1184 dlgver
= GET_WORD(src
+ 1);
1185 if (signature
== 1 && dlgver
== 0xFFFF)
1189 style
= GET_DWORD(src
);
1191 rescount
= GET_WORD(src
++);
1193 if ( GET_WORD(src
) == 0xFFFF ) /* menu */
1196 src
+= strlenW(src
) + 1;
1197 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1200 src
+= strlenW(src
) + 1;
1201 src
+= strlenW(src
) + 1; /* title */
1202 if ( style
& (DS_SETFONT
| DS_SHELLFONT
) )
1205 src
+= strlenW(src
) + 1;
1209 style
= GET_DWORD(src
);
1211 rescount
= GET_WORD(src
++);
1213 if ( GET_WORD(src
) == 0xFFFF ) /* menu */
1216 src
+= strlenW(src
) + 1;
1217 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1220 src
+= strlenW(src
) + 1;
1221 src
+= strlenW(src
) + 1; /* title */
1222 if ( style
& DS_SETFONT
)
1225 src
+= strlenW(src
) + 1;
1228 PUT_BLOCK(tmp
, src
-tmp
);
1232 src
= (const WORD
*)( ( ((ULONG_PTR
)src
) + 3) & ~3); /* align on DWORD boundary */
1233 filled
= (filled
+ 1) & ~1; /* depends on DWORD-aligned allocation unit */
1240 PUT_BLOCK(tmp
, src
-tmp
);
1243 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1248 src
+= strlenW(src
) + 1;
1250 src
+= strlenW(src
) + 1; /* title */
1251 if ( GET_WORD(tmp
) == '{' ) /* all this mess created because of this line */
1253 static const WCHAR AtlAxWin
[] = {'A','t','l','A','x','W','i','n', 0};
1254 PUT_BLOCK(AtlAxWin
, sizeof(AtlAxWin
)/sizeof(WCHAR
));
1255 PUT_BLOCK(tmp
, strlenW(tmp
)+1);
1257 PUT_BLOCK(tmp
, src
-tmp
);
1259 if ( GET_WORD(src
) )
1261 WORD size
= (GET_WORD(src
)+sizeof(WORD
)-1) / sizeof(WORD
); /* quite ugly :( Maybe use BYTE* instead of WORD* everywhere ? */
1262 PUT_BLOCK(src
, size
);
1271 return (LPDLGTEMPLATEW
) output
;
1274 /***********************************************************************
1275 * AtlAxCreateDialogA [atl100.@]
1277 * Creates a dialog window
1280 * hInst [I] Application instance
1281 * name [I] Dialog box template name
1282 * owner [I] Dialog box parent HWND
1283 * dlgProc [I] Dialog box procedure
1284 * param [I] This value will be passed to dlgProc as WM_INITDIALOG's message lParam
1287 * Window handle of dialog window.
1289 HWND WINAPI
AtlAxCreateDialogA(HINSTANCE hInst
, LPCSTR name
, HWND owner
, DLGPROC dlgProc
,LPARAM param
)
1295 if (IS_INTRESOURCE(name
))
1296 return AtlAxCreateDialogW( hInst
, (LPCWSTR
) name
, owner
, dlgProc
, param
);
1298 length
= MultiByteToWideChar( CP_ACP
, 0, name
, -1, NULL
, 0 );
1299 nameW
= HeapAlloc( GetProcessHeap(), 0, length
* sizeof(WCHAR
) );
1302 MultiByteToWideChar( CP_ACP
, 0, name
, -1, nameW
, length
);
1303 res
= AtlAxCreateDialogW( hInst
, nameW
, owner
, dlgProc
, param
);
1304 HeapFree( GetProcessHeap(), 0, nameW
);
1309 /***********************************************************************
1310 * AtlAxCreateDialogW [atl100.@]
1312 * See AtlAxCreateDialogA
1315 HWND WINAPI
AtlAxCreateDialogW(HINSTANCE hInst
, LPCWSTR name
, HWND owner
, DLGPROC dlgProc
,LPARAM param
)
1319 LPCDLGTEMPLATEW ptr
;
1320 LPDLGTEMPLATEW newptr
;
1323 TRACE("(%p %s %p %p %lx)\n", hInst
, debugstr_w(name
), owner
, dlgProc
, param
);
1325 hrsrc
= FindResourceW( hInst
, name
, (LPWSTR
)RT_DIALOG
);
1328 hgl
= LoadResource (hInst
, hrsrc
);
1331 ptr
= LockResource ( hgl
);
1334 FreeResource( hgl
);
1337 newptr
= AX_ConvertDialogTemplate( ptr
);
1340 res
= CreateDialogIndirectParamW( hInst
, newptr
, owner
, dlgProc
, param
);
1341 HeapFree( GetProcessHeap(), 0, newptr
);
1344 FreeResource ( hrsrc
);
1348 /***********************************************************************
1349 * AtlAxGetHost [atl100.@]
1352 HRESULT WINAPI
AtlAxGetHost(HWND hWnd
, IUnknown
**host
)
1356 TRACE("(%p, %p)\n", hWnd
, host
);
1360 This
= (IOCS
*) GetPropW( hWnd
, wine_atl_iocsW
);
1363 WARN("No container attached to %p\n", hWnd
);
1367 return IOleClientSite_QueryInterface(&This
->IOleClientSite_iface
, &IID_IUnknown
, (void**)host
);
1370 /***********************************************************************
1371 * AtlAxGetControl [atl100.@]
1374 HRESULT WINAPI
AtlAxGetControl(HWND hWnd
, IUnknown
**pUnk
)
1378 TRACE( "(%p, %p)\n", hWnd
, pUnk
);
1382 This
= (IOCS
*) GetPropW( hWnd
, wine_atl_iocsW
);
1383 if ( !This
|| !This
->control
)
1385 WARN("No control attached to %p\n", hWnd
);
1389 return IOleObject_QueryInterface( This
->control
, &IID_IUnknown
, (void**) pUnk
);
1392 /***********************************************************************
1393 * AtlAxDialogBoxW [atl100.35]
1396 INT_PTR WINAPI
AtlAxDialogBoxW(HINSTANCE hInstance
, LPCWSTR lpTemplateName
, HWND hWndParent
, DLGPROC lpDialogProc
,
1399 FIXME("(%p %s %p %p %lx)\n", hInstance
, debugstr_w(lpTemplateName
), hWndParent
, lpDialogProc
, dwInitParam
);
1403 /***********************************************************************
1404 * AtlAxDialogBoxA [atl100.36]
1407 INT_PTR WINAPI
AtlAxDialogBoxA(HINSTANCE hInstance
, LPCSTR lpTemplateName
, HWND hWndParent
, DLGPROC lpDialogProc
,
1410 FIXME("(%p %s %p %p %lx)\n", hInstance
, debugstr_a(lpTemplateName
), hWndParent
, lpDialogProc
, dwInitParam
);
1414 #if _ATL_VER >= _ATL_VER_80
1416 /***********************************************************************
1417 * AtlAxCreateControlLic [atl100.59]
1420 HRESULT WINAPI
AtlAxCreateControlLic(const WCHAR
*lpTricsData
, HWND hwnd
, IStream
*stream
, IUnknown
**container
, BSTR lic
)
1422 FIXME("(%s %p %p %p %s)\n", debugstr_w(lpTricsData
), hwnd
, stream
, container
, debugstr_w(lic
));
1426 /***********************************************************************
1427 * AtlAxCreateControlLicEx [atl100.60]
1430 HRESULT WINAPI
AtlAxCreateControlLicEx(const WCHAR
*lpTricsData
, HWND hwnd
, IStream
*stream
,
1431 IUnknown
**container
, IUnknown
**control
, REFIID iidSink
, IUnknown
*punkSink
, BSTR lic
)
1433 FIXME("(%s %p %p %p %p %s %p %s)\n", debugstr_w(lpTricsData
), hwnd
, stream
, container
, control
,
1434 debugstr_guid(iidSink
), punkSink
, debugstr_w(lic
));