Beispiel #1
0
            unsafe HRESULT IOleInPlaceSite.GetWindowContext(
                out IOleInPlaceFrame ppFrame,
                out IOleInPlaceUIWindow ppDoc,
                RECT *lprcPosRect,
                RECT *lprcClipRect,
                OLEINPLACEFRAMEINFO *lpFrameInfo)
            {
                ppDoc   = null;
                ppFrame = host.GetParentContainer();

                if (lprcPosRect is null || lprcClipRect is null)
                {
                    return(HRESULT.E_POINTER);
                }

                *lprcPosRect  = host.Bounds;
                *lprcClipRect = WebBrowserHelper.GetClipRect();
                if (lpFrameInfo != null)
                {
                    lpFrameInfo->cb            = (uint)Marshal.SizeOf <OLEINPLACEFRAMEINFO>();
                    lpFrameInfo->fMDIApp       = BOOL.FALSE;
                    lpFrameInfo->hAccel        = IntPtr.Zero;
                    lpFrameInfo->cAccelEntries = 0;
                    lpFrameInfo->hwndFrame     = host.ParentInternal.Handle;
                }

                return(HRESULT.S_OK);
            }
Beispiel #2
0
        public int GetWindowContext([MarshalAs(UnmanagedType.Interface), Out] out IOleInPlaceFrame ppFrame, [MarshalAs(UnmanagedType.Interface), Out] out IOleInPlaceUIWindow ppDoc, [In, MarshalAs(UnmanagedType.Struct), Out] ref tagRECT lprcPosRect, [In, MarshalAs(UnmanagedType.Struct), Out] ref tagRECT lprcClipRect, [In, MarshalAs(UnmanagedType.Struct), Out] ref tagOIFI lpFrameInfo)
        {
            ppFrame = null;

            ppDoc        = null;
            lprcPosRect  = rectForm;
            lprcClipRect = rectForm;

            return(HRESULT.S_OK);
        }
Beispiel #3
0
        public int GetWindowContext(out IOleInPlaceFrame ppFrame, out IOleInPlaceUIWindow
                                    ppDoc, RECT lprcPosRect, RECT lprcClipRect, tagOIFI lpFrameInfo)
        {
            ppDoc   = null; //set to null because same as Frame window
            ppFrame = (IOleInPlaceFrame)this;
            if (lprcPosRect != null)
            {
                win32.GetClientRect(container.Handle, lprcPosRect);
            }

            if (lprcClipRect != null)
            {
                win32.GetClientRect(container.Handle, lprcClipRect);
            }

            //lpFrameInfo.cb = Marshal.SizeOf(typeof(tagOIFI));
            //This value is set by the caller

            lpFrameInfo.fMDIApp       = 0;
            lpFrameInfo.hwndFrame     = container.Handle;
            lpFrameInfo.hAccel        = IntPtr.Zero;
            lpFrameInfo.cAccelEntries = 0;
            return(HRESULT.S_OK);
        }
Beispiel #4
0
 int IDocHostUIHandler.ShowUI(int dwID, IOleInPlaceActiveObject activeObject, IOleCommandTarget commandTarget, IOleInPlaceFrame frame, IOleInPlaceUIWindow doc)
 {
     //activeObject.GetWindow should return Internet Explorer_Server hwnd
     if (activeObject != null)
     {
         activeObject.GetWindow(ref m_hWBServerHandle);
     }
     return(Hresults.S_OK);
 }
 int IOleInPlaceSite.GetWindowContext(out IOleInPlaceFrame ppFrame, out IOleInPlaceUIWindow ppDoc, ref tagRECT lprcPosRect, ref tagRECT lprcClipRect, ref tagOIFI lpFrameInfo)
 {
     ppDoc = null;
     ppFrame = null;
     return Hresults.E_NOTIMPL;
 }
 public void ShowUI(uint dwID, IOleInPlaceActiveObject pActiveObject, IOleCommandTarget pCommandTarget, IOleInPlaceFrame pFrame, IOleInPlaceUIWindow pDoc)
 {
     // TODO: is this okay?
     throw new NotImplementedException();
 }
 public void ShowUI(uint dwID, IOleInPlaceActiveObject pActiveObject, IOleCommandTarget pCommandTarget, IOleInPlaceFrame pFrame, IOleInPlaceUIWindow pDoc)
 {
 }
 public void ShowUI(uint dwID, IOleInPlaceActiveObject pActiveObject, IOleCommandTarget pCommandTarget, IOleInPlaceFrame pFrame, IOleInPlaceUIWindow pDoc)
 {
 }
