Beispiel #1
0
        /// <summary>
        /// </summary>
        private void OnParentResize(object src, EventArgs e)
        {
            if (tridentView != null)
            {
                Interop.COMRECT r = new Interop.COMRECT();

                Interop.GetClientRect(hostControl.Handle, r);
                tridentView.SetRect(r);
            }
        }
Beispiel #2
0
        /// <summary>
        /// </summary>
        public void ActivateMSHTML()
        {
            Debug.Assert(tridentOleObject != null, "How'd we get here when trident is null!");

            try {
                Interop.COMRECT r = new Interop.COMRECT();

                Interop.GetClientRect(hostControl.Handle, r);
                tridentOleObject.DoVerb(Interop.OLEIVERB_UIACTIVATE, Interop.NullIntPtr, (Interop.IOleClientSite) this,
                                        0, hostControl.Handle, r);
            }
            catch (Exception e) {
                Debug.Fail(e.ToString());
            }
        }
Beispiel #3
0
        ///////////////////////////////////////////////////////////////////////////
        // Interop.IOleDocumentSite Implementation

        public int ActivateMe(Interop.IOleDocumentView pViewToActivate)
        {
            Debug.Assert(pViewToActivate != null,
                         "Expected the view to be non-null");
            if (pViewToActivate == null)
            {
                return(Interop.E_INVALIDARG);
            }

            Interop.COMRECT r = new Interop.COMRECT();

            Interop.GetClientRect(hostControl.Handle, r);

            tridentView = pViewToActivate;
            tridentView.SetInPlaceSite((Interop.IOleInPlaceSite) this);
            tridentView.UIActivate(1);
            tridentView.SetRect(r);
            tridentView.Show(1);

            return(Interop.S_OK);
        }
Beispiel #4
0
 public int OnPosRectChange(Interop.COMRECT lprcPosRect)
 {
     // TODO:  Add DocHostUIHandler.OnPosRectChange implementation
     return(0);
 }
Beispiel #5
0
 public void GetWindowContext(out Interop.IOleInPlaceFrame ppFrame, out Interop.IOleInPlaceUIWindow ppDoc, Interop.COMRECT lprcPosRect, Interop.COMRECT lprcClipRect, Interop.tagOIFI lpFrameInfo)
 {
     // TODO:  Add DocHostUIHandler.GetWindowContext implementation
     ppFrame = null;
     ppDoc   = null;
 }
Beispiel #6
0
 public int ResizeBorder(Interop.COMRECT rect, Interop.IOleInPlaceUIWindow doc, bool fFrameWindow)
 {
     return(Interop.E_NOTIMPL);
 }
Beispiel #7
0
 public void SetBorderSpace(Interop.COMRECT pborderwidths)
 {
     throw new COMException(String.Empty, Interop.E_NOTIMPL);
 }
Beispiel #8
0
        ///////////////////////////////////////////////////////////////////////////
        // Interop.IOleInPlaceFrame Implementation

        public void GetBorder(Interop.COMRECT lprectBorder)
        {
            throw new COMException(String.Empty, Interop.E_NOTIMPL);
        }
Beispiel #9
0
 public int OnPosRectChange(Interop.COMRECT lprcPosRect)
 {
     return(Interop.S_OK);
 }
Beispiel #10
0
        public void GetWindowContext(out Interop.IOleInPlaceFrame ppFrame, out Interop.IOleInPlaceUIWindow ppDoc, Interop.COMRECT lprcPosRect, Interop.COMRECT lprcClipRect, Interop.tagOIFI lpFrameInfo)
        {
            ppFrame = (Interop.IOleInPlaceFrame) this;
            ppDoc   = null;

            Interop.GetClientRect(hostControl.Handle, lprcPosRect);
            Interop.GetClientRect(hostControl.Handle, lprcClipRect);

            lpFrameInfo.cb            = Marshal.SizeOf(typeof(Interop.tagOIFI));
            lpFrameInfo.fMDIApp       = 0;
            lpFrameInfo.hwndFrame     = hostControl.Handle;
            lpFrameInfo.hAccel        = Interop.NullIntPtr;
            lpFrameInfo.cAccelEntries = 0;
        }