public void ActivateHtml() { Debug.Assert(this.oleObject != null, "How'd we get here when trident is null!"); try { NativeMethods.COMRECT rect = new NativeMethods.COMRECT(); NativeMethods.GetClientRect(this.hostControl.Handle, rect); this.oleObject.DoVerb(NativeMethods.OLEIVERB_UIACTIVATE, NativeMethods.NullIntPtr, (NativeMethods.IOleClientSite) this, 0, this.hostControl.Handle, rect); } catch (Exception exception) { Debug.Fail(exception.ToString()); } }
public virtual void SetBorderSpace(NativeMethods.COMRECT pborderwidths) { throw new COMException(String.Empty, NativeMethods.E_NOTIMPL); }
public virtual int OnPosRectChange(NativeMethods.COMRECT lprcPosRect) { return(NativeMethods.S_OK); }
int UnsafeNativeMethods.IDocHostUIHandler.ResizeBorder(NativeMethods.COMRECT rect, UnsafeNativeMethods.IOleInPlaceUIWindow doc, bool fFrameWindow) { return(NativeMethods.E_NOTIMPL); }
private void HostControl_Resize(object src, EventArgs e) { if (this.documentView != null) { NativeMethods.COMRECT r = new NativeMethods.COMRECT(); NativeMethods.GetClientRect(hostControl.Handle, r); this.documentView.SetRect(r); } }
int UnsafeNativeMethods.IOleInPlaceFrame.SetBorderSpace(NativeMethods.COMRECT pborderwidths) { return(NativeMethods.E_NOTIMPL); }
void NativeMethods.IOleInPlaceFrame.SetBorderSpace(NativeMethods.COMRECT pborderwidths) { throw new COMException(String.Empty, NativeMethods.E_NOTIMPL); }
int NativeMethods.IOleInPlaceSite.OnPosRectChange(NativeMethods.COMRECT lprcPosRect) { return(NativeMethods.S_OK); }
public static extern int DrawThemeBackground(HandleRef hTheme, HandleRef hdc, int partId, int stateId, [In] NativeMethods.COMRECT pRect, [In] NativeMethods.COMRECT pClipRect);
public static extern int ScrollWindowEx(HandleRef hWnd, int nXAmount, int nYAmount, NativeMethods.COMRECT rectScrollRegion, ref NativeMethods.RECT rectClip, HandleRef hrgnUpdate, ref NativeMethods.RECT prcUpdate, int flags);
public static extern bool InvalidateRect(HandleRef hWnd, NativeMethods.COMRECT rect, bool erase);
public static extern bool RedrawWindow(HandleRef hwnd, NativeMethods.COMRECT rcUpdate, HandleRef hrgnUpdate, int flags);
public static extern bool EnumDisplayMonitors(HandleRef hdc, NativeMethods.COMRECT rcClip, NativeMethods.MonitorEnumProc lpfnEnum, IntPtr dwData);
int UnsafeNativeMethods.IOleInPlaceFrame.SetBorderSpace(NativeMethods.COMRECT pborderwidths) { return(-2147467263); }
int UnsafeNativeMethods.IOleInPlaceSite.GetWindowContext(out UnsafeNativeMethods.IOleInPlaceFrame ppFrame, out UnsafeNativeMethods.IOleInPlaceUIWindow ppDoc, NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect, NativeMethods.OLEINPLACEFRAMEINFO lpFrameInfo) { ppDoc = null; ppFrame = this.Host.Container; lprcPosRect.left = (int)this.Host.Bounds.left; lprcPosRect.top = (int)this.Host.Bounds.top; lprcPosRect.right = (int)this.Host.Bounds.right; lprcPosRect.bottom = (int)this.Host.Bounds.bottom; lprcClipRect = this.Host.Bounds; if (lpFrameInfo != null) { lpFrameInfo.cb = (uint)Marshal.SizeOf(typeof(NativeMethods.OLEINPLACEFRAMEINFO)); lpFrameInfo.fMDIApp = false; lpFrameInfo.hAccel = IntPtr.Zero; lpFrameInfo.cAccelEntries = 0; lpFrameInfo.hwndFrame = this.Host.ParentHandle.Handle; } return(NativeMethods.S_OK); }
int UnsafeNativeMethods.IOleInPlaceFrame.GetBorder(NativeMethods.COMRECT lprectBorder) { return(-2147467263); }
public static extern int DrawThemeEdge(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pDestRect, int uEdge, int uFlags, [Out] NativeMethods.COMRECT pContentRect);
void NativeMethods.IOleInPlaceFrame.GetBorder(NativeMethods.COMRECT lprectBorder) { throw new COMException(String.Empty, NativeMethods.E_NOTIMPL); }
public static extern int DrawThemeParentBackground(HandleRef hwnd, HandleRef hdc, [In] NativeMethods.COMRECT prc);
int UnsafeNativeMethods.IOleInPlaceFrame.GetBorder(NativeMethods.COMRECT lprectBorder) { return(NativeMethods.E_NOTIMPL); }
public static extern int DrawThemeText(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [MarshalAs(UnmanagedType.LPWStr)] string pszText, int iCharCount, int dwTextFlags, int dwTextFlags2, [In] NativeMethods.COMRECT pRect);
/////////////////////////////////////////////////////////////////////////// // NativeMethods.IOleDocumentSite Implementation int NativeMethods.IOleDocumentSite.ActivateMe(NativeMethods.IOleDocumentView viewToActivate) { Debug.Assert(viewToActivate != null, "Expected the view to be non-null"); if (viewToActivate == null) { return NativeMethods.E_INVALIDARG; } NativeMethods.COMRECT rect = new NativeMethods.COMRECT(); NativeMethods.GetClientRect(hostControl.Handle, rect); this.documentView = viewToActivate; this.documentView.SetInPlaceSite((NativeMethods.IOleInPlaceSite) this); this.documentView.UIActivate(1); this.documentView.SetRect(rect); this.documentView.Show(1); return NativeMethods.S_OK; }
public static extern int GetThemeBackgroundExtent(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pContentRect, [Out] NativeMethods.COMRECT pExtentRect);
public static extern int GetThemeBackgroundRegion(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pRect, ref IntPtr pRegion);
public static extern int GetThemePartSize(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT prc, ThemeSizeType eSize, [Out] NativeMethods.SIZE psz);
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 static extern int GetThemeTextExtent(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [MarshalAs(UnmanagedType.LPWStr)] string pszText, int iCharCount, int dwTextFlags, [In] NativeMethods.COMRECT pBoundingRect, [Out] NativeMethods.COMRECT pExtentRect);
/////////////////////////////////////////////////////////////////////////// // IOleInPlaceFrame Implementation public virtual void GetBorder(NativeMethods.COMRECT lprectBorder) { throw new COMException(String.Empty, NativeMethods.E_NOTIMPL); }
public static extern int HitTestThemeBackground(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, int dwOptions, [In] NativeMethods.COMRECT pRect, HandleRef hrgn, [In] NativeMethods.POINTSTRUCT ptTest, ref int pwHitTestCode);
public virtual int ResizeBorder(NativeMethods.COMRECT rect, NativeMethods.IOleInPlaceUIWindow doc, bool fFrameWindow) { return(NativeMethods.E_NOTIMPL); }
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; }
int UnsafeNativeMethods.IOleInPlaceSite.OnPosRectChange(NativeMethods.COMRECT lprcPosRect) { return(this.OnActiveXRectChange(lprcPosRect)); }
public static extern bool RedrawWindow(IntPtr hwnd, NativeMethods.COMRECT rcUpdate, IntPtr hrgnUpdate, int flags);