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
30 #include "wine/debug.h"
39 #include "wine/unicode.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(atl
);
44 IOleClientSite IOleClientSite_iface
;
45 IOleContainer IOleContainer_iface
;
46 IOleInPlaceSiteWindowless IOleInPlaceSiteWindowless_iface
;
47 IOleInPlaceFrame IOleInPlaceFrame_iface
;
48 IOleControlSite IOleControlSite_iface
;
55 BOOL fActive
, fInPlace
, fWindowless
;
58 /**********************************************************************
59 * AtlAxWin class window procedure
61 static LRESULT CALLBACK
AtlAxWin_wndproc( HWND hWnd
, UINT wMsg
, WPARAM wParam
, LPARAM lParam
)
63 if ( wMsg
== WM_CREATE
)
65 DWORD len
= GetWindowTextLengthW( hWnd
) + 1;
66 WCHAR
*ptr
= HeapAlloc( GetProcessHeap(), 0, len
*sizeof(WCHAR
) );
69 GetWindowTextW( hWnd
, ptr
, len
);
70 AtlAxCreateControlEx( ptr
, hWnd
, NULL
, NULL
, NULL
, NULL
, NULL
);
71 HeapFree( GetProcessHeap(), 0, ptr
);
74 return DefWindowProcW( hWnd
, wMsg
, wParam
, lParam
);
77 /***********************************************************************
78 * AtlAxWinInit [atl100.@]
79 * Initializes the control-hosting code: registering the AtlAxWin,
80 * AtlAxWin7 and AtlAxWinLic7 window classes and some messages.
86 BOOL WINAPI
AtlAxWinInit(void)
90 #if _ATL_VER <= _ATL_VER_30
91 #define ATL_NAME_SUFFIX 0
92 #elif _ATL_VER == _ATL_VER_80
93 #define ATL_NAME_SUFFIX '8','0',0
94 #elif _ATL_VER == _ATL_VER_90
95 #define ATL_NAME_SUFFIX '9','0',0
96 #elif _ATL_VER == _ATL_VER_100
97 #define ATL_NAME_SUFFIX '1','0','0',0
98 #elif _ATL_VER == _ATL_VER_110
99 #define ATL_NAME_SUFFIX '1','1','0',0
101 #error Unsupported version
104 const WCHAR AtlAxWinW
[] = {'A','t','l','A','x','W','i','n',ATL_NAME_SUFFIX
};
106 FIXME("version %04x semi-stub\n", _ATL_VER
);
108 if ( FAILED( OleInitialize(NULL
) ) )
111 wcex
.cbSize
= sizeof(wcex
);
112 wcex
.style
= CS_GLOBALCLASS
| (_ATL_VER
> _ATL_VER_30
? CS_DBLCLKS
: 0);
115 wcex
.hInstance
= GetModuleHandleW( NULL
);
118 wcex
.hbrBackground
= NULL
;
119 wcex
.lpszMenuName
= NULL
;
122 wcex
.lpfnWndProc
= AtlAxWin_wndproc
;
123 wcex
.lpszClassName
= AtlAxWinW
;
124 if ( !RegisterClassExW( &wcex
) )
127 if(_ATL_VER
> _ATL_VER_30
) {
128 const WCHAR AtlAxWinLicW
[] = {'A','t','l','A','x','W','i','n','L','i','c',ATL_NAME_SUFFIX
};
130 wcex
.lpszClassName
= AtlAxWinLicW
;
131 if ( !RegisterClassExW( &wcex
) )
138 /***********************************************************************
139 * Atl container component implementation
143 static ULONG
IOCS_AddRef(IOCS
*This
)
145 ULONG ref
= InterlockedIncrement(&This
->ref
);
147 TRACE( "(%p) : AddRef from %d\n", This
, ref
- 1 );
152 static HRESULT
IOCS_QueryInterface(IOCS
*This
, REFIID riid
, void **ppv
)
156 if ( IsEqualIID( &IID_IUnknown
, riid
)
157 || IsEqualIID( &IID_IOleClientSite
, riid
) )
159 *ppv
= &This
->IOleClientSite_iface
;
160 } else if ( IsEqualIID( &IID_IOleContainer
, riid
) )
162 *ppv
= &This
->IOleContainer_iface
;
163 } else if ( IsEqualIID( &IID_IOleInPlaceSite
, riid
) || IsEqualIID( &IID_IOleInPlaceSiteEx
, riid
) || IsEqualIID( &IID_IOleInPlaceSiteWindowless
, riid
) )
165 *ppv
= &This
->IOleInPlaceSiteWindowless_iface
;
166 } else if ( IsEqualIID( &IID_IOleInPlaceFrame
, riid
) )
168 *ppv
= &This
->IOleInPlaceFrame_iface
;
169 } else if ( IsEqualIID( &IID_IOleControlSite
, riid
) )
171 *ppv
= &This
->IOleControlSite_iface
;
180 WARN("unsupported interface %s\n", debugstr_guid( riid
) );
182 return E_NOINTERFACE
;
185 static HRESULT
IOCS_Detach( IOCS
*This
);
186 static ULONG
IOCS_Release(IOCS
*This
)
188 ULONG ref
= InterlockedDecrement(&This
->ref
);
190 TRACE( "(%p) : ReleaseRef to %d\n", This
, ref
);
195 HeapFree( GetProcessHeap(), 0, This
);
201 /****** IOleClientSite *****/
202 static inline IOCS
*impl_from_IOleClientSite(IOleClientSite
*iface
)
204 return CONTAINING_RECORD(iface
, IOCS
, IOleClientSite_iface
);
207 static HRESULT WINAPI
OleClientSite_QueryInterface(IOleClientSite
*iface
, REFIID riid
, void **ppv
)
209 IOCS
*This
= impl_from_IOleClientSite(iface
);
210 return IOCS_QueryInterface(This
, riid
, ppv
);
213 static ULONG WINAPI
OleClientSite_AddRef(IOleClientSite
*iface
)
215 IOCS
*This
= impl_from_IOleClientSite(iface
);
216 return IOCS_AddRef(This
);
219 static ULONG WINAPI
OleClientSite_Release(IOleClientSite
*iface
)
221 IOCS
*This
= impl_from_IOleClientSite(iface
);
222 return IOCS_Release(This
);
225 static HRESULT WINAPI
OleClientSite_SaveObject(IOleClientSite
*iface
)
227 IOCS
*This
= impl_from_IOleClientSite(iface
);
228 FIXME( "(%p) - stub\n", This
);
232 static HRESULT WINAPI
OleClientSite_GetMoniker(IOleClientSite
*iface
, DWORD dwAssign
, DWORD dwWhichMoniker
, IMoniker
**ppmk
)
234 IOCS
*This
= impl_from_IOleClientSite(iface
);
236 FIXME( "(%p, 0x%x, 0x%x, %p)\n", This
, dwAssign
, dwWhichMoniker
, ppmk
);
240 static HRESULT WINAPI
OleClientSite_GetContainer(IOleClientSite
*iface
, IOleContainer
**ppContainer
)
242 IOCS
*This
= impl_from_IOleClientSite(iface
);
243 TRACE( "(%p, %p)\n", This
, ppContainer
);
244 return OleClientSite_QueryInterface( iface
, &IID_IOleContainer
, (void**)ppContainer
);
247 static HRESULT WINAPI
OleClientSite_ShowObject(IOleClientSite
*iface
)
249 IOCS
*This
= impl_from_IOleClientSite(iface
);
250 FIXME( "(%p) - stub\n", This
);
254 static HRESULT WINAPI
OleClientSite_OnShowWindow(IOleClientSite
*iface
, BOOL fShow
)
256 IOCS
*This
= impl_from_IOleClientSite(iface
);
257 FIXME( "(%p, %s) - stub\n", This
, fShow
? "TRUE" : "FALSE" );
261 static HRESULT WINAPI
OleClientSite_RequestNewObjectLayout(IOleClientSite
*iface
)
263 IOCS
*This
= impl_from_IOleClientSite(iface
);
264 FIXME( "(%p) - stub\n", This
);
269 /****** IOleContainer *****/
270 static inline IOCS
*impl_from_IOleContainer(IOleContainer
*iface
)
272 return CONTAINING_RECORD(iface
, IOCS
, IOleContainer_iface
);
275 static HRESULT WINAPI
OleContainer_QueryInterface( IOleContainer
* iface
, REFIID riid
, void** ppv
)
277 IOCS
*This
= impl_from_IOleContainer(iface
);
278 return IOCS_QueryInterface( This
, riid
, ppv
);
281 static ULONG WINAPI
OleContainer_AddRef(IOleContainer
* iface
)
283 IOCS
*This
= impl_from_IOleContainer(iface
);
284 return IOCS_AddRef(This
);
287 static ULONG WINAPI
OleContainer_Release(IOleContainer
* iface
)
289 IOCS
*This
= impl_from_IOleContainer(iface
);
290 return IOCS_Release(This
);
293 static HRESULT WINAPI
OleContainer_ParseDisplayName(IOleContainer
* iface
, IBindCtx
* pbc
,
294 LPOLESTR pszDisplayName
, ULONG
* pchEaten
, IMoniker
** ppmkOut
)
296 IOCS
*This
= impl_from_IOleContainer(iface
);
297 FIXME( "(%p,%p,%s,%p,%p) - stub\n", This
, pbc
, debugstr_w(pszDisplayName
), pchEaten
, ppmkOut
);
301 static HRESULT WINAPI
OleContainer_EnumObjects(IOleContainer
* iface
, DWORD grfFlags
, IEnumUnknown
** ppenum
)
303 IOCS
*This
= impl_from_IOleContainer(iface
);
304 FIXME( "(%p, %u, %p) - stub\n", This
, grfFlags
, ppenum
);
308 static HRESULT WINAPI
OleContainer_LockContainer(IOleContainer
* iface
, BOOL fLock
)
310 IOCS
*This
= impl_from_IOleContainer(iface
);
311 FIXME( "(%p, %s) - stub\n", This
, fLock
?"TRUE":"FALSE" );
316 /****** IOleInPlaceSiteWindowless *******/
317 static inline IOCS
*impl_from_IOleInPlaceSiteWindowless(IOleInPlaceSiteWindowless
*iface
)
319 return CONTAINING_RECORD(iface
, IOCS
, IOleInPlaceSiteWindowless_iface
);
322 static HRESULT WINAPI
OleInPlaceSiteWindowless_QueryInterface(IOleInPlaceSiteWindowless
*iface
, REFIID riid
, void **ppv
)
324 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
325 return IOCS_QueryInterface(This
, riid
, ppv
);
328 static ULONG WINAPI
OleInPlaceSiteWindowless_AddRef(IOleInPlaceSiteWindowless
*iface
)
330 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
331 return IOCS_AddRef(This
);
334 static ULONG WINAPI
OleInPlaceSiteWindowless_Release(IOleInPlaceSiteWindowless
*iface
)
336 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
337 return IOCS_Release(This
);
340 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetWindow(IOleInPlaceSiteWindowless
* iface
, HWND
* phwnd
)
342 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
344 TRACE("(%p,%p)\n", This
, phwnd
);
349 static HRESULT WINAPI
OleInPlaceSiteWindowless_ContextSensitiveHelp(IOleInPlaceSiteWindowless
* iface
, BOOL fEnterMode
)
351 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
352 FIXME("(%p,%d) - stub\n", This
, fEnterMode
);
356 static HRESULT WINAPI
OleInPlaceSiteWindowless_CanInPlaceActivate(IOleInPlaceSiteWindowless
*iface
)
358 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
359 TRACE("(%p)\n", This
);
363 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceActivate(IOleInPlaceSiteWindowless
*iface
)
365 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
367 TRACE("(%p)\n", This
);
369 This
->fInPlace
= TRUE
;
373 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnUIActivate(IOleInPlaceSiteWindowless
*iface
)
375 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
377 TRACE("(%p)\n", This
);
381 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetWindowContext(IOleInPlaceSiteWindowless
*iface
,
382 IOleInPlaceFrame
**ppFrame
, IOleInPlaceUIWindow
**ppDoc
, LPRECT lprcPosRect
,
383 LPRECT lprcClipRect
, LPOLEINPLACEFRAMEINFO lpFrameInfo
)
385 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
387 TRACE("(%p,%p,%p,%p,%p,%p)\n", This
, ppFrame
, ppDoc
, lprcPosRect
, lprcClipRect
, lpFrameInfo
);
390 *lprcClipRect
= This
->size
;
392 *lprcPosRect
= This
->size
;
396 IOCS_QueryInterface( This
, &IID_IOleInPlaceFrame
, (void**) ppFrame
);
404 lpFrameInfo
->fMDIApp
= FALSE
;
405 lpFrameInfo
->hwndFrame
= This
->hWnd
;
406 lpFrameInfo
->haccel
= NULL
;
407 lpFrameInfo
->cAccelEntries
= 0;
413 static HRESULT WINAPI
OleInPlaceSiteWindowless_Scroll(IOleInPlaceSiteWindowless
*iface
, SIZE scrollExtent
)
415 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
416 FIXME("(%p) - stub\n", This
);
420 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnUIDeactivate(IOleInPlaceSiteWindowless
*iface
, BOOL fUndoable
)
422 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
423 FIXME("(%p,%d) - stub\n", This
, fUndoable
);
427 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceDeactivate(IOleInPlaceSiteWindowless
*iface
)
429 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
431 TRACE("(%p)\n", This
);
433 This
->fInPlace
= This
->fWindowless
= FALSE
;
437 static HRESULT WINAPI
OleInPlaceSiteWindowless_DiscardUndoState(IOleInPlaceSiteWindowless
*iface
)
439 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
440 FIXME("(%p) - stub\n", This
);
444 static HRESULT WINAPI
OleInPlaceSiteWindowless_DeactivateAndUndo(IOleInPlaceSiteWindowless
*iface
)
446 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
447 FIXME("(%p) - stub\n", This
);
451 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnPosRectChange(IOleInPlaceSiteWindowless
*iface
, LPCRECT lprcPosRect
)
453 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
454 FIXME("(%p,%p) - stub\n", This
, lprcPosRect
);
458 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceActivateEx( IOleInPlaceSiteWindowless
*iface
, BOOL
* pfNoRedraw
, DWORD dwFlags
)
460 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
464 This
->fActive
= This
->fInPlace
= TRUE
;
465 if ( dwFlags
& ACTIVATE_WINDOWLESS
)
466 This
->fWindowless
= TRUE
;
470 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceDeactivateEx( IOleInPlaceSiteWindowless
*iface
, BOOL fNoRedraw
)
472 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
476 This
->fActive
= This
->fInPlace
= This
->fWindowless
= FALSE
;
479 static HRESULT WINAPI
OleInPlaceSiteWindowless_RequestUIActivate( IOleInPlaceSiteWindowless
*iface
)
484 static HRESULT WINAPI
OleInPlaceSiteWindowless_CanWindowlessActivate( IOleInPlaceSiteWindowless
*iface
)
489 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetCapture( IOleInPlaceSiteWindowless
*iface
)
494 static HRESULT WINAPI
OleInPlaceSiteWindowless_SetCapture( IOleInPlaceSiteWindowless
*iface
, BOOL fCapture
)
499 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetFocus( IOleInPlaceSiteWindowless
*iface
)
504 static HRESULT WINAPI
OleInPlaceSiteWindowless_SetFocus( IOleInPlaceSiteWindowless
*iface
, BOOL fFocus
)
509 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetDC( IOleInPlaceSiteWindowless
*iface
, LPCRECT pRect
, DWORD grfFlags
, HDC
* phDC
)
514 static HRESULT WINAPI
OleInPlaceSiteWindowless_ReleaseDC( IOleInPlaceSiteWindowless
*iface
, HDC hDC
)
519 static HRESULT WINAPI
OleInPlaceSiteWindowless_InvalidateRect( IOleInPlaceSiteWindowless
*iface
, LPCRECT pRect
, BOOL fErase
)
524 static HRESULT WINAPI
OleInPlaceSiteWindowless_InvalidateRgn( IOleInPlaceSiteWindowless
*iface
, HRGN hRGN
, BOOL fErase
)
529 static HRESULT WINAPI
OleInPlaceSiteWindowless_ScrollRect( IOleInPlaceSiteWindowless
*iface
, INT dx
, INT dy
, LPCRECT pRectScroll
, LPCRECT pRectClip
)
534 static HRESULT WINAPI
OleInPlaceSiteWindowless_AdjustRect( IOleInPlaceSiteWindowless
*iface
, LPRECT prc
)
539 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnDefWindowMessage( IOleInPlaceSiteWindowless
*iface
, UINT msg
, WPARAM wParam
, LPARAM lParam
, LRESULT
* plResult
)
546 /****** IOleInPlaceFrame *******/
547 static inline IOCS
*impl_from_IOleInPlaceFrame(IOleInPlaceFrame
*iface
)
549 return CONTAINING_RECORD(iface
, IOCS
, IOleInPlaceFrame_iface
);
552 static HRESULT WINAPI
OleInPlaceFrame_QueryInterface(IOleInPlaceFrame
*iface
, REFIID riid
, void **ppv
)
554 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
555 return IOCS_QueryInterface(This
, riid
, ppv
);
558 static ULONG WINAPI
OleInPlaceFrame_AddRef(IOleInPlaceFrame
*iface
)
560 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
561 return IOCS_AddRef(This
);
564 static ULONG WINAPI
OleInPlaceFrame_Release(IOleInPlaceFrame
*iface
)
566 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
567 return IOCS_Release(This
);
570 static HRESULT WINAPI
OleInPlaceFrame_GetWindow(IOleInPlaceFrame
*iface
, HWND
*phWnd
)
572 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
574 TRACE( "(%p,%p)\n", This
, phWnd
);
580 static HRESULT WINAPI
OleInPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame
*iface
, BOOL fEnterMode
)
582 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
584 FIXME( "(%p,%d) - stub\n", This
, fEnterMode
);
588 static HRESULT WINAPI
OleInPlaceFrame_GetBorder(IOleInPlaceFrame
*iface
, LPRECT lprectBorder
)
590 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
592 FIXME( "(%p,%p) - stub\n", This
, lprectBorder
);
596 static HRESULT WINAPI
OleInPlaceFrame_RequestBorderSpace(IOleInPlaceFrame
*iface
, LPCBORDERWIDTHS pborderwidths
)
598 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
600 FIXME( "(%p,%p) - stub\n", This
, pborderwidths
);
604 static HRESULT WINAPI
OleInPlaceFrame_SetBorderSpace(IOleInPlaceFrame
*iface
, LPCBORDERWIDTHS pborderwidths
)
606 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
608 FIXME( "(%p,%p) - stub\n", This
, pborderwidths
);
612 static HRESULT WINAPI
OleInPlaceFrame_SetActiveObject(IOleInPlaceFrame
*iface
, IOleInPlaceActiveObject
*pActiveObject
, LPCOLESTR pszObjName
)
614 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
616 FIXME( "(%p,%p,%s) - stub\n", This
, pActiveObject
, debugstr_w(pszObjName
) );
620 static HRESULT WINAPI
OleInPlaceFrame_InsertMenus(IOleInPlaceFrame
*iface
, HMENU hmenuShared
, LPOLEMENUGROUPWIDTHS lpMenuWidths
)
622 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
624 FIXME( "(%p,%p,%p) - stub\n", This
, hmenuShared
, lpMenuWidths
);
628 static HRESULT WINAPI
OleInPlaceFrame_SetMenu(IOleInPlaceFrame
*iface
, HMENU hmenuShared
, HOLEMENU holemenu
, HWND hwndActiveObject
)
630 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
632 FIXME( "(%p,%p,%p,%p) - stub\n", This
, hmenuShared
, holemenu
, hwndActiveObject
);
636 static HRESULT WINAPI
OleInPlaceFrame_RemoveMenus(IOleInPlaceFrame
*iface
, HMENU hmenuShared
)
638 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
640 FIXME( "(%p, %p) - stub\n", This
, hmenuShared
);
644 static HRESULT WINAPI
OleInPlaceFrame_SetStatusText(IOleInPlaceFrame
*iface
, LPCOLESTR pszStatusText
)
646 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
648 FIXME( "(%p, %s) - stub\n", This
, debugstr_w( pszStatusText
) );
652 static HRESULT WINAPI
OleInPlaceFrame_EnableModeless(IOleInPlaceFrame
*iface
, BOOL fEnable
)
654 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
656 FIXME( "(%p, %d) - stub\n", This
, fEnable
);
660 static HRESULT WINAPI
OleInPlaceFrame_TranslateAccelerator(IOleInPlaceFrame
*iface
, LPMSG lpmsg
, WORD wID
)
662 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
664 FIXME( "(%p, %p, %x) - stub\n", This
, lpmsg
, wID
);
669 /****** IOleControlSite *******/
670 static inline IOCS
*impl_from_IOleControlSite(IOleControlSite
*iface
)
672 return CONTAINING_RECORD(iface
, IOCS
, IOleControlSite_iface
);
675 static HRESULT WINAPI
OleControlSite_QueryInterface(IOleControlSite
*iface
, REFIID riid
, void **ppv
)
677 IOCS
*This
= impl_from_IOleControlSite(iface
);
678 return IOCS_QueryInterface(This
, riid
, ppv
);
681 static ULONG WINAPI
OleControlSite_AddRef(IOleControlSite
*iface
)
683 IOCS
*This
= impl_from_IOleControlSite(iface
);
684 return IOCS_AddRef(This
);
687 static ULONG WINAPI
OleControlSite_Release(IOleControlSite
*iface
)
689 IOCS
*This
= impl_from_IOleControlSite(iface
);
690 return IOCS_Release(This
);
693 static HRESULT WINAPI
OleControlSite_OnControlInfoChanged( IOleControlSite
* This
)
698 static HRESULT WINAPI
OleControlSite_LockInPlaceActive( IOleControlSite
* This
, BOOL fLock
)
703 static HRESULT WINAPI
OleControlSite_GetExtendedControl( IOleControlSite
* This
, IDispatch
** ppDisp
)
708 static HRESULT WINAPI
OleControlSite_TransformCoords( IOleControlSite
* This
, POINTL
* pPtlHimetric
, POINTF
* pPtfContainer
, DWORD dwFlags
)
713 static HRESULT WINAPI
OleControlSite_TranslateAccelerator( IOleControlSite
* This
, MSG
* pMsg
, DWORD grfModifiers
)
718 static HRESULT WINAPI
OleControlSite_OnFocus( IOleControlSite
* This
, BOOL fGotFocus
)
723 static HRESULT WINAPI
OleControlSite_ShowPropertyFrame( IOleControlSite
* This
)
730 static const IOleClientSiteVtbl OleClientSite_vtbl
= {
731 OleClientSite_QueryInterface
,
732 OleClientSite_AddRef
,
733 OleClientSite_Release
,
734 OleClientSite_SaveObject
,
735 OleClientSite_GetMoniker
,
736 OleClientSite_GetContainer
,
737 OleClientSite_ShowObject
,
738 OleClientSite_OnShowWindow
,
739 OleClientSite_RequestNewObjectLayout
741 static const IOleContainerVtbl OleContainer_vtbl
= {
742 OleContainer_QueryInterface
,
744 OleContainer_Release
,
745 OleContainer_ParseDisplayName
,
746 OleContainer_EnumObjects
,
747 OleContainer_LockContainer
749 static const IOleInPlaceSiteWindowlessVtbl OleInPlaceSiteWindowless_vtbl
= {
750 OleInPlaceSiteWindowless_QueryInterface
,
751 OleInPlaceSiteWindowless_AddRef
,
752 OleInPlaceSiteWindowless_Release
,
753 OleInPlaceSiteWindowless_GetWindow
,
754 OleInPlaceSiteWindowless_ContextSensitiveHelp
,
755 OleInPlaceSiteWindowless_CanInPlaceActivate
,
756 OleInPlaceSiteWindowless_OnInPlaceActivate
,
757 OleInPlaceSiteWindowless_OnUIActivate
,
758 OleInPlaceSiteWindowless_GetWindowContext
,
759 OleInPlaceSiteWindowless_Scroll
,
760 OleInPlaceSiteWindowless_OnUIDeactivate
,
761 OleInPlaceSiteWindowless_OnInPlaceDeactivate
,
762 OleInPlaceSiteWindowless_DiscardUndoState
,
763 OleInPlaceSiteWindowless_DeactivateAndUndo
,
764 OleInPlaceSiteWindowless_OnPosRectChange
,
765 OleInPlaceSiteWindowless_OnInPlaceActivateEx
,
766 OleInPlaceSiteWindowless_OnInPlaceDeactivateEx
,
767 OleInPlaceSiteWindowless_RequestUIActivate
,
768 OleInPlaceSiteWindowless_CanWindowlessActivate
,
769 OleInPlaceSiteWindowless_GetCapture
,
770 OleInPlaceSiteWindowless_SetCapture
,
771 OleInPlaceSiteWindowless_GetFocus
,
772 OleInPlaceSiteWindowless_SetFocus
,
773 OleInPlaceSiteWindowless_GetDC
,
774 OleInPlaceSiteWindowless_ReleaseDC
,
775 OleInPlaceSiteWindowless_InvalidateRect
,
776 OleInPlaceSiteWindowless_InvalidateRgn
,
777 OleInPlaceSiteWindowless_ScrollRect
,
778 OleInPlaceSiteWindowless_AdjustRect
,
779 OleInPlaceSiteWindowless_OnDefWindowMessage
781 static const IOleInPlaceFrameVtbl OleInPlaceFrame_vtbl
=
783 OleInPlaceFrame_QueryInterface
,
784 OleInPlaceFrame_AddRef
,
785 OleInPlaceFrame_Release
,
786 OleInPlaceFrame_GetWindow
,
787 OleInPlaceFrame_ContextSensitiveHelp
,
788 OleInPlaceFrame_GetBorder
,
789 OleInPlaceFrame_RequestBorderSpace
,
790 OleInPlaceFrame_SetBorderSpace
,
791 OleInPlaceFrame_SetActiveObject
,
792 OleInPlaceFrame_InsertMenus
,
793 OleInPlaceFrame_SetMenu
,
794 OleInPlaceFrame_RemoveMenus
,
795 OleInPlaceFrame_SetStatusText
,
796 OleInPlaceFrame_EnableModeless
,
797 OleInPlaceFrame_TranslateAccelerator
799 static const IOleControlSiteVtbl OleControlSite_vtbl
=
801 OleControlSite_QueryInterface
,
802 OleControlSite_AddRef
,
803 OleControlSite_Release
,
804 OleControlSite_OnControlInfoChanged
,
805 OleControlSite_LockInPlaceActive
,
806 OleControlSite_GetExtendedControl
,
807 OleControlSite_TransformCoords
,
808 OleControlSite_TranslateAccelerator
,
809 OleControlSite_OnFocus
,
810 OleControlSite_ShowPropertyFrame
813 static HRESULT
IOCS_Detach( IOCS
*This
) /* remove subclassing */
817 SetWindowLongPtrW( This
->hWnd
, GWLP_WNDPROC
, (ULONG_PTR
) This
->OrigWndProc
);
818 SetWindowLongPtrW( This
->hWnd
, GWLP_USERDATA
, 0 );
823 IOleObject
*control
= This
->control
;
825 This
->control
= NULL
;
826 IOleObject_Close( control
, OLECLOSE_NOSAVE
);
827 IOleObject_SetClientSite( control
, NULL
);
828 IOleObject_Release( control
);
833 static void IOCS_OnSize( IOCS
* This
, LPCRECT rect
)
837 This
->size
.left
= rect
->left
; This
->size
.right
= rect
->right
; This
->size
.top
= rect
->top
; This
->size
.bottom
= rect
->bottom
;
839 if ( !This
->control
)
842 inPix
.cx
= rect
->right
- rect
->left
;
843 inPix
.cy
= rect
->bottom
- rect
->top
;
844 AtlPixelToHiMetric( &inPix
, &inHi
);
845 IOleObject_SetExtent( This
->control
, DVASPECT_CONTENT
, &inHi
);
847 if ( This
->fInPlace
)
849 IOleInPlaceObject
*wl
;
851 if ( SUCCEEDED( IOleObject_QueryInterface( This
->control
, &IID_IOleInPlaceObject
, (void**)&wl
) ) )
853 IOleInPlaceObject_SetObjectRects( wl
, rect
, rect
);
854 IOleInPlaceObject_Release( wl
);
859 static void IOCS_OnShow( IOCS
*This
, BOOL fShow
)
861 if (!This
->control
|| This
->fActive
|| !fShow
)
864 This
->fActive
= TRUE
;
867 static void IOCS_OnDraw( IOCS
*This
)
871 if ( !This
->control
|| !This
->fWindowless
)
874 if ( SUCCEEDED( IOleObject_QueryInterface( This
->control
, &IID_IViewObject
, (void**)&view
) ) )
876 HDC dc
= GetDC( This
->hWnd
);
879 rect
.left
= This
->size
.left
; rect
.top
= This
->size
.top
;
880 rect
.bottom
= This
->size
.bottom
; rect
.right
= This
->size
.right
;
882 IViewObject_Draw( view
, DVASPECT_CONTENT
, ~0, NULL
, NULL
, 0, dc
, &rect
, &rect
, NULL
, 0 );
883 IViewObject_Release( view
);
884 ReleaseDC( This
->hWnd
, dc
);
888 static LRESULT
IOCS_OnWndProc( IOCS
*This
, HWND hWnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
890 WNDPROC OrigWndProc
= This
->OrigWndProc
;
901 r
.right
= LOWORD( lParam
);
902 r
.bottom
= HIWORD( lParam
);
903 IOCS_OnSize( This
, &r
);
907 IOCS_OnShow( This
, (BOOL
) wParam
);
914 return CallWindowProcW( OrigWndProc
, hWnd
, uMsg
, wParam
, lParam
);
917 static LRESULT CALLBACK
AtlHost_wndproc( HWND hWnd
, UINT wMsg
, WPARAM wParam
, LPARAM lParam
)
919 IOCS
*This
= (IOCS
*) GetWindowLongPtrW( hWnd
, GWLP_USERDATA
);
920 return IOCS_OnWndProc( This
, hWnd
, wMsg
, wParam
, lParam
);
923 static HRESULT
IOCS_Attach( IOCS
*This
, HWND hWnd
, IUnknown
*pUnkControl
) /* subclass hWnd */
926 IUnknown_QueryInterface( pUnkControl
, &IID_IOleObject
, (void**)&This
->control
);
927 IOleObject_SetClientSite( This
->control
, &This
->IOleClientSite_iface
);
928 SetWindowLongPtrW( hWnd
, GWLP_USERDATA
, (ULONG_PTR
) This
);
929 This
->OrigWndProc
= (WNDPROC
)SetWindowLongPtrW( hWnd
, GWLP_WNDPROC
, (ULONG_PTR
) AtlHost_wndproc
);
934 static HRESULT
IOCS_Init( IOCS
*This
)
937 static const WCHAR AXWIN
[] = {'A','X','W','I','N',0};
939 IOleObject_SetHostNames( This
->control
, AXWIN
, AXWIN
);
941 GetClientRect( This
->hWnd
, &rect
);
942 IOCS_OnSize( This
, &rect
);
943 IOleObject_DoVerb( This
->control
, OLEIVERB_INPLACEACTIVATE
, NULL
, &This
->IOleClientSite_iface
,
944 0, This
->hWnd
, &rect
);
949 /**********************************************************************
950 * Create new instance of Atl host component and attach it to window *
952 static HRESULT
IOCS_Create( HWND hWnd
, IUnknown
*pUnkControl
, IOCS
**ppSite
)
958 This
= HeapAlloc(GetProcessHeap(), 0, sizeof(IOCS
));
961 return E_OUTOFMEMORY
;
963 This
->IOleClientSite_iface
.lpVtbl
= &OleClientSite_vtbl
;
964 This
->IOleContainer_iface
.lpVtbl
= &OleContainer_vtbl
;
965 This
->IOleInPlaceSiteWindowless_iface
.lpVtbl
= &OleInPlaceSiteWindowless_vtbl
;
966 This
->IOleInPlaceFrame_iface
.lpVtbl
= &OleInPlaceFrame_vtbl
;
967 This
->IOleControlSite_iface
.lpVtbl
= &OleControlSite_vtbl
;
970 This
->OrigWndProc
= NULL
;
972 This
->fWindowless
= This
->fActive
= This
->fInPlace
= FALSE
;
974 hr
= IOCS_Attach( This
, hWnd
, pUnkControl
);
975 if ( SUCCEEDED( hr
) )
976 hr
= IOCS_Init( This
);
977 if ( SUCCEEDED( hr
) )
980 IOCS_Release( This
);
986 /***********************************************************************
987 * AtlAxCreateControl [atl100.@]
989 HRESULT WINAPI
AtlAxCreateControl(LPCOLESTR lpszName
, HWND hWnd
,
990 IStream
*pStream
, IUnknown
**ppUnkContainer
)
992 return AtlAxCreateControlEx( lpszName
, hWnd
, pStream
, ppUnkContainer
,
996 /***********************************************************************
997 * AtlAxCreateControlEx [atl100.@]
1000 * See http://www.codeproject.com/com/cwebpage.asp for some background
1003 HRESULT WINAPI
AtlAxCreateControlEx(LPCOLESTR lpszName
, HWND hWnd
,
1004 IStream
*pStream
, IUnknown
**ppUnkContainer
, IUnknown
**ppUnkControl
,
1005 REFIID iidSink
, IUnknown
*punkSink
)
1009 IOleObject
*pControl
;
1010 IUnknown
*pUnkControl
;
1011 IPersistStreamInit
*pPSInit
;
1012 IUnknown
*pContainer
;
1013 enum {IsGUID
=0,IsHTML
=1,IsURL
=2} content
;
1015 TRACE("(%s %p %p %p %p %p %p)\n", debugstr_w(lpszName
), hWnd
, pStream
,
1016 ppUnkContainer
, ppUnkControl
, iidSink
, punkSink
);
1018 hRes
= CLSIDFromString( lpszName
, &controlId
);
1020 hRes
= CLSIDFromProgID( lpszName
, &controlId
);
1021 if ( SUCCEEDED( hRes
) )
1024 /* FIXME - check for MSHTML: prefix! */
1026 controlId
= CLSID_WebBrowser
;
1029 hRes
= CoCreateInstance( &controlId
, 0, CLSCTX_ALL
, &IID_IOleObject
,
1030 (void**) &pControl
);
1031 if ( FAILED( hRes
) )
1033 WARN( "cannot create ActiveX control %s instance - error 0x%08x\n",
1034 debugstr_guid( &controlId
), hRes
);
1038 hRes
= IOleObject_QueryInterface( pControl
, &IID_IPersistStreamInit
, (void**) &pPSInit
);
1039 if ( SUCCEEDED( hRes
) )
1042 IPersistStreamInit_InitNew( pPSInit
);
1044 IPersistStreamInit_Load( pPSInit
, pStream
);
1045 IPersistStreamInit_Release( pPSInit
);
1047 WARN("cannot get IID_IPersistStreamInit out of control\n");
1049 IOleObject_QueryInterface( pControl
, &IID_IUnknown
, (void**) &pUnkControl
);
1050 IOleObject_Release( pControl
);
1053 hRes
= AtlAxAttachControl( pUnkControl
, hWnd
, &pContainer
);
1054 if ( FAILED( hRes
) )
1055 WARN("cannot attach control to window\n");
1057 if ( content
== IsURL
)
1059 IWebBrowser2
*browser
;
1061 hRes
= IOleObject_QueryInterface( pControl
, &IID_IWebBrowser2
, (void**) &browser
);
1063 WARN( "Cannot query IWebBrowser2 interface: %08x\n", hRes
);
1067 IWebBrowser2_put_Visible( browser
, VARIANT_TRUE
); /* it seems that native does this on URL (but do not on MSHTML:! why? */
1069 V_VT(&url
) = VT_BSTR
;
1070 V_BSTR(&url
) = SysAllocString( lpszName
);
1072 hRes
= IWebBrowser2_Navigate2( browser
, &url
, NULL
, NULL
, NULL
, NULL
);
1073 if ( FAILED( hRes
) )
1074 WARN( "IWebBrowser2::Navigate2 failed: %08x\n", hRes
);
1075 SysFreeString( V_BSTR(&url
) );
1077 IWebBrowser2_Release( browser
);
1083 *ppUnkContainer
= pContainer
;
1085 IUnknown_AddRef( pContainer
);
1089 *ppUnkControl
= pUnkControl
;
1091 IUnknown_AddRef( pUnkControl
);
1095 IUnknown_Release( pUnkControl
);
1097 IUnknown_Release( pContainer
);
1102 /***********************************************************************
1103 * AtlAxAttachControl [atl100.@]
1105 HRESULT WINAPI
AtlAxAttachControl(IUnknown
* pControl
, HWND hWnd
, IUnknown
** ppUnkContainer
)
1107 IOCS
*pUnkContainer
;
1110 TRACE( "%p %p %p\n", pControl
, hWnd
, ppUnkContainer
);
1113 return E_INVALIDARG
;
1115 hr
= IOCS_Create( hWnd
, pControl
, &pUnkContainer
);
1116 if ( SUCCEEDED( hr
) && ppUnkContainer
)
1118 *ppUnkContainer
= (IUnknown
*) pUnkContainer
;
1127 /**********************************************************************
1128 * Helper function for AX_ConvertDialogTemplate
1130 static inline BOOL
advance_array(WORD
**pptr
, DWORD
*palloc
, DWORD
*pfilled
, const WORD
*data
, DWORD size
)
1132 if ( (*pfilled
+ size
) > *palloc
)
1134 *palloc
= ((*pfilled
+size
) + 0xFF) & ~0xFF;
1135 *pptr
= HeapReAlloc( GetProcessHeap(), 0, *pptr
, *palloc
* sizeof(WORD
) );
1139 RtlMoveMemory( *pptr
+*pfilled
, data
, size
* sizeof(WORD
) );
1144 /**********************************************************************
1145 * Convert ActiveX control templates to AtlAxWin class instances
1147 static LPDLGTEMPLATEW
AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl
)
1149 #define GET_WORD(x) (*(const WORD *)(x))
1150 #define GET_DWORD(x) (*(const DWORD *)(x))
1151 #define PUT_BLOCK(x,y) do {if (!advance_array(&output, &allocated, &filled, (x), (y))) return NULL;} while (0)
1152 #define PUT_WORD(x) do {WORD w = (x);PUT_BLOCK(&w, 1);} while(0)
1153 #define PUT_DWORD(x) do {DWORD w = (x);PUT_BLOCK(&w, 2);} while(0)
1154 const WORD
*tmp
, *src
= (const WORD
*)src_tmpl
;
1156 DWORD allocated
, filled
; /* in WORDs */
1158 WORD signature
, dlgver
, rescount
;
1161 filled
= 0; allocated
= 256;
1162 output
= HeapAlloc( GetProcessHeap(), 0, allocated
* sizeof(WORD
) );
1168 signature
= GET_WORD(src
);
1169 dlgver
= GET_WORD(src
+ 1);
1170 if (signature
== 1 && dlgver
== 0xFFFF)
1174 style
= GET_DWORD(src
);
1176 rescount
= GET_WORD(src
++);
1178 if ( GET_WORD(src
) == 0xFFFF ) /* menu */
1181 src
+= strlenW(src
) + 1;
1182 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1185 src
+= strlenW(src
) + 1;
1186 src
+= strlenW(src
) + 1; /* title */
1187 if ( style
& (DS_SETFONT
| DS_SHELLFONT
) )
1190 src
+= strlenW(src
) + 1;
1194 style
= GET_DWORD(src
);
1196 rescount
= GET_WORD(src
++);
1198 if ( GET_WORD(src
) == 0xFFFF ) /* menu */
1201 src
+= strlenW(src
) + 1;
1202 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1205 src
+= strlenW(src
) + 1;
1206 src
+= strlenW(src
) + 1; /* title */
1207 if ( style
& DS_SETFONT
)
1210 src
+= strlenW(src
) + 1;
1213 PUT_BLOCK(tmp
, src
-tmp
);
1217 src
= (const WORD
*)( ( ((ULONG_PTR
)src
) + 3) & ~3); /* align on DWORD boundary */
1218 filled
= (filled
+ 1) & ~1; /* depends on DWORD-aligned allocation unit */
1225 PUT_BLOCK(tmp
, src
-tmp
);
1228 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1233 src
+= strlenW(src
) + 1;
1235 src
+= strlenW(src
) + 1; /* title */
1236 if ( GET_WORD(tmp
) == '{' ) /* all this mess created because of this line */
1238 static const WCHAR AtlAxWin
[] = {'A','t','l','A','x','W','i','n', 0};
1239 PUT_BLOCK(AtlAxWin
, sizeof(AtlAxWin
)/sizeof(WCHAR
));
1240 PUT_BLOCK(tmp
, strlenW(tmp
)+1);
1242 PUT_BLOCK(tmp
, src
-tmp
);
1244 if ( GET_WORD(src
) )
1246 WORD size
= (GET_WORD(src
)+sizeof(WORD
)-1) / sizeof(WORD
); /* quite ugly :( Maybe use BYTE* instead of WORD* everywhere ? */
1247 PUT_BLOCK(src
, size
);
1256 return (LPDLGTEMPLATEW
) output
;
1259 /***********************************************************************
1260 * AtlAxCreateDialogA [atl100.@]
1262 * Creates a dialog window
1265 * hInst [I] Application instance
1266 * name [I] Dialog box template name
1267 * owner [I] Dialog box parent HWND
1268 * dlgProc [I] Dialog box procedure
1269 * param [I] This value will be passed to dlgProc as WM_INITDIALOG's message lParam
1272 * Window handle of dialog window.
1274 HWND WINAPI
AtlAxCreateDialogA(HINSTANCE hInst
, LPCSTR name
, HWND owner
, DLGPROC dlgProc
,LPARAM param
)
1280 if (IS_INTRESOURCE(name
))
1281 return AtlAxCreateDialogW( hInst
, (LPCWSTR
) name
, owner
, dlgProc
, param
);
1283 length
= MultiByteToWideChar( CP_ACP
, 0, name
, -1, NULL
, 0 );
1284 nameW
= HeapAlloc( GetProcessHeap(), 0, length
* sizeof(WCHAR
) );
1287 MultiByteToWideChar( CP_ACP
, 0, name
, -1, nameW
, length
);
1288 res
= AtlAxCreateDialogW( hInst
, nameW
, owner
, dlgProc
, param
);
1289 HeapFree( GetProcessHeap(), 0, nameW
);
1294 /***********************************************************************
1295 * AtlAxCreateDialogW [atl100.@]
1297 * See AtlAxCreateDialogA
1300 HWND WINAPI
AtlAxCreateDialogW(HINSTANCE hInst
, LPCWSTR name
, HWND owner
, DLGPROC dlgProc
,LPARAM param
)
1304 LPCDLGTEMPLATEW ptr
;
1305 LPDLGTEMPLATEW newptr
;
1308 TRACE("(%p %s %p %p %lx)\n", hInst
, debugstr_w(name
), owner
, dlgProc
, param
);
1310 hrsrc
= FindResourceW( hInst
, name
, (LPWSTR
)RT_DIALOG
);
1313 hgl
= LoadResource (hInst
, hrsrc
);
1316 ptr
= LockResource ( hgl
);
1319 FreeResource( hgl
);
1322 newptr
= AX_ConvertDialogTemplate( ptr
);
1325 res
= CreateDialogIndirectParamW( hInst
, newptr
, owner
, dlgProc
, param
);
1326 HeapFree( GetProcessHeap(), 0, newptr
);
1329 FreeResource ( hrsrc
);
1333 /***********************************************************************
1334 * AtlAxGetHost [atl100.@]
1337 HRESULT WINAPI
AtlAxGetHost(HWND hWnd
, IUnknown
**pUnk
)
1341 TRACE( "(%p, %p)\n", hWnd
, pUnk
);
1345 This
= (IOCS
*) GetWindowLongPtrW( hWnd
, GWLP_USERDATA
);
1348 WARN("No container attached to %p\n", hWnd
);
1352 return IOCS_QueryInterface( This
, &IID_IUnknown
, (void**) pUnk
);
1355 /***********************************************************************
1356 * AtlAxGetControl [atl100.@]
1359 HRESULT WINAPI
AtlAxGetControl(HWND hWnd
, IUnknown
**pUnk
)
1363 TRACE( "(%p, %p)\n", hWnd
, pUnk
);
1367 This
= (IOCS
*) GetWindowLongPtrW( hWnd
, GWLP_USERDATA
);
1368 if ( !This
|| !This
->control
)
1370 WARN("No control attached to %p\n", hWnd
);
1374 return IOleObject_QueryInterface( This
->control
, &IID_IUnknown
, (void**) pUnk
);
1377 /***********************************************************************
1378 * AtlAxDialogBoxW [atl100.35]
1381 INT_PTR WINAPI
AtlAxDialogBoxW(HINSTANCE hInstance
, LPCWSTR lpTemplateName
, HWND hWndParent
, DLGPROC lpDialogProc
,
1384 FIXME("(%p %s %p %p %lx)\n", hInstance
, debugstr_w(lpTemplateName
), hWndParent
, lpDialogProc
, dwInitParam
);
1388 /***********************************************************************
1389 * AtlAxDialogBoxA [atl100.36]
1392 INT_PTR WINAPI
AtlAxDialogBoxA(HINSTANCE hInstance
, LPCSTR lpTemplateName
, HWND hWndParent
, DLGPROC lpDialogProc
,
1395 FIXME("(%p %s %p %p %lx)\n", hInstance
, debugstr_a(lpTemplateName
), hWndParent
, lpDialogProc
, dwInitParam
);