Ejemplo n.º 1
0
        protected unsafe void FormClosed(object sender, FormClosedEventArgs e)
        {
            this.RemoveFrame();
            HWND__ *appHwnd = \u003CModule\u003E.CUIFrameMgr\u002EGetAppHWnd(\u003CModule\u003E.GetCUIFrameMgr());

            \u003CModule\u003E.BringWindowToTop(appHwnd);
            \u003CModule\u003E.SetFocus(appHwnd);
        }
Ejemplo n.º 2
0
        public unsafe void RemoveFrame()
        {
            if (this.mForm == null)
            {
                return;
            }
            this.mForm.TextChanged -= new EventHandler(this.TextChanged);
            this.mForm.FormClosed  -= new FormClosedEventHandler(this.FormClosed);
            this.mForm.SizeChanged -= new EventHandler(this.SizeChanged);
            HWND__ *hwndPtr1 = (HWND__ *)this.mForm.Handle.ToPointer();

            if (\u003CModule\u003E.IsWindow(hwndPtr1) == 0)
            {
                return;
            }
            HWND__ *   parent        = \u003CModule\u003E.GetParent(hwndPtr1);
            Interface *coreInterface = \u003CModule\u003E.GetCOREInterface();
            HWND__ *   hwndPtr2      = hwndPtr1;
            Interface *interfacePtr  = coreInterface;
            // ISSUE: cast to a function pointer type
            // ISSUE: function pointer call
            HWND__ *hwndPtr3 = __calli((__FnPtr <HWND__ *(IntPtr)>) * (long *)(*(long *)interfacePtr + 272L))((IntPtr)interfacePtr);

            \u003CModule\u003E.SetParent(hwndPtr2, hwndPtr3);
            WinFormsCUIHandler *winFormsCuiHandlerPtr1 = this.mHandler;

            if ((IntPtr)winFormsCuiHandlerPtr1 != IntPtr.Zero)
            {
                \u003CModule\u003E.ManagedServices\u002EInternal\u002EWinFormsCUIHandler\u002ERestoreStyles(winFormsCuiHandlerPtr1);
            }
            WinFormsCUIHandler *winFormsCuiHandlerPtr2 = this.mHandler;

            if ((IntPtr)winFormsCuiHandlerPtr2 != IntPtr.Zero && (int)*(byte *)((IntPtr)winFormsCuiHandlerPtr2 + 120L) != 0)
            {
                return;
            }
            this.mHandler = (WinFormsCUIHandler *)0L;
            this.mForm    = (Form)null;
            if (\u003CModule\u003E.IsWindow(parent) == 0)
            {
                return;
            }
            \u003CModule\u003E.DestroyWindow(parent);
        }
Ejemplo n.º 3
0
 public WndEventArgs(int process, HWND__ *hwnd, uint msg, uint wparam, int lparam)
 {
 }