Beispiel #9
0
 uint IDocHostUIHandler.ShowUI(uint dwID, IOleInPlaceActiveObject pActiveObject, IOleCommandTarget pCommandTarget, IOleInPlaceFrame pFrame, IOleInPlaceUIWindow pDoc)
 {
     return(S_FALSE);
 }
        public int ShowUI(DOCHOSTUITYPE dwID, IOleInPlaceActiveObject pActiveObject, IOleCommandTarget pCommandTarget, IOleInPlaceFrame pFrame, IOleInPlaceUIWindow pDoc)
        {
            // log access to method
            LOG("IDocHostUIHandler", "ShowUI");

            return docHostUIHandler.ShowUI(dwID, pActiveObject, pCommandTarget, pFrame, pDoc);
        }
 /// <summary>
 /// Called by MSHTML to enable the host to replace MSHTML menus and toolbars
 /// </summary>
 /// <param name="dwID">DWORD that receives a DOCHOSTUITYPE value indicating the type of user interface (UI)</param>
 /// <param name="pActiveObject">Pointer to an IOleInPlaceActiveObject interface for the active object</param>
 /// <param name="pCommandTarget">Pointer to an IOleCommandTarget interface for the object</param>
 /// <param name="pFrame">Pointer to an IOleInPlaceFrame interface for the object. Menus and toolbars must use this parameter</param>
 /// <param name="pDoc">Pointer to an IOleInPlaceUIWindow interface for the object. Toolbars must use this parameter</param>
 /// <returns>S_OK -- Host displayed its own UI. MSHTML will not display its UI.
 /// S_FALSE -- Host did not display its own UI. MSHTML will display its UI</returns>
 int IDocHostUIHandler2.ShowUI(DOCHOSTUITYPE dwID, IOleInPlaceActiveObject pActiveObject, IOleCommandTarget pCommandTarget, IOleInPlaceFrame pFrame, IOleInPlaceUIWindow pDoc)
 {
     // Host did not display any UI. MSHTML will display its UI.
     return HRESULT.S_FALSE;
 }
Beispiel #12
0
 public static extern int OleSetMenuDescriptor(IntPtr holemenu, IntPtr hwndFrame, IntPtr hwndActiveObject, ref IOleInPlaceFrame lpFrame, ref IOleInPlaceActiveObject lpActiveObj);
Beispiel #13
0
 uint IDocHostUIHandler.ShowUI(uint dwID, IOleInPlaceActiveObject pActiveObject, IOleCommandTarget pCommandTarget, IOleInPlaceFrame pFrame, IOleInPlaceUIWindow pDoc)
 {
     return S_FALSE;
 }
Beispiel #14
0
 public int ShowUI(int dwID, IOleInPlaceActiveObject activeObject,
     IOleCommandTarget commandTarget, IOleInPlaceFrame frame, IOleInPlaceUIWindow doc)
 {
     //Debug.WriteLine("ShowUI");
     return HRESULT.S_OK;
 }
Beispiel #15
0
        public int GetWindowContext(out IOleInPlaceFrame ppFrame, out IOleInPlaceUIWindow
            ppDoc, RECT lprcPosRect, RECT lprcClipRect, tagOIFI lpFrameInfo)
        {

            ppDoc = null; //set to null because same as Frame window
            ppFrame = (IOleInPlaceFrame)this;
            if (lprcPosRect != null)
            {
                win32.GetClientRect(container.Handle, lprcPosRect);
            }

            if (lprcClipRect != null)
            {
                win32.GetClientRect(container.Handle, lprcClipRect);
            }

            //lpFrameInfo.cb = Marshal.SizeOf(typeof(tagOIFI));
            //This value is set by the caller

            lpFrameInfo.fMDIApp = 0;
            lpFrameInfo.hwndFrame = container.Handle;
            lpFrameInfo.hAccel = IntPtr.Zero;
            lpFrameInfo.cAccelEntries = 0;
            return HRESULT.S_OK;
        }
 public int ShowUI(int dwID, IOleInPlaceActiveObject activeObject, IOleCommandTarget commandTarget, IOleInPlaceFrame frame, IOleInPlaceUIWindow doc)
 {
     return 1;
 }
 int IDocHostUIHandler.ShowUI(int dwID, IOleInPlaceActiveObject activeObject, IOleCommandTarget commandTarget, IOleInPlaceFrame frame, IOleInPlaceUIWindow doc)
 {
     //activeObject.GetWindow should return Internet Explorer_Server hwnd
     if (activeObject != null)
         activeObject.GetWindow(ref m_hWBServerHandle);
     return Hresults.S_OK;
 }
