Example #1
0
        unsafe HRESULT Ole32.IOleInPlaceSite.GetWindowContext(
            out Ole32.IOleInPlaceFrame ppFrame,
            out Ole32.IOleInPlaceUIWindow ppDoc,
            RECT *lprcPosRect,
            RECT *lprcClipRect,
            Ole32.OLEINPLACEFRAMEINFO *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            = (uint)Marshal.SizeOf <Ole32.OLEINPLACEFRAMEINFO>();
                lpFrameInfo->fMDIApp       = BOOL.FALSE;
                lpFrameInfo->hAccel        = IntPtr.Zero;
                lpFrameInfo->cAccelEntries = 0;
                lpFrameInfo->hwndFrame     = (Host.ParentInternal == null) ? IntPtr.Zero : Host.ParentInternal.Handle;
            }

            return(HRESULT.S_OK);
        }
 HRESULT IDocHostUIHandler.ShowUI(
     uint dwID,
     Ole32.IOleInPlaceActiveObject activeObject,
     Ole32.IOleCommandTarget commandTarget,
     Ole32.IOleInPlaceFrame frame,
     Ole32.IOleInPlaceUIWindow doc)
 {
     return(HRESULT.S_FALSE);
 }
 unsafe HRESULT IDocHostUIHandler.ResizeBorder(RECT *rect, Ole32.IOleInPlaceUIWindow doc, BOOL fFrameWindow)
 {
     return(HRESULT.E_NOTIMPL);
 }