2 * Copyright 2005-2006 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
34 #include "wine/debug.h"
36 #include "mshtml_private.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
40 static const WCHAR wszInternetExplorer_Server
[] =
41 {'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','_','S','e','r','v','e','r',0};
43 static const WCHAR wszTooltipData
[] = {'t','o','o','l','t','i','p','_','d','a','t','a',0};
45 static ATOM serverwnd_class
= 0;
52 static LRESULT WINAPI
hidden_proc(HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
)
55 FIXME("(%p %d %x %lx)\n", hwnd
, msg
, wParam
, lParam
);
57 return DefWindowProcW(hwnd
, msg
, wParam
, lParam
);
60 static void create_hidden_window(HTMLDocument
*This
)
62 static ATOM hidden_wnd_class
= 0;
63 static const WCHAR wszInternetExplorer_Hidden
[] = {'I','n','t','e','r','n','e','t',
64 ' ','E','x','p','l','o','r','e','r','_','H','i','d','d','e','n',0};
66 if(!hidden_wnd_class
) {
67 WNDCLASSEXW wndclass
= {
68 sizeof(WNDCLASSEXW
), 0,
70 0, 0, hInst
, NULL
, NULL
, NULL
, NULL
,
71 wszInternetExplorer_Hidden
,
75 hidden_wnd_class
= RegisterClassExW(&wndclass
);
78 This
->hidden_hwnd
= CreateWindowExW(0, wszInternetExplorer_Hidden
, NULL
, WS_POPUP
,
79 0, 0, 0, 0, NULL
, NULL
, hInst
, This
);
82 static void paint_disabled(HWND hwnd
) {
88 WCHAR wszHTMLDisabled
[100];
90 LoadStringW(hInst
, IDS_HTMLDISABLED
, wszHTMLDisabled
, sizeof(wszHTMLDisabled
)/sizeof(WCHAR
));
92 font
= CreateFontA(25,0,0,0,400,0,0,0,ANSI_CHARSET
,0,0,DEFAULT_QUALITY
,DEFAULT_PITCH
,NULL
);
93 brush
= CreateSolidBrush(RGB(255,255,255));
94 GetClientRect(hwnd
, &rect
);
96 hdc
= BeginPaint(hwnd
, &ps
);
97 SelectObject(hdc
, font
);
98 SelectObject(hdc
, brush
);
99 Rectangle(hdc
, rect
.left
, rect
.top
, rect
.right
, rect
.bottom
);
100 DrawTextW(hdc
, wszHTMLDisabled
,-1, &rect
, DT_CENTER
| DT_SINGLELINE
| DT_VCENTER
);
107 static void activate_gecko(HTMLDocument
*This
)
109 TRACE("(%p) %p\n", This
, This
->nscontainer
->window
);
111 SetParent(This
->nscontainer
->hwnd
, This
->hwnd
);
112 ShowWindow(This
->nscontainer
->hwnd
, SW_SHOW
);
114 nsIBaseWindow_SetVisibility(This
->nscontainer
->window
, TRUE
);
115 nsIBaseWindow_SetEnabled(This
->nscontainer
->window
, TRUE
);
116 nsIWebBrowserFocus_Activate(This
->nscontainer
->focus
);
119 static LRESULT WINAPI
serverwnd_proc(HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
)
123 static const WCHAR wszTHIS
[] = {'T','H','I','S',0};
125 if(msg
== WM_CREATE
) {
126 This
= *(HTMLDocument
**)lParam
;
127 SetPropW(hwnd
, wszTHIS
, This
);
129 This
= (HTMLDocument
*)GetPropW(hwnd
, wszTHIS
);
135 if(This
->nscontainer
)
136 activate_gecko(This
);
139 if(!This
->nscontainer
)
140 paint_disabled(hwnd
);
143 TRACE("(%p)->(WM_SIZE)\n", This
);
144 if(This
->nscontainer
)
145 SetWindowPos(This
->nscontainer
->hwnd
, NULL
, 0, 0, LOWORD(lParam
), HIWORD(lParam
),
146 SWP_NOZORDER
| SWP_NOACTIVATE
);
149 return DefWindowProcW(hwnd
, msg
, wParam
, lParam
);
152 static void register_serverwnd_class(void)
154 static WNDCLASSEXW wndclass
= {
158 0, 0, NULL
, NULL
, NULL
, NULL
, NULL
,
159 wszInternetExplorer_Server
,
162 wndclass
.hInstance
= hInst
;
163 serverwnd_class
= RegisterClassExW(&wndclass
);
166 static HRESULT
activate_window(HTMLDocument
*This
)
168 IOleInPlaceUIWindow
*pIPWnd
;
169 IOleInPlaceFrame
*pIPFrame
;
170 IOleCommandTarget
*cmdtrg
;
171 RECT posrect
, cliprect
;
172 OLEINPLACEFRAMEINFO frameinfo
;
177 register_serverwnd_class();
179 hres
= IOleInPlaceSite_CanInPlaceActivate(This
->ipsite
);
181 WARN("CanInPlaceActivate returned: %08lx\n", hres
);
182 return FAILED(hres
) ? hres
: E_FAIL
;
185 hres
= IOleInPlaceSite_GetWindowContext(This
->ipsite
, &pIPFrame
, &pIPWnd
, &posrect
, &cliprect
, &frameinfo
);
187 WARN("GetWindowContext failed: %08lx\n", hres
);
192 IOleInPlaceUIWindow_Release(pIPWnd
);
193 TRACE("got window context: %p %p {%ld %ld %ld %ld} {%ld %ld %ld %ld} {%d %x %p %p %d}\n",
194 pIPFrame
, pIPWnd
, posrect
.left
, posrect
.top
, posrect
.right
, posrect
.bottom
,
195 cliprect
.left
, cliprect
.top
, cliprect
.right
, cliprect
.bottom
,
196 frameinfo
.cb
, frameinfo
.fMDIApp
, frameinfo
.hwndFrame
, frameinfo
.haccel
, frameinfo
.cAccelEntries
);
198 hres
= IOleInPlaceSite_GetWindow(This
->ipsite
, &parent_hwnd
);
200 WARN("GetWindow failed: %08lx\n", hres
);
204 TRACE("got parent window %p\n", parent_hwnd
);
207 if(GetParent(This
->hwnd
) != parent_hwnd
)
208 SetParent(This
->hwnd
, parent_hwnd
);
209 SetWindowPos(This
->hwnd
, HWND_TOP
,
210 posrect
.left
, posrect
.top
, posrect
.right
-posrect
.left
, posrect
.bottom
-posrect
.top
,
211 SWP_NOACTIVATE
| SWP_SHOWWINDOW
);
213 CreateWindowExW(0, wszInternetExplorer_Server
, NULL
,
214 WS_CHILD
| WS_CLIPSIBLINGS
| WS_CLIPCHILDREN
,
215 posrect
.left
, posrect
.top
, posrect
.right
-posrect
.left
, posrect
.bottom
-posrect
.top
,
216 parent_hwnd
, NULL
, hInst
, This
);
218 TRACE("Created window %p\n", This
->hwnd
);
220 SetWindowPos(This
->hwnd
, NULL
, 0, 0, 0, 0,
221 SWP_NOSIZE
| SWP_NOMOVE
| SWP_NOZORDER
| SWP_NOREDRAW
| SWP_NOACTIVATE
| SWP_SHOWWINDOW
);
222 RedrawWindow(This
->hwnd
, NULL
, NULL
, RDW_INVALIDATE
| RDW_NOERASE
| RDW_ALLCHILDREN
);
223 SetFocus(This
->hwnd
);
226 * Windows implementation calls:
227 * RegisterWindowMessage("MSWHEEL_ROLLMSG");
228 * SetTimer(This->hwnd, TIMER_ID, 100, NULL);
232 This
->in_place_active
= TRUE
;
233 hres
= IOleInPlaceSite_OnInPlaceActivate(This
->ipsite
);
235 WARN("OnInPlaceActivate failed: %08lx\n", hres
);
236 This
->in_place_active
= FALSE
;
240 hres
= IOleClientSite_QueryInterface(This
->client
, &IID_IOleCommandTarget
, (void**)&cmdtrg
);
241 if(SUCCEEDED(hres
)) {
244 IOleInPlaceFrame_SetStatusText(pIPFrame
, NULL
);
248 IOleCommandTarget_Exec(cmdtrg
, NULL
, OLECMDID_SETPROGRESSMAX
, 0, &var
, NULL
);
249 IOleCommandTarget_Exec(cmdtrg
, NULL
, OLECMDID_SETPROGRESSPOS
, 0, &var
, NULL
);
251 IOleCommandTarget_Release(cmdtrg
);
255 IOleInPlaceFrame_Release(This
->frame
);
256 This
->frame
= pIPFrame
;
258 This
->window_active
= TRUE
;
263 static LRESULT
tooltips_proc(HWND hwnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
)
265 tooltip_data
*data
= GetPropW(hwnd
, wszTooltipData
);
267 TRACE("%d %p\n", msg
, data
);
269 if(msg
== TTM_WINDOWFROMPOINT
) {
271 POINT
*pt
= (POINT
*)lParam
;
273 TRACE("TTM_WINDOWFROMPOINT (%ld,%ld)\n", pt
->x
, pt
->y
);
275 GetWindowRect(data
->doc
->hwnd
, &rect
);
277 if(rect
.left
<= pt
->x
&& pt
->x
<= rect
.right
278 && rect
.top
<= pt
->y
&& pt
->y
<= rect
.bottom
)
279 return (LPARAM
)data
->doc
->hwnd
;
282 return CallWindowProcW(data
->proc
, hwnd
, msg
, wParam
, lParam
);
285 static void create_tooltips_window(HTMLDocument
*This
)
287 tooltip_data
*data
= mshtml_alloc(sizeof(*data
));
289 This
->tooltips_hwnd
= CreateWindowExW(0, TOOLTIPS_CLASSW
, NULL
, TTS_NOPREFIX
| WS_POPUP
,
290 CW_USEDEFAULT
, CW_USEDEFAULT
, 10, 10, This
->hwnd
, NULL
, hInst
, NULL
);
293 data
->proc
= (WNDPROC
)GetWindowLongPtrW(This
->tooltips_hwnd
, GWLP_WNDPROC
);
295 SetPropW(This
->tooltips_hwnd
, wszTooltipData
, data
);
297 SetWindowLongPtrW(This
->tooltips_hwnd
, GWLP_WNDPROC
, (LONG_PTR
)tooltips_proc
);
299 SetWindowPos(This
->tooltips_hwnd
, HWND_TOPMOST
,0, 0, 0, 0,
300 SWP_NOMOVE
| SWP_NOSIZE
| SWP_NOACTIVATE
);
304 void show_tooltip(HTMLDocument
*This
, DWORD x
, DWORD y
, LPCWSTR text
)
306 TTTOOLINFOW toolinfo
= {
307 sizeof(TTTOOLINFOW
), 0, This
->hwnd
, 0xdeadbeef,
308 {x
>2 ? x
-2 : 0, y
>0 ? y
-2 : 0, x
+2, y
+2}, /* FIXME */
309 NULL
, (LPWSTR
)text
, 0};
310 MSG msg
= {This
->hwnd
, WM_MOUSEMOVE
, 0, MAKELPARAM(x
,y
), 0, {x
,y
}};
312 TRACE("(%p)->(%ld %ld %s)\n", This
, x
, y
, debugstr_w(text
));
314 if(!This
->tooltips_hwnd
)
315 create_tooltips_window(This
);
317 SendMessageW(This
->tooltips_hwnd
, TTM_ADDTOOLW
, 0, (LPARAM
)&toolinfo
);
318 SendMessageW(This
->tooltips_hwnd
, TTM_ACTIVATE
, TRUE
, 0);
319 SendMessageW(This
->tooltips_hwnd
, TTM_RELAYEVENT
, 0, (LPARAM
)&msg
);
322 void hide_tooltip(HTMLDocument
*This
)
324 TTTOOLINFOW toolinfo
= {
325 sizeof(TTTOOLINFOW
), 0, This
->hwnd
, 0xdeadbeef,
326 {0,0,0,0}, NULL
, NULL
, 0};
328 TRACE("(%p)\n", This
);
330 SendMessageW(This
->tooltips_hwnd
, TTM_DELTOOLW
, 0, (LPARAM
)&toolinfo
);
331 SendMessageW(This
->tooltips_hwnd
, TTM_ACTIVATE
, FALSE
, 0);
334 /**********************************************************
335 * IOleDocumentView implementation
338 #define DOCVIEW_THIS(iface) DEFINE_THIS(HTMLDocument, OleDocumentView, iface)
340 static HRESULT WINAPI
OleDocumentView_QueryInterface(IOleDocumentView
*iface
, REFIID riid
, void **ppvObject
)
342 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
343 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
346 static ULONG WINAPI
OleDocumentView_AddRef(IOleDocumentView
*iface
)
348 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
349 return IHTMLDocument2_AddRef(HTMLDOC(This
));
352 static ULONG WINAPI
OleDocumentView_Release(IOleDocumentView
*iface
)
354 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
355 return IHTMLDocument2_Release(HTMLDOC(This
));
358 static HRESULT WINAPI
OleDocumentView_SetInPlaceSite(IOleDocumentView
*iface
, IOleInPlaceSite
*pIPSite
)
360 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
361 TRACE("(%p)->(%p)\n", This
, pIPSite
);
364 IOleInPlaceSite_AddRef(pIPSite
);
367 IOleInPlaceSite_Release(This
->ipsite
);
369 This
->ipsite
= pIPSite
;
373 static HRESULT WINAPI
OleDocumentView_GetInPlaceSite(IOleDocumentView
*iface
, IOleInPlaceSite
**ppIPSite
)
375 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
376 TRACE("(%p)->(%p)\n", This
, ppIPSite
);
382 IOleInPlaceSite_AddRef(This
->ipsite
);
384 *ppIPSite
= This
->ipsite
;
388 static HRESULT WINAPI
OleDocumentView_GetDocument(IOleDocumentView
*iface
, IUnknown
**ppunk
)
390 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
391 TRACE("(%p)->(%p)\n", This
, ppunk
);
396 IHTMLDocument2_AddRef(HTMLDOC(This
));
397 *ppunk
= (IUnknown
*)HTMLDOC(This
);
401 static HRESULT WINAPI
OleDocumentView_SetRect(IOleDocumentView
*iface
, LPRECT prcView
)
403 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
406 TRACE("(%p)->(%p)\n", This
, prcView
);
412 GetClientRect(This
->hwnd
, &rect
);
413 if(memcmp(prcView
, &rect
, sizeof(RECT
))) {
414 InvalidateRect(This
->hwnd
,NULL
,TRUE
);
415 SetWindowPos(This
->hwnd
, NULL
, prcView
->left
, prcView
->top
, prcView
->right
,
416 prcView
->bottom
, SWP_NOZORDER
| SWP_NOACTIVATE
);
423 static HRESULT WINAPI
OleDocumentView_GetRect(IOleDocumentView
*iface
, LPRECT prcView
)
425 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
427 TRACE("(%p)->(%p)\n", This
, prcView
);
432 GetClientRect(This
->hwnd
, prcView
);
436 static HRESULT WINAPI
OleDocumentView_SetRectComplex(IOleDocumentView
*iface
, LPRECT prcView
,
437 LPRECT prcHScroll
, LPRECT prcVScroll
, LPRECT prcSizeBox
)
439 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
440 FIXME("(%p)->(%p %p %p %p)\n", This
, prcView
, prcHScroll
, prcVScroll
, prcSizeBox
);
444 static HRESULT WINAPI
OleDocumentView_Show(IOleDocumentView
*iface
, BOOL fShow
)
446 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
449 TRACE("(%p)->(%x)\n", This
, fShow
);
452 if(!This
->ui_active
) {
453 hres
= activate_window(This
);
457 ShowWindow(This
->hwnd
, SW_SHOW
);
459 ShowWindow(This
->hwnd
, SW_HIDE
);
465 static HRESULT WINAPI
OleDocumentView_UIActivate(IOleDocumentView
*iface
, BOOL fUIActivate
)
467 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
470 TRACE("(%p)->(%x)\n", This
, fUIActivate
);
473 FIXME("This->ipsite = NULL\n");
481 if(!This
->window_active
) {
482 hres
= activate_window(This
);
487 hres
= IOleInPlaceSite_OnUIActivate(This
->ipsite
);
488 if(SUCCEEDED(hres
)) {
489 OLECHAR wszHTMLDocument
[30];
490 LoadStringW(hInst
, IDS_HTMLDOCUMENT
, wszHTMLDocument
,
491 sizeof(wszHTMLDocument
)/sizeof(WCHAR
));
492 IOleInPlaceFrame_SetActiveObject(This
->frame
, ACTOBJ(This
), wszHTMLDocument
);
494 FIXME("OnUIActivate failed: %08lx\n", hres
);
495 IOleInPlaceFrame_Release(This
->frame
);
497 This
->ui_active
= FALSE
;
501 hres
= IDocHostUIHandler_ShowUI(This
->hostui
, 0, ACTOBJ(This
), CMDTARGET(This
),
504 IDocHostUIHandler_HideUI(This
->hostui
);
506 This
->ui_active
= TRUE
;
508 This
->window_active
= FALSE
;
509 if(This
->ui_active
) {
510 This
->ui_active
= FALSE
;
512 IOleInPlaceFrame_SetActiveObject(This
->frame
, NULL
, NULL
);
514 IDocHostUIHandler_HideUI(This
->hostui
);
516 IOleInPlaceSite_OnUIDeactivate(This
->ipsite
, FALSE
);
522 static HRESULT WINAPI
OleDocumentView_Open(IOleDocumentView
*iface
)
524 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
525 FIXME("(%p)\n", This
);
529 static HRESULT WINAPI
OleDocumentView_CloseView(IOleDocumentView
*iface
, DWORD dwReserved
)
531 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
532 TRACE("(%p)->(%lx)\n", This
, dwReserved
);
535 WARN("dwReserved = %ld\n", dwReserved
);
538 * Windows implementation calls QueryInterface(IID_IOleCommandTarget),
539 * QueryInterface(IID_IOleControlSite) and KillTimer
542 IOleDocumentView_Show(iface
, FALSE
);
547 static HRESULT WINAPI
OleDocumentView_SaveViewState(IOleDocumentView
*iface
, LPSTREAM pstm
)
549 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
550 FIXME("(%p)->(%p)\n", This
, pstm
);
554 static HRESULT WINAPI
OleDocumentView_ApplyViewState(IOleDocumentView
*iface
, LPSTREAM pstm
)
556 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
557 FIXME("(%p)->(%p)\n", This
, pstm
);
561 static HRESULT WINAPI
OleDocumentView_Clone(IOleDocumentView
*iface
, IOleInPlaceSite
*pIPSiteNew
,
562 IOleDocumentView
**ppViewNew
)
564 HTMLDocument
*This
= DOCVIEW_THIS(iface
);
565 FIXME("(%p)->(%p %p)\n", This
, pIPSiteNew
, ppViewNew
);
571 static const IOleDocumentViewVtbl OleDocumentViewVtbl
= {
572 OleDocumentView_QueryInterface
,
573 OleDocumentView_AddRef
,
574 OleDocumentView_Release
,
575 OleDocumentView_SetInPlaceSite
,
576 OleDocumentView_GetInPlaceSite
,
577 OleDocumentView_GetDocument
,
578 OleDocumentView_SetRect
,
579 OleDocumentView_GetRect
,
580 OleDocumentView_SetRectComplex
,
581 OleDocumentView_Show
,
582 OleDocumentView_UIActivate
,
583 OleDocumentView_Open
,
584 OleDocumentView_CloseView
,
585 OleDocumentView_SaveViewState
,
586 OleDocumentView_ApplyViewState
,
587 OleDocumentView_Clone
590 /**********************************************************
591 * IViewObject implementation
594 #define VIEWOBJ_THIS(iface) DEFINE_THIS(HTMLDocument, ViewObject2, iface)
596 static HRESULT WINAPI
ViewObject_QueryInterface(IViewObject2
*iface
, REFIID riid
, void **ppvObject
)
598 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
599 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppvObject
);
602 static ULONG WINAPI
ViewObject_AddRef(IViewObject2
*iface
)
604 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
605 return IHTMLDocument2_AddRef(HTMLDOC(This
));
608 static ULONG WINAPI
ViewObject_Release(IViewObject2
*iface
)
610 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
611 return IHTMLDocument2_Release(HTMLDOC(This
));
614 static HRESULT WINAPI
ViewObject_Draw(IViewObject2
*iface
, DWORD dwDrawAspect
, LONG lindex
, void *pvAspect
,
615 DVTARGETDEVICE
*ptd
, HDC hdcTargetDev
, HDC hdcDraw
, LPCRECTL lprcBounds
,
616 LPCRECTL lprcWBounds
, BOOL (CALLBACK
*pfnContinue
)(ULONG_PTR dwContinue
), ULONG_PTR dwContinue
)
618 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
619 FIXME("(%p)->(%ld %ld %p %p %p %p %p %p %p %ld)\n", This
, dwDrawAspect
, lindex
, pvAspect
,
620 ptd
, hdcTargetDev
, hdcDraw
, lprcBounds
, lprcWBounds
, pfnContinue
, dwContinue
);
624 static HRESULT WINAPI
ViewObject_GetColorSet(IViewObject2
*iface
, DWORD dwDrawAspect
, LONG lindex
, void *pvAspect
,
625 DVTARGETDEVICE
*ptd
, HDC hicTargetDev
, LOGPALETTE
**ppColorSet
)
627 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
628 FIXME("(%p)->(%ld %ld %p %p %p %p)\n", This
, dwDrawAspect
, lindex
, pvAspect
, ptd
, hicTargetDev
, ppColorSet
);
632 static HRESULT WINAPI
ViewObject_Freeze(IViewObject2
*iface
, DWORD dwDrawAspect
, LONG lindex
,
633 void *pvAspect
, DWORD
*pdwFreeze
)
635 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
636 FIXME("(%p)->(%ld %ld %p %p)\n", This
, dwDrawAspect
, lindex
, pvAspect
, pdwFreeze
);
640 static HRESULT WINAPI
ViewObject_Unfreeze(IViewObject2
*iface
, DWORD dwFreeze
)
642 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
643 FIXME("(%p)->(%ld)\n", This
, dwFreeze
);
647 static HRESULT WINAPI
ViewObject_SetAdvise(IViewObject2
*iface
, DWORD aspects
, DWORD advf
, IAdviseSink
*pAdvSink
)
649 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
650 FIXME("(%p)->(%ld %ld %p)\n", This
, aspects
, advf
, pAdvSink
);
654 static HRESULT WINAPI
ViewObject_GetAdvise(IViewObject2
*iface
, DWORD
*pAspects
, DWORD
*pAdvf
, IAdviseSink
**ppAdvSink
)
656 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
657 FIXME("(%p)->(%p %p %p)\n", This
, pAspects
, pAdvf
, ppAdvSink
);
661 static HRESULT WINAPI
ViewObject_GetExtent(IViewObject2
*iface
, DWORD dwDrawAspect
, LONG lindex
,
662 DVTARGETDEVICE
* ptd
, LPSIZEL lpsizel
)
664 HTMLDocument
*This
= VIEWOBJ_THIS(iface
);
665 FIXME("(%p)->(%ld %ld %p %p)\n", This
, dwDrawAspect
, lindex
, ptd
, lpsizel
);
671 static const IViewObject2Vtbl ViewObjectVtbl
= {
672 ViewObject_QueryInterface
,
676 ViewObject_GetColorSet
,
679 ViewObject_SetAdvise
,
680 ViewObject_GetAdvise
,
684 void HTMLDocument_View_Init(HTMLDocument
*This
)
686 This
->lpOleDocumentViewVtbl
= &OleDocumentViewVtbl
;
687 This
->lpViewObject2Vtbl
= &ViewObjectVtbl
;
692 This
->tooltips_hwnd
= NULL
;
694 This
->in_place_active
= FALSE
;
695 This
->ui_active
= FALSE
;
696 This
->window_active
= FALSE
;
698 create_hidden_window(This
);