unsafe HRESULT UnsafeNativeMethods.IOleInPlaceSite.GetWindowContext( out UnsafeNativeMethods.IOleInPlaceFrame ppFrame, out UnsafeNativeMethods.IOleInPlaceUIWindow ppDoc, RECT *lprcPosRect, RECT *lprcClipRect, NativeMethods.tagOIFI lpFrameInfo) { ppDoc = null; ppFrame = Host.GetParentContainer(); if (lprcPosRect == null || lprcClipRect == null) { return(HRESULT.E_POINTER); } *lprcPosRect = Host.Bounds; *lprcClipRect = WebBrowserHelper.GetClipRect(); if (lpFrameInfo != null) { lpFrameInfo.cb = Marshal.SizeOf <NativeMethods.tagOIFI>(); lpFrameInfo.fMDIApp = false; lpFrameInfo.hAccel = IntPtr.Zero; lpFrameInfo.cAccelEntries = 0; lpFrameInfo.hwndFrame = (Host.ParentInternal == null) ? IntPtr.Zero : Host.ParentInternal.Handle; } return(HRESULT.S_OK); }
void NativeMethods.IOleInPlaceSite.GetWindowContext(out NativeMethods.IOleInPlaceFrame ppFrame, out NativeMethods.IOleInPlaceUIWindow ppDoc, NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect, NativeMethods.tagOIFI lpFrameInfo) { ppFrame = (NativeMethods.IOleInPlaceFrame) this; ppDoc = null; NativeMethods.GetClientRect(hostControl.Handle, lprcPosRect); NativeMethods.GetClientRect(hostControl.Handle, lprcClipRect); lpFrameInfo.cb = Marshal.SizeOf(typeof(NativeMethods.tagOIFI)); lpFrameInfo.fMDIApp = 0; lpFrameInfo.hwndFrame = hostControl.Handle; lpFrameInfo.hAccel = NativeMethods.NullIntPtr; lpFrameInfo.cAccelEntries = 0; }
/// <include file='doc\WebBrowserSiteBase.uex' path='docs/doc[@for="WebBrowserSiteBase.UnsafeNativeMethods.IOleInPlaceSite.GetWindowContext"]/*' /> /// <internalonly/> int UnsafeNativeMethods.IOleInPlaceSite.GetWindowContext(out UnsafeNativeMethods.IOleInPlaceFrame ppFrame, out UnsafeNativeMethods.IOleInPlaceUIWindow ppDoc, NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect, NativeMethods.tagOIFI lpFrameInfo) { ppDoc = null; ppFrame = this.Host.GetParentContainer(); lprcPosRect.left = this.Host.Bounds.X; lprcPosRect.top = this.Host.Bounds.Y; lprcPosRect.right = this.Host.Bounds.Width + this.Host.Bounds.X; lprcPosRect.bottom = this.Host.Bounds.Height + this.Host.Bounds.Y; lprcClipRect = WebBrowserHelper.GetClipRect(); if (lpFrameInfo != null) { lpFrameInfo.cb = Marshal.SizeOf <NativeMethods.tagOIFI>(); lpFrameInfo.fMDIApp = false; lpFrameInfo.hAccel = IntPtr.Zero; lpFrameInfo.cAccelEntries = 0; lpFrameInfo.hwndFrame = (this.Host.ParentInternal == null) ? IntPtr.Zero : this.Host.ParentInternal.Handle; } return(NativeMethods.S_OK); }
public virtual void GetWindowContext(out NativeMethods.IOleInPlaceFrame ppFrame, out NativeMethods.IOleInPlaceUIWindow ppDoc, NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect, NativeMethods.tagOIFI lpFrameInfo) { ppFrame = (NativeMethods.IOleInPlaceFrame) this; ppDoc = null; NativeMethods.GetClientRect(parentControl.Handle, lprcPosRect); NativeMethods.GetClientRect(parentControl.Handle, lprcClipRect); lpFrameInfo.cb = System.Runtime.InteropServices.Marshal.SizeOf(typeof(NativeMethods.tagOIFI)); lpFrameInfo.fMDIApp = 0; lpFrameInfo.hwndFrame = parentControl.Handle; lpFrameInfo.hAccel = IntPtr.Zero; lpFrameInfo.cAccelEntries = 0; }
public virtual void GetWindowContext(out NativeMethods.IOleInPlaceFrame ppFrame, out NativeMethods.IOleInPlaceUIWindow ppDoc, NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect, NativeMethods.tagOIFI lpFrameInfo) { Debug.WriteLineIf(StyleBuilder.StyleBuilderSwitch.TraceVerbose, "CTridentSite: IOleInPlaceSite::GetWindowContext"); ppFrame = (NativeMethods.IOleInPlaceFrame) this; ppDoc = null; NativeMethods.GetClientRect(parentControl.Handle, lprcPosRect); NativeMethods.GetClientRect(parentControl.Handle, lprcClipRect); lpFrameInfo.cb = System.Runtime.InteropServices.Marshal.SizeOf(typeof(NativeMethods.tagOIFI)); lpFrameInfo.fMDIApp = 0; lpFrameInfo.hwndFrame = parentControl.Handle; lpFrameInfo.hAccel = IntPtr.Zero; lpFrameInfo.cAccelEntries = 0; }