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
25 #include <wine/atlwin.h>
28 IOleClientSite IOleClientSite_iface
;
29 IOleContainer IOleContainer_iface
;
30 IOleInPlaceSiteWindowless IOleInPlaceSiteWindowless_iface
;
31 IOleInPlaceFrame IOleInPlaceFrame_iface
;
32 IOleControlSite IOleControlSite_iface
;
39 BOOL fActive
, fInPlace
, fWindowless
;
42 /**********************************************************************
43 * AtlAxWin class window procedure
45 static LRESULT CALLBACK
AtlAxWin_wndproc( HWND hWnd
, UINT wMsg
, WPARAM wParam
, LPARAM lParam
)
47 if ( wMsg
== WM_CREATE
)
49 DWORD len
= GetWindowTextLengthW( hWnd
) + 1;
50 WCHAR
*ptr
= HeapAlloc( GetProcessHeap(), 0, len
*sizeof(WCHAR
) );
53 GetWindowTextW( hWnd
, ptr
, len
);
54 AtlAxCreateControlEx( ptr
, hWnd
, NULL
, NULL
, NULL
, NULL
, NULL
);
55 HeapFree( GetProcessHeap(), 0, ptr
);
58 return DefWindowProcW( hWnd
, wMsg
, wParam
, lParam
);
61 /***********************************************************************
62 * AtlAxWinInit [atl100.@]
63 * Initializes the control-hosting code: registering the AtlAxWin,
64 * AtlAxWin7 and AtlAxWinLic7 window classes and some messages.
70 BOOL WINAPI
AtlAxWinInit(void)
74 #if _ATL_VER <= _ATL_VER_30
75 #define ATL_NAME_SUFFIX 0
76 #elif _ATL_VER == _ATL_VER_80
77 #define ATL_NAME_SUFFIX '8','0',0
78 #elif _ATL_VER == _ATL_VER_90
79 #define ATL_NAME_SUFFIX '9','0',0
80 #elif _ATL_VER == _ATL_VER_100
81 #define ATL_NAME_SUFFIX '1','0','0',0
82 #elif _ATL_VER == _ATL_VER_110
83 #define ATL_NAME_SUFFIX '1','1','0',0
85 #error Unsupported version
88 const WCHAR AtlAxWinW
[] = {'A','t','l','A','x','W','i','n',ATL_NAME_SUFFIX
};
90 FIXME("version %04x semi-stub\n", _ATL_VER
);
92 if ( FAILED( OleInitialize(NULL
) ) )
95 wcex
.cbSize
= sizeof(wcex
);
96 wcex
.style
= CS_GLOBALCLASS
| (_ATL_VER
> _ATL_VER_30
? CS_DBLCLKS
: 0);
99 wcex
.hInstance
= GetModuleHandleW( NULL
);
102 wcex
.hbrBackground
= NULL
;
103 wcex
.lpszMenuName
= NULL
;
106 wcex
.lpfnWndProc
= AtlAxWin_wndproc
;
107 wcex
.lpszClassName
= AtlAxWinW
;
108 if ( !RegisterClassExW( &wcex
) )
111 if(_ATL_VER
> _ATL_VER_30
) {
112 const WCHAR AtlAxWinLicW
[] = {'A','t','l','A','x','W','i','n','L','i','c',ATL_NAME_SUFFIX
};
114 wcex
.lpszClassName
= AtlAxWinLicW
;
115 if ( !RegisterClassExW( &wcex
) )
122 /***********************************************************************
123 * Atl container component implementation
127 static ULONG
IOCS_AddRef(IOCS
*This
)
129 ULONG ref
= InterlockedIncrement(&This
->ref
);
131 TRACE( "(%p) : AddRef from %d\n", This
, ref
- 1 );
136 static HRESULT
IOCS_QueryInterface(IOCS
*This
, REFIID riid
, void **ppv
)
140 if ( IsEqualIID( &IID_IUnknown
, riid
)
141 || IsEqualIID( &IID_IOleClientSite
, riid
) )
143 *ppv
= &This
->IOleClientSite_iface
;
144 } else if ( IsEqualIID( &IID_IOleContainer
, riid
) )
146 *ppv
= &This
->IOleContainer_iface
;
147 } else if ( IsEqualIID( &IID_IOleInPlaceSite
, riid
) || IsEqualIID( &IID_IOleInPlaceSiteEx
, riid
) || IsEqualIID( &IID_IOleInPlaceSiteWindowless
, riid
) )
149 *ppv
= &This
->IOleInPlaceSiteWindowless_iface
;
150 } else if ( IsEqualIID( &IID_IOleInPlaceFrame
, riid
) )
152 *ppv
= &This
->IOleInPlaceFrame_iface
;
153 } else if ( IsEqualIID( &IID_IOleControlSite
, riid
) )
155 *ppv
= &This
->IOleControlSite_iface
;
164 WARN("unsupported interface %s\n", debugstr_guid( riid
) );
166 return E_NOINTERFACE
;
169 static HRESULT
IOCS_Detach( IOCS
*This
);
170 static ULONG
IOCS_Release(IOCS
*This
)
172 ULONG ref
= InterlockedDecrement(&This
->ref
);
174 TRACE( "(%p) : ReleaseRef to %d\n", This
, ref
);
179 HeapFree( GetProcessHeap(), 0, This
);
185 /****** IOleClientSite *****/
186 static inline IOCS
*impl_from_IOleClientSite(IOleClientSite
*iface
)
188 return CONTAINING_RECORD(iface
, IOCS
, IOleClientSite_iface
);
191 static HRESULT WINAPI
OleClientSite_QueryInterface(IOleClientSite
*iface
, REFIID riid
, void **ppv
)
193 IOCS
*This
= impl_from_IOleClientSite(iface
);
194 return IOCS_QueryInterface(This
, riid
, ppv
);
197 static ULONG WINAPI
OleClientSite_AddRef(IOleClientSite
*iface
)
199 IOCS
*This
= impl_from_IOleClientSite(iface
);
200 return IOCS_AddRef(This
);
203 static ULONG WINAPI
OleClientSite_Release(IOleClientSite
*iface
)
205 IOCS
*This
= impl_from_IOleClientSite(iface
);
206 return IOCS_Release(This
);
209 static HRESULT WINAPI
OleClientSite_SaveObject(IOleClientSite
*iface
)
211 IOCS
*This
= impl_from_IOleClientSite(iface
);
212 FIXME( "(%p) - stub\n", This
);
216 static HRESULT WINAPI
OleClientSite_GetMoniker(IOleClientSite
*iface
, DWORD dwAssign
, DWORD dwWhichMoniker
, IMoniker
**ppmk
)
218 IOCS
*This
= impl_from_IOleClientSite(iface
);
220 FIXME( "(%p, 0x%x, 0x%x, %p)\n", This
, dwAssign
, dwWhichMoniker
, ppmk
);
224 static HRESULT WINAPI
OleClientSite_GetContainer(IOleClientSite
*iface
, IOleContainer
**ppContainer
)
226 IOCS
*This
= impl_from_IOleClientSite(iface
);
227 TRACE( "(%p, %p)\n", This
, ppContainer
);
228 return OleClientSite_QueryInterface( iface
, &IID_IOleContainer
, (void**)ppContainer
);
231 static HRESULT WINAPI
OleClientSite_ShowObject(IOleClientSite
*iface
)
233 IOCS
*This
= impl_from_IOleClientSite(iface
);
234 FIXME( "(%p) - stub\n", This
);
238 static HRESULT WINAPI
OleClientSite_OnShowWindow(IOleClientSite
*iface
, BOOL fShow
)
240 IOCS
*This
= impl_from_IOleClientSite(iface
);
241 FIXME( "(%p, %s) - stub\n", This
, fShow
? "TRUE" : "FALSE" );
245 static HRESULT WINAPI
OleClientSite_RequestNewObjectLayout(IOleClientSite
*iface
)
247 IOCS
*This
= impl_from_IOleClientSite(iface
);
248 FIXME( "(%p) - stub\n", This
);
253 /****** IOleContainer *****/
254 static inline IOCS
*impl_from_IOleContainer(IOleContainer
*iface
)
256 return CONTAINING_RECORD(iface
, IOCS
, IOleContainer_iface
);
259 static HRESULT WINAPI
OleContainer_QueryInterface( IOleContainer
* iface
, REFIID riid
, void** ppv
)
261 IOCS
*This
= impl_from_IOleContainer(iface
);
262 return IOCS_QueryInterface( This
, riid
, ppv
);
265 static ULONG WINAPI
OleContainer_AddRef(IOleContainer
* iface
)
267 IOCS
*This
= impl_from_IOleContainer(iface
);
268 return IOCS_AddRef(This
);
271 static ULONG WINAPI
OleContainer_Release(IOleContainer
* iface
)
273 IOCS
*This
= impl_from_IOleContainer(iface
);
274 return IOCS_Release(This
);
277 static HRESULT WINAPI
OleContainer_ParseDisplayName(IOleContainer
* iface
, IBindCtx
* pbc
,
278 LPOLESTR pszDisplayName
, ULONG
* pchEaten
, IMoniker
** ppmkOut
)
280 IOCS
*This
= impl_from_IOleContainer(iface
);
281 FIXME( "(%p,%p,%s,%p,%p) - stub\n", This
, pbc
, debugstr_w(pszDisplayName
), pchEaten
, ppmkOut
);
285 static HRESULT WINAPI
OleContainer_EnumObjects(IOleContainer
* iface
, DWORD grfFlags
, IEnumUnknown
** ppenum
)
287 IOCS
*This
= impl_from_IOleContainer(iface
);
288 FIXME( "(%p, %u, %p) - stub\n", This
, grfFlags
, ppenum
);
292 static HRESULT WINAPI
OleContainer_LockContainer(IOleContainer
* iface
, BOOL fLock
)
294 IOCS
*This
= impl_from_IOleContainer(iface
);
295 FIXME( "(%p, %s) - stub\n", This
, fLock
?"TRUE":"FALSE" );
300 /****** IOleInPlaceSiteWindowless *******/
301 static inline IOCS
*impl_from_IOleInPlaceSiteWindowless(IOleInPlaceSiteWindowless
*iface
)
303 return CONTAINING_RECORD(iface
, IOCS
, IOleInPlaceSiteWindowless_iface
);
306 static HRESULT WINAPI
OleInPlaceSiteWindowless_QueryInterface(IOleInPlaceSiteWindowless
*iface
, REFIID riid
, void **ppv
)
308 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
309 return IOCS_QueryInterface(This
, riid
, ppv
);
312 static ULONG WINAPI
OleInPlaceSiteWindowless_AddRef(IOleInPlaceSiteWindowless
*iface
)
314 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
315 return IOCS_AddRef(This
);
318 static ULONG WINAPI
OleInPlaceSiteWindowless_Release(IOleInPlaceSiteWindowless
*iface
)
320 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
321 return IOCS_Release(This
);
324 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetWindow(IOleInPlaceSiteWindowless
* iface
, HWND
* phwnd
)
326 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
328 TRACE("(%p,%p)\n", This
, phwnd
);
333 static HRESULT WINAPI
OleInPlaceSiteWindowless_ContextSensitiveHelp(IOleInPlaceSiteWindowless
* iface
, BOOL fEnterMode
)
335 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
336 FIXME("(%p,%d) - stub\n", This
, fEnterMode
);
340 static HRESULT WINAPI
OleInPlaceSiteWindowless_CanInPlaceActivate(IOleInPlaceSiteWindowless
*iface
)
342 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
343 TRACE("(%p)\n", This
);
347 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceActivate(IOleInPlaceSiteWindowless
*iface
)
349 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
351 TRACE("(%p)\n", This
);
353 This
->fInPlace
= TRUE
;
357 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnUIActivate(IOleInPlaceSiteWindowless
*iface
)
359 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
361 TRACE("(%p)\n", This
);
365 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetWindowContext(IOleInPlaceSiteWindowless
*iface
,
366 IOleInPlaceFrame
**ppFrame
, IOleInPlaceUIWindow
**ppDoc
, LPRECT lprcPosRect
,
367 LPRECT lprcClipRect
, LPOLEINPLACEFRAMEINFO lpFrameInfo
)
369 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
371 TRACE("(%p,%p,%p,%p,%p,%p)\n", This
, ppFrame
, ppDoc
, lprcPosRect
, lprcClipRect
, lpFrameInfo
);
374 *lprcClipRect
= This
->size
;
376 *lprcPosRect
= This
->size
;
380 IOCS_QueryInterface( This
, &IID_IOleInPlaceFrame
, (void**) ppFrame
);
388 lpFrameInfo
->fMDIApp
= FALSE
;
389 lpFrameInfo
->hwndFrame
= This
->hWnd
;
390 lpFrameInfo
->haccel
= NULL
;
391 lpFrameInfo
->cAccelEntries
= 0;
397 static HRESULT WINAPI
OleInPlaceSiteWindowless_Scroll(IOleInPlaceSiteWindowless
*iface
, SIZE scrollExtent
)
399 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
400 FIXME("(%p) - stub\n", This
);
404 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnUIDeactivate(IOleInPlaceSiteWindowless
*iface
, BOOL fUndoable
)
406 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
407 FIXME("(%p,%d) - stub\n", This
, fUndoable
);
411 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceDeactivate(IOleInPlaceSiteWindowless
*iface
)
413 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
415 TRACE("(%p)\n", This
);
417 This
->fInPlace
= This
->fWindowless
= FALSE
;
421 static HRESULT WINAPI
OleInPlaceSiteWindowless_DiscardUndoState(IOleInPlaceSiteWindowless
*iface
)
423 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
424 FIXME("(%p) - stub\n", This
);
428 static HRESULT WINAPI
OleInPlaceSiteWindowless_DeactivateAndUndo(IOleInPlaceSiteWindowless
*iface
)
430 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
431 FIXME("(%p) - stub\n", This
);
435 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnPosRectChange(IOleInPlaceSiteWindowless
*iface
, LPCRECT lprcPosRect
)
437 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
438 FIXME("(%p,%p) - stub\n", This
, lprcPosRect
);
442 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceActivateEx( IOleInPlaceSiteWindowless
*iface
, BOOL
* pfNoRedraw
, DWORD dwFlags
)
444 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
448 This
->fActive
= This
->fInPlace
= TRUE
;
449 if ( dwFlags
& ACTIVATE_WINDOWLESS
)
450 This
->fWindowless
= TRUE
;
454 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnInPlaceDeactivateEx( IOleInPlaceSiteWindowless
*iface
, BOOL fNoRedraw
)
456 IOCS
*This
= impl_from_IOleInPlaceSiteWindowless(iface
);
460 This
->fActive
= This
->fInPlace
= This
->fWindowless
= FALSE
;
463 static HRESULT WINAPI
OleInPlaceSiteWindowless_RequestUIActivate( IOleInPlaceSiteWindowless
*iface
)
468 static HRESULT WINAPI
OleInPlaceSiteWindowless_CanWindowlessActivate( IOleInPlaceSiteWindowless
*iface
)
473 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetCapture( IOleInPlaceSiteWindowless
*iface
)
478 static HRESULT WINAPI
OleInPlaceSiteWindowless_SetCapture( IOleInPlaceSiteWindowless
*iface
, BOOL fCapture
)
483 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetFocus( IOleInPlaceSiteWindowless
*iface
)
488 static HRESULT WINAPI
OleInPlaceSiteWindowless_SetFocus( IOleInPlaceSiteWindowless
*iface
, BOOL fFocus
)
493 static HRESULT WINAPI
OleInPlaceSiteWindowless_GetDC( IOleInPlaceSiteWindowless
*iface
, LPCRECT pRect
, DWORD grfFlags
, HDC
* phDC
)
498 static HRESULT WINAPI
OleInPlaceSiteWindowless_ReleaseDC( IOleInPlaceSiteWindowless
*iface
, HDC hDC
)
503 static HRESULT WINAPI
OleInPlaceSiteWindowless_InvalidateRect( IOleInPlaceSiteWindowless
*iface
, LPCRECT pRect
, BOOL fErase
)
508 static HRESULT WINAPI
OleInPlaceSiteWindowless_InvalidateRgn( IOleInPlaceSiteWindowless
*iface
, HRGN hRGN
, BOOL fErase
)
513 static HRESULT WINAPI
OleInPlaceSiteWindowless_ScrollRect( IOleInPlaceSiteWindowless
*iface
, INT dx
, INT dy
, LPCRECT pRectScroll
, LPCRECT pRectClip
)
518 static HRESULT WINAPI
OleInPlaceSiteWindowless_AdjustRect( IOleInPlaceSiteWindowless
*iface
, LPRECT prc
)
523 static HRESULT WINAPI
OleInPlaceSiteWindowless_OnDefWindowMessage( IOleInPlaceSiteWindowless
*iface
, UINT msg
, WPARAM wParam
, LPARAM lParam
, LRESULT
* plResult
)
530 /****** IOleInPlaceFrame *******/
531 static inline IOCS
*impl_from_IOleInPlaceFrame(IOleInPlaceFrame
*iface
)
533 return CONTAINING_RECORD(iface
, IOCS
, IOleInPlaceFrame_iface
);
536 static HRESULT WINAPI
OleInPlaceFrame_QueryInterface(IOleInPlaceFrame
*iface
, REFIID riid
, void **ppv
)
538 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
539 return IOCS_QueryInterface(This
, riid
, ppv
);
542 static ULONG WINAPI
OleInPlaceFrame_AddRef(IOleInPlaceFrame
*iface
)
544 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
545 return IOCS_AddRef(This
);
548 static ULONG WINAPI
OleInPlaceFrame_Release(IOleInPlaceFrame
*iface
)
550 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
551 return IOCS_Release(This
);
554 static HRESULT WINAPI
OleInPlaceFrame_GetWindow(IOleInPlaceFrame
*iface
, HWND
*phWnd
)
556 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
558 TRACE( "(%p,%p)\n", This
, phWnd
);
564 static HRESULT WINAPI
OleInPlaceFrame_ContextSensitiveHelp(IOleInPlaceFrame
*iface
, BOOL fEnterMode
)
566 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
568 FIXME( "(%p,%d) - stub\n", This
, fEnterMode
);
572 static HRESULT WINAPI
OleInPlaceFrame_GetBorder(IOleInPlaceFrame
*iface
, LPRECT lprectBorder
)
574 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
576 FIXME( "(%p,%p) - stub\n", This
, lprectBorder
);
580 static HRESULT WINAPI
OleInPlaceFrame_RequestBorderSpace(IOleInPlaceFrame
*iface
, LPCBORDERWIDTHS pborderwidths
)
582 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
584 FIXME( "(%p,%p) - stub\n", This
, pborderwidths
);
588 static HRESULT WINAPI
OleInPlaceFrame_SetBorderSpace(IOleInPlaceFrame
*iface
, LPCBORDERWIDTHS pborderwidths
)
590 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
592 FIXME( "(%p,%p) - stub\n", This
, pborderwidths
);
596 static HRESULT WINAPI
OleInPlaceFrame_SetActiveObject(IOleInPlaceFrame
*iface
, IOleInPlaceActiveObject
*pActiveObject
, LPCOLESTR pszObjName
)
598 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
600 FIXME( "(%p,%p,%s) - stub\n", This
, pActiveObject
, debugstr_w(pszObjName
) );
604 static HRESULT WINAPI
OleInPlaceFrame_InsertMenus(IOleInPlaceFrame
*iface
, HMENU hmenuShared
, LPOLEMENUGROUPWIDTHS lpMenuWidths
)
606 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
608 FIXME( "(%p,%p,%p) - stub\n", This
, hmenuShared
, lpMenuWidths
);
612 static HRESULT WINAPI
OleInPlaceFrame_SetMenu(IOleInPlaceFrame
*iface
, HMENU hmenuShared
, HOLEMENU holemenu
, HWND hwndActiveObject
)
614 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
616 FIXME( "(%p,%p,%p,%p) - stub\n", This
, hmenuShared
, holemenu
, hwndActiveObject
);
620 static HRESULT WINAPI
OleInPlaceFrame_RemoveMenus(IOleInPlaceFrame
*iface
, HMENU hmenuShared
)
622 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
624 FIXME( "(%p, %p) - stub\n", This
, hmenuShared
);
628 static HRESULT WINAPI
OleInPlaceFrame_SetStatusText(IOleInPlaceFrame
*iface
, LPCOLESTR pszStatusText
)
630 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
632 FIXME( "(%p, %s) - stub\n", This
, debugstr_w( pszStatusText
) );
636 static HRESULT WINAPI
OleInPlaceFrame_EnableModeless(IOleInPlaceFrame
*iface
, BOOL fEnable
)
638 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
640 FIXME( "(%p, %d) - stub\n", This
, fEnable
);
644 static HRESULT WINAPI
OleInPlaceFrame_TranslateAccelerator(IOleInPlaceFrame
*iface
, LPMSG lpmsg
, WORD wID
)
646 IOCS
*This
= impl_from_IOleInPlaceFrame(iface
);
648 FIXME( "(%p, %p, %x) - stub\n", This
, lpmsg
, wID
);
653 /****** IOleControlSite *******/
654 static inline IOCS
*impl_from_IOleControlSite(IOleControlSite
*iface
)
656 return CONTAINING_RECORD(iface
, IOCS
, IOleControlSite_iface
);
659 static HRESULT WINAPI
OleControlSite_QueryInterface(IOleControlSite
*iface
, REFIID riid
, void **ppv
)
661 IOCS
*This
= impl_from_IOleControlSite(iface
);
662 return IOCS_QueryInterface(This
, riid
, ppv
);
665 static ULONG WINAPI
OleControlSite_AddRef(IOleControlSite
*iface
)
667 IOCS
*This
= impl_from_IOleControlSite(iface
);
668 return IOCS_AddRef(This
);
671 static ULONG WINAPI
OleControlSite_Release(IOleControlSite
*iface
)
673 IOCS
*This
= impl_from_IOleControlSite(iface
);
674 return IOCS_Release(This
);
677 static HRESULT WINAPI
OleControlSite_OnControlInfoChanged( IOleControlSite
* This
)
682 static HRESULT WINAPI
OleControlSite_LockInPlaceActive( IOleControlSite
* This
, BOOL fLock
)
687 static HRESULT WINAPI
OleControlSite_GetExtendedControl( IOleControlSite
* This
, IDispatch
** ppDisp
)
692 static HRESULT WINAPI
OleControlSite_TransformCoords( IOleControlSite
* This
, POINTL
* pPtlHimetric
, POINTF
* pPtfContainer
, DWORD dwFlags
)
697 static HRESULT WINAPI
OleControlSite_TranslateAccelerator( IOleControlSite
* This
, MSG
* pMsg
, DWORD grfModifiers
)
702 static HRESULT WINAPI
OleControlSite_OnFocus( IOleControlSite
* This
, BOOL fGotFocus
)
707 static HRESULT WINAPI
OleControlSite_ShowPropertyFrame( IOleControlSite
* This
)
714 static const IOleClientSiteVtbl OleClientSite_vtbl
= {
715 OleClientSite_QueryInterface
,
716 OleClientSite_AddRef
,
717 OleClientSite_Release
,
718 OleClientSite_SaveObject
,
719 OleClientSite_GetMoniker
,
720 OleClientSite_GetContainer
,
721 OleClientSite_ShowObject
,
722 OleClientSite_OnShowWindow
,
723 OleClientSite_RequestNewObjectLayout
725 static const IOleContainerVtbl OleContainer_vtbl
= {
726 OleContainer_QueryInterface
,
728 OleContainer_Release
,
729 OleContainer_ParseDisplayName
,
730 OleContainer_EnumObjects
,
731 OleContainer_LockContainer
733 static const IOleInPlaceSiteWindowlessVtbl OleInPlaceSiteWindowless_vtbl
= {
734 OleInPlaceSiteWindowless_QueryInterface
,
735 OleInPlaceSiteWindowless_AddRef
,
736 OleInPlaceSiteWindowless_Release
,
737 OleInPlaceSiteWindowless_GetWindow
,
738 OleInPlaceSiteWindowless_ContextSensitiveHelp
,
739 OleInPlaceSiteWindowless_CanInPlaceActivate
,
740 OleInPlaceSiteWindowless_OnInPlaceActivate
,
741 OleInPlaceSiteWindowless_OnUIActivate
,
742 OleInPlaceSiteWindowless_GetWindowContext
,
743 OleInPlaceSiteWindowless_Scroll
,
744 OleInPlaceSiteWindowless_OnUIDeactivate
,
745 OleInPlaceSiteWindowless_OnInPlaceDeactivate
,
746 OleInPlaceSiteWindowless_DiscardUndoState
,
747 OleInPlaceSiteWindowless_DeactivateAndUndo
,
748 OleInPlaceSiteWindowless_OnPosRectChange
,
749 OleInPlaceSiteWindowless_OnInPlaceActivateEx
,
750 OleInPlaceSiteWindowless_OnInPlaceDeactivateEx
,
751 OleInPlaceSiteWindowless_RequestUIActivate
,
752 OleInPlaceSiteWindowless_CanWindowlessActivate
,
753 OleInPlaceSiteWindowless_GetCapture
,
754 OleInPlaceSiteWindowless_SetCapture
,
755 OleInPlaceSiteWindowless_GetFocus
,
756 OleInPlaceSiteWindowless_SetFocus
,
757 OleInPlaceSiteWindowless_GetDC
,
758 OleInPlaceSiteWindowless_ReleaseDC
,
759 OleInPlaceSiteWindowless_InvalidateRect
,
760 OleInPlaceSiteWindowless_InvalidateRgn
,
761 OleInPlaceSiteWindowless_ScrollRect
,
762 OleInPlaceSiteWindowless_AdjustRect
,
763 OleInPlaceSiteWindowless_OnDefWindowMessage
765 static const IOleInPlaceFrameVtbl OleInPlaceFrame_vtbl
=
767 OleInPlaceFrame_QueryInterface
,
768 OleInPlaceFrame_AddRef
,
769 OleInPlaceFrame_Release
,
770 OleInPlaceFrame_GetWindow
,
771 OleInPlaceFrame_ContextSensitiveHelp
,
772 OleInPlaceFrame_GetBorder
,
773 OleInPlaceFrame_RequestBorderSpace
,
774 OleInPlaceFrame_SetBorderSpace
,
775 OleInPlaceFrame_SetActiveObject
,
776 OleInPlaceFrame_InsertMenus
,
777 OleInPlaceFrame_SetMenu
,
778 OleInPlaceFrame_RemoveMenus
,
779 OleInPlaceFrame_SetStatusText
,
780 OleInPlaceFrame_EnableModeless
,
781 OleInPlaceFrame_TranslateAccelerator
783 static const IOleControlSiteVtbl OleControlSite_vtbl
=
785 OleControlSite_QueryInterface
,
786 OleControlSite_AddRef
,
787 OleControlSite_Release
,
788 OleControlSite_OnControlInfoChanged
,
789 OleControlSite_LockInPlaceActive
,
790 OleControlSite_GetExtendedControl
,
791 OleControlSite_TransformCoords
,
792 OleControlSite_TranslateAccelerator
,
793 OleControlSite_OnFocus
,
794 OleControlSite_ShowPropertyFrame
797 static HRESULT
IOCS_Detach( IOCS
*This
) /* remove subclassing */
801 SetWindowLongPtrW( This
->hWnd
, GWLP_WNDPROC
, (ULONG_PTR
) This
->OrigWndProc
);
802 SetWindowLongPtrW( This
->hWnd
, GWLP_USERDATA
, 0 );
807 IOleObject
*control
= This
->control
;
809 This
->control
= NULL
;
810 IOleObject_Close( control
, OLECLOSE_NOSAVE
);
811 IOleObject_SetClientSite( control
, NULL
);
812 IOleObject_Release( control
);
817 static void IOCS_OnSize( IOCS
* This
, LPCRECT rect
)
821 This
->size
.left
= rect
->left
; This
->size
.right
= rect
->right
; This
->size
.top
= rect
->top
; This
->size
.bottom
= rect
->bottom
;
823 if ( !This
->control
)
826 inPix
.cx
= rect
->right
- rect
->left
;
827 inPix
.cy
= rect
->bottom
- rect
->top
;
828 AtlPixelToHiMetric( &inPix
, &inHi
);
829 IOleObject_SetExtent( This
->control
, DVASPECT_CONTENT
, &inHi
);
831 if ( This
->fInPlace
)
833 IOleInPlaceObject
*wl
;
835 if ( SUCCEEDED( IOleObject_QueryInterface( This
->control
, &IID_IOleInPlaceObject
, (void**)&wl
) ) )
837 IOleInPlaceObject_SetObjectRects( wl
, rect
, rect
);
838 IOleInPlaceObject_Release( wl
);
843 static void IOCS_OnShow( IOCS
*This
, BOOL fShow
)
845 if (!This
->control
|| This
->fActive
|| !fShow
)
848 This
->fActive
= TRUE
;
851 static void IOCS_OnDraw( IOCS
*This
)
855 if ( !This
->control
|| !This
->fWindowless
)
858 if ( SUCCEEDED( IOleObject_QueryInterface( This
->control
, &IID_IViewObject
, (void**)&view
) ) )
860 HDC dc
= GetDC( This
->hWnd
);
863 rect
.left
= This
->size
.left
; rect
.top
= This
->size
.top
;
864 rect
.bottom
= This
->size
.bottom
; rect
.right
= This
->size
.right
;
866 IViewObject_Draw( view
, DVASPECT_CONTENT
, ~0, NULL
, NULL
, 0, dc
, &rect
, &rect
, NULL
, 0 );
867 IViewObject_Release( view
);
868 ReleaseDC( This
->hWnd
, dc
);
872 static LRESULT
IOCS_OnWndProc( IOCS
*This
, HWND hWnd
, UINT uMsg
, WPARAM wParam
, LPARAM lParam
)
874 WNDPROC OrigWndProc
= This
->OrigWndProc
;
885 r
.right
= LOWORD( lParam
);
886 r
.bottom
= HIWORD( lParam
);
887 IOCS_OnSize( This
, &r
);
891 IOCS_OnShow( This
, (BOOL
) wParam
);
898 return CallWindowProcW( OrigWndProc
, hWnd
, uMsg
, wParam
, lParam
);
901 static LRESULT CALLBACK
AtlHost_wndproc( HWND hWnd
, UINT wMsg
, WPARAM wParam
, LPARAM lParam
)
903 IOCS
*This
= (IOCS
*) GetWindowLongPtrW( hWnd
, GWLP_USERDATA
);
904 return IOCS_OnWndProc( This
, hWnd
, wMsg
, wParam
, lParam
);
907 static HRESULT
IOCS_Attach( IOCS
*This
, HWND hWnd
, IUnknown
*pUnkControl
) /* subclass hWnd */
910 IUnknown_QueryInterface( pUnkControl
, &IID_IOleObject
, (void**)&This
->control
);
911 IOleObject_SetClientSite( This
->control
, &This
->IOleClientSite_iface
);
912 SetWindowLongPtrW( hWnd
, GWLP_USERDATA
, (ULONG_PTR
) This
);
913 This
->OrigWndProc
= (WNDPROC
)SetWindowLongPtrW( hWnd
, GWLP_WNDPROC
, (ULONG_PTR
) AtlHost_wndproc
);
918 static HRESULT
IOCS_Init( IOCS
*This
)
921 static const WCHAR AXWIN
[] = {'A','X','W','I','N',0};
923 IOleObject_SetHostNames( This
->control
, AXWIN
, AXWIN
);
925 GetClientRect( This
->hWnd
, &rect
);
926 IOCS_OnSize( This
, &rect
);
927 IOleObject_DoVerb( This
->control
, OLEIVERB_INPLACEACTIVATE
, NULL
, &This
->IOleClientSite_iface
,
928 0, This
->hWnd
, &rect
);
933 /**********************************************************************
934 * Create new instance of Atl host component and attach it to window *
936 static HRESULT
IOCS_Create( HWND hWnd
, IUnknown
*pUnkControl
, IOCS
**ppSite
)
942 This
= HeapAlloc(GetProcessHeap(), 0, sizeof(IOCS
));
945 return E_OUTOFMEMORY
;
947 This
->IOleClientSite_iface
.lpVtbl
= &OleClientSite_vtbl
;
948 This
->IOleContainer_iface
.lpVtbl
= &OleContainer_vtbl
;
949 This
->IOleInPlaceSiteWindowless_iface
.lpVtbl
= &OleInPlaceSiteWindowless_vtbl
;
950 This
->IOleInPlaceFrame_iface
.lpVtbl
= &OleInPlaceFrame_vtbl
;
951 This
->IOleControlSite_iface
.lpVtbl
= &OleControlSite_vtbl
;
954 This
->OrigWndProc
= NULL
;
956 This
->fWindowless
= This
->fActive
= This
->fInPlace
= FALSE
;
958 hr
= IOCS_Attach( This
, hWnd
, pUnkControl
);
959 if ( SUCCEEDED( hr
) )
960 hr
= IOCS_Init( This
);
961 if ( SUCCEEDED( hr
) )
964 IOCS_Release( This
);
970 /***********************************************************************
971 * AtlAxCreateControl [atl100.@]
973 HRESULT WINAPI
AtlAxCreateControl(LPCOLESTR lpszName
, HWND hWnd
,
974 IStream
*pStream
, IUnknown
**ppUnkContainer
)
976 return AtlAxCreateControlEx( lpszName
, hWnd
, pStream
, ppUnkContainer
,
980 /***********************************************************************
981 * AtlAxCreateControlEx [atl100.@]
984 * See http://www.codeproject.com/com/cwebpage.asp for some background
987 HRESULT WINAPI
AtlAxCreateControlEx(LPCOLESTR lpszName
, HWND hWnd
,
988 IStream
*pStream
, IUnknown
**ppUnkContainer
, IUnknown
**ppUnkControl
,
989 REFIID iidSink
, IUnknown
*punkSink
)
993 IOleObject
*pControl
;
994 IUnknown
*pUnkControl
;
995 IPersistStreamInit
*pPSInit
;
996 IUnknown
*pContainer
;
997 enum {IsGUID
=0,IsHTML
=1,IsURL
=2} content
;
999 TRACE("(%s %p %p %p %p %p %p)\n", debugstr_w(lpszName
), hWnd
, pStream
,
1000 ppUnkContainer
, ppUnkControl
, iidSink
, punkSink
);
1002 hRes
= CLSIDFromString( lpszName
, &controlId
);
1004 hRes
= CLSIDFromProgID( lpszName
, &controlId
);
1005 if ( SUCCEEDED( hRes
) )
1008 /* FIXME - check for MSHTML: prefix! */
1010 controlId
= CLSID_WebBrowser
;
1013 hRes
= CoCreateInstance( &controlId
, 0, CLSCTX_ALL
, &IID_IOleObject
,
1014 (void**) &pControl
);
1015 if ( FAILED( hRes
) )
1017 WARN( "cannot create ActiveX control %s instance - error 0x%08x\n",
1018 debugstr_guid( &controlId
), hRes
);
1022 hRes
= IOleObject_QueryInterface( pControl
, &IID_IPersistStreamInit
, (void**) &pPSInit
);
1023 if ( SUCCEEDED( hRes
) )
1026 IPersistStreamInit_InitNew( pPSInit
);
1028 IPersistStreamInit_Load( pPSInit
, pStream
);
1029 IPersistStreamInit_Release( pPSInit
);
1031 WARN("cannot get IID_IPersistStreamInit out of control\n");
1033 IOleObject_QueryInterface( pControl
, &IID_IUnknown
, (void**) &pUnkControl
);
1034 IOleObject_Release( pControl
);
1037 hRes
= AtlAxAttachControl( pUnkControl
, hWnd
, &pContainer
);
1038 if ( FAILED( hRes
) )
1039 WARN("cannot attach control to window\n");
1041 if ( content
== IsURL
)
1043 IWebBrowser2
*browser
;
1045 hRes
= IOleObject_QueryInterface( pControl
, &IID_IWebBrowser2
, (void**) &browser
);
1047 WARN( "Cannot query IWebBrowser2 interface: %08x\n", hRes
);
1051 IWebBrowser2_put_Visible( browser
, VARIANT_TRUE
); /* it seems that native does this on URL (but do not on MSHTML:! why? */
1053 V_VT(&url
) = VT_BSTR
;
1054 V_BSTR(&url
) = SysAllocString( lpszName
);
1056 hRes
= IWebBrowser2_Navigate2( browser
, &url
, NULL
, NULL
, NULL
, NULL
);
1057 if ( FAILED( hRes
) )
1058 WARN( "IWebBrowser2::Navigate2 failed: %08x\n", hRes
);
1059 SysFreeString( V_BSTR(&url
) );
1061 IWebBrowser2_Release( browser
);
1067 *ppUnkContainer
= pContainer
;
1069 IUnknown_AddRef( pContainer
);
1073 *ppUnkControl
= pUnkControl
;
1075 IUnknown_AddRef( pUnkControl
);
1079 IUnknown_Release( pUnkControl
);
1081 IUnknown_Release( pContainer
);
1086 /***********************************************************************
1087 * AtlAxAttachControl [atl100.@]
1089 HRESULT WINAPI
AtlAxAttachControl(IUnknown
* pControl
, HWND hWnd
, IUnknown
** ppUnkContainer
)
1091 IOCS
*pUnkContainer
;
1094 TRACE( "%p %p %p\n", pControl
, hWnd
, ppUnkContainer
);
1097 return E_INVALIDARG
;
1099 hr
= IOCS_Create( hWnd
, pControl
, &pUnkContainer
);
1100 if ( SUCCEEDED( hr
) && ppUnkContainer
)
1102 *ppUnkContainer
= (IUnknown
*) pUnkContainer
;
1111 /**********************************************************************
1112 * Helper function for AX_ConvertDialogTemplate
1114 static inline BOOL
advance_array(WORD
**pptr
, DWORD
*palloc
, DWORD
*pfilled
, const WORD
*data
, DWORD size
)
1116 if ( (*pfilled
+ size
) > *palloc
)
1118 *palloc
= ((*pfilled
+size
) + 0xFF) & ~0xFF;
1119 *pptr
= HeapReAlloc( GetProcessHeap(), 0, *pptr
, *palloc
* sizeof(WORD
) );
1123 RtlMoveMemory( *pptr
+*pfilled
, data
, size
* sizeof(WORD
) );
1128 /**********************************************************************
1129 * Convert ActiveX control templates to AtlAxWin class instances
1131 static LPDLGTEMPLATEW
AX_ConvertDialogTemplate(LPCDLGTEMPLATEW src_tmpl
)
1133 #define GET_WORD(x) (*(const WORD *)(x))
1134 #define GET_DWORD(x) (*(const DWORD *)(x))
1135 #define PUT_BLOCK(x,y) do {if (!advance_array(&output, &allocated, &filled, (x), (y))) return NULL;} while (0)
1136 #define PUT_WORD(x) do {WORD w = (x);PUT_BLOCK(&w, 1);} while(0)
1137 #define PUT_DWORD(x) do {DWORD w = (x);PUT_BLOCK(&w, 2);} while(0)
1138 const WORD
*tmp
, *src
= (const WORD
*)src_tmpl
;
1140 DWORD allocated
, filled
; /* in WORDs */
1142 WORD signature
, dlgver
, rescount
;
1145 filled
= 0; allocated
= 256;
1146 output
= HeapAlloc( GetProcessHeap(), 0, allocated
* sizeof(WORD
) );
1152 signature
= GET_WORD(src
);
1153 dlgver
= GET_WORD(src
+ 1);
1154 if (signature
== 1 && dlgver
== 0xFFFF)
1158 style
= GET_DWORD(src
);
1160 rescount
= GET_WORD(src
++);
1162 if ( GET_WORD(src
) == 0xFFFF ) /* menu */
1165 src
+= strlenW(src
) + 1;
1166 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1169 src
+= strlenW(src
) + 1;
1170 src
+= strlenW(src
) + 1; /* title */
1171 if ( style
& (DS_SETFONT
| DS_SHELLFONT
) )
1174 src
+= strlenW(src
) + 1;
1178 style
= GET_DWORD(src
);
1180 rescount
= GET_WORD(src
++);
1182 if ( GET_WORD(src
) == 0xFFFF ) /* menu */
1185 src
+= strlenW(src
) + 1;
1186 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1189 src
+= strlenW(src
) + 1;
1190 src
+= strlenW(src
) + 1; /* title */
1191 if ( style
& DS_SETFONT
)
1194 src
+= strlenW(src
) + 1;
1197 PUT_BLOCK(tmp
, src
-tmp
);
1201 src
= (const WORD
*)( ( ((ULONG_PTR
)src
) + 3) & ~3); /* align on DWORD boundary */
1202 filled
= (filled
+ 1) & ~1; /* depends on DWORD-aligned allocation unit */
1209 PUT_BLOCK(tmp
, src
-tmp
);
1212 if ( GET_WORD(src
) == 0xFFFF ) /* class */
1217 src
+= strlenW(src
) + 1;
1219 src
+= strlenW(src
) + 1; /* title */
1220 if ( GET_WORD(tmp
) == '{' ) /* all this mess created because of this line */
1222 static const WCHAR AtlAxWin
[] = {'A','t','l','A','x','W','i','n', 0};
1223 PUT_BLOCK(AtlAxWin
, sizeof(AtlAxWin
)/sizeof(WCHAR
));
1224 PUT_BLOCK(tmp
, strlenW(tmp
)+1);
1226 PUT_BLOCK(tmp
, src
-tmp
);
1228 if ( GET_WORD(src
) )
1230 WORD size
= (GET_WORD(src
)+sizeof(WORD
)-1) / sizeof(WORD
); /* quite ugly :( Maybe use BYTE* instead of WORD* everywhere ? */
1231 PUT_BLOCK(src
, size
);
1240 return (LPDLGTEMPLATEW
) output
;
1243 /***********************************************************************
1244 * AtlAxCreateDialogA [atl100.@]
1246 * Creates a dialog window
1249 * hInst [I] Application instance
1250 * name [I] Dialog box template name
1251 * owner [I] Dialog box parent HWND
1252 * dlgProc [I] Dialog box procedure
1253 * param [I] This value will be passed to dlgProc as WM_INITDIALOG's message lParam
1256 * Window handle of dialog window.
1258 HWND WINAPI
AtlAxCreateDialogA(HINSTANCE hInst
, LPCSTR name
, HWND owner
, DLGPROC dlgProc
,LPARAM param
)
1264 if (IS_INTRESOURCE(name
))
1265 return AtlAxCreateDialogW( hInst
, (LPCWSTR
) name
, owner
, dlgProc
, param
);
1267 length
= MultiByteToWideChar( CP_ACP
, 0, name
, -1, NULL
, 0 );
1268 nameW
= HeapAlloc( GetProcessHeap(), 0, length
* sizeof(WCHAR
) );
1271 MultiByteToWideChar( CP_ACP
, 0, name
, -1, nameW
, length
);
1272 res
= AtlAxCreateDialogW( hInst
, nameW
, owner
, dlgProc
, param
);
1273 HeapFree( GetProcessHeap(), 0, nameW
);
1278 /***********************************************************************
1279 * AtlAxCreateDialogW [atl100.@]
1281 * See AtlAxCreateDialogA
1284 HWND WINAPI
AtlAxCreateDialogW(HINSTANCE hInst
, LPCWSTR name
, HWND owner
, DLGPROC dlgProc
,LPARAM param
)
1288 LPCDLGTEMPLATEW ptr
;
1289 LPDLGTEMPLATEW newptr
;
1292 TRACE("(%p %s %p %p %lx)\n", hInst
, debugstr_w(name
), owner
, dlgProc
, param
);
1294 hrsrc
= FindResourceW( hInst
, name
, (LPWSTR
)RT_DIALOG
);
1297 hgl
= LoadResource (hInst
, hrsrc
);
1300 ptr
= LockResource ( hgl
);
1303 FreeResource( hgl
);
1306 newptr
= AX_ConvertDialogTemplate( ptr
);
1309 res
= CreateDialogIndirectParamW( hInst
, newptr
, owner
, dlgProc
, param
);
1310 HeapFree( GetProcessHeap(), 0, newptr
);
1313 FreeResource ( hrsrc
);
1317 /***********************************************************************
1318 * AtlAxGetHost [atl100.@]
1321 HRESULT WINAPI
AtlAxGetHost(HWND hWnd
, IUnknown
**pUnk
)
1325 TRACE( "(%p, %p)\n", hWnd
, pUnk
);
1329 This
= (IOCS
*) GetWindowLongPtrW( hWnd
, GWLP_USERDATA
);
1332 WARN("No container attached to %p\n", hWnd
);
1336 return IOCS_QueryInterface( This
, &IID_IUnknown
, (void**) pUnk
);
1339 /***********************************************************************
1340 * AtlAxGetControl [atl100.@]
1343 HRESULT WINAPI
AtlAxGetControl(HWND hWnd
, IUnknown
**pUnk
)
1347 TRACE( "(%p, %p)\n", hWnd
, pUnk
);
1351 This
= (IOCS
*) GetWindowLongPtrW( hWnd
, GWLP_USERDATA
);
1352 if ( !This
|| !This
->control
)
1354 WARN("No control attached to %p\n", hWnd
);
1358 return IOleObject_QueryInterface( This
->control
, &IID_IUnknown
, (void**) pUnk
);
1361 /***********************************************************************
1362 * AtlAxDialogBoxW [atl100.35]
1365 INT_PTR WINAPI
AtlAxDialogBoxW(HINSTANCE hInstance
, LPCWSTR lpTemplateName
, HWND hWndParent
, DLGPROC lpDialogProc
,
1368 FIXME("(%p %s %p %p %lx)\n", hInstance
, debugstr_w(lpTemplateName
), hWndParent
, lpDialogProc
, dwInitParam
);
1372 /***********************************************************************
1373 * AtlAxDialogBoxA [atl100.36]
1376 INT_PTR WINAPI
AtlAxDialogBoxA(HINSTANCE hInstance
, LPCSTR lpTemplateName
, HWND hWndParent
, DLGPROC lpDialogProc
,
1379 FIXME("(%p %s %p %p %lx)\n", hInstance
, debugstr_a(lpTemplateName
), hWndParent
, lpDialogProc
, dwInitParam
);