Beispiel #18
0
 public int ShowUI(int dwID, IOleInPlaceActiveObject activeObject,
                   IOleCommandTarget commandTarget, IOleInPlaceFrame frame, IOleInPlaceUIWindow doc)
 {
     //Debug.WriteLine("ShowUI");
     return(HRESULT.S_OK);
 }
Beispiel #19
0
 public int ShowUI(int dwID, IOleInPlaceActiveObject activeObject, IOleCommandTarget commandTarget, IOleInPlaceFrame frame, IOleInPlaceUIWindow doc)
 {
     return(1);
 }
Beispiel #20
0
 public static extern int OleTranslateAccelerator(ref IOleInPlaceFrame lpFrame, ref tagOIFI lpFrameInfo, ref tagMSG lpmsg);
        /// <summary>
        /// Enables the in-place object to retrieve the window interfaces that form
        /// the window object hierarchy, and the position in the parent window where
        /// the object's in-place activation window should be placed.
        /// </summary>
        /// <param name="ppFrame">IOleInPlaceFrame</param>
        /// <param name="ppDoc">IOleInPlaceUIWindow</param>
        /// <param name="lprcPosRect">Rectangle to position object within</param>
        /// <param name="lprcClipRect">Clipping rectangle for object</param>
        /// <param name="lpFrameInfo">Pointer to an OLEINPLACEFRAMEINFO structure the
        /// container is to fill in with appropriate data</param>
        public void GetWindowContext(out IOleInPlaceFrame ppFrame, out IOleInPlaceUIWindow ppDoc,
            out RECT lprcPosRect, out RECT lprcClipRect, ref OLEINPLACEFRAMEINFO lpFrameInfo)
        {
            // log access to method
            LOG("IOleInPlaceSite", "GetWindowContext");

            // provide pointers to our frame and in-place UI window (the user-control
            // provides the implemenation of both)
            ppFrame = (IOleInPlaceFrame)this;
            ppDoc = (IOleInPlaceUIWindow)this;

            // Get our window-rect
            RECT containerRect;
            GetContainerRect(out containerRect);

            // Set position within the container (allow it to fill the container)
            lprcPosRect = containerRect;

            // Set clipping rectangle (allow painting in entire container)
            lprcClipRect = containerRect;

            // Set frame info (no accelerator table provided, we don't need to
            // since MSHTML is an in-process server we will get first crack at
            // all acclerators).
            lpFrameInfo.cb = (uint)Marshal.SizeOf(typeof(OLEINPLACEFRAMEINFO));
            lpFrameInfo.fMDIApp = false;
            lpFrameInfo.hwndFrame = this.Handle;
            lpFrameInfo.haccel = IntPtr.Zero;
            lpFrameInfo.cAccelEntries = 0;
        }
Beispiel #22
0
 public int ShowUI(int dwID, IOleInPlaceActiveObject activeObject, Object
                   /* IOleCommandTarget */ commandTarget, IOleInPlaceFrame frame, Object doc)
 {
     return(HRESULT.S_OK);
 }
 public virtual int ShowUI(DOCHOSTUITYPE dwID, IOleInPlaceActiveObject pActiveObject, IOleCommandTarget pCommandTarget, IOleInPlaceFrame pFrame, IOleInPlaceUIWindow pDoc)
 {
     // Host did not display any UI. MSHTML will display its UI.
     return(HRESULT.S_FALSE);
 }
 public virtual int ShowUI(
     int dwID, IOleInPlaceActiveObject activeObject, IOleCommandTarget commandTarget, IOleInPlaceFrame frame, IOleInPlaceUIWindow doc)
 {
     return HResult.S_OK;
 }