Ejemplo n.º 1
0
 private int OnActiveXRectChange(NativeMethods._RECT lprcPosRect)
 {
     this.Host.activeXOleInPlaceObject.SetObjectRects(NativeMethods._RECT.FromXYWH(0, 0, lprcPosRect.right - lprcPosRect.left, lprcPosRect.bottom - lprcPosRect.top), ActiveXHelper.GetClipRect());
     this.Host.MakeDirty();
     return(0);
 }
Ejemplo n.º 2
0
 void UnsafeNativeMethods.IOleInPlaceSite.GetWindowContext(out UnsafeNativeMethods.IOleInPlaceFrame ppFrame, out UnsafeNativeMethods.IOleInPlaceUIWindow ppDoc, NativeMethods._RECT lprcPosRect, NativeMethods._RECT 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       = ActiveXHelper.GetClipRect();
     if (lpFrameInfo != null)
     {
         lpFrameInfo.cb            = Marshal.SizeOf(typeof(NativeMethods.tagOIFI));
         lpFrameInfo.fMDIApp       = false;
         lpFrameInfo.hAccel        = IntPtr.Zero;
         lpFrameInfo.cAccelEntries = 0;
         lpFrameInfo.hwndFrame     = (this.Host.Parent == null) ? IntPtr.Zero : this.Host.Parent.Handle;
     }
 }
Ejemplo n.º 3
0
 void UnsafeNativeMethods.IOleInPlaceSite.OnPosRectChange(NativeMethods._RECT lprcPosRect)
 {
     this.OnActiveXRectChange(lprcPosRect);
 }
 void UnsafeNativeMethods.IOleInPlaceFrame /*IOleInPlaceUIWindow*/.SetBorderSpace(NativeMethods._RECT pborderwidths)
 {
     throw new COMException("IOleInPlaceFrame", (int)NativeMethods.HRESULT.E_NOTIMPL);
 }