/// <summary> /// Windowthread for the tooltip /// </summary> private static void ToolTipThreadProcedure() { bool flag = true; if (tooltipWindowProcedure == null) { flag = current.RegisterWindowClass(); } if (flag) { flag = current.CreateNativeWindow(); } if (flag) { Interop.MSG interop_MSG = new Interop.MSG(); while (Interop.GetMessage(ref interop_MSG, IntPtr.Zero, 0, 0)) { Interop.TranslateMessage(ref interop_MSG); Interop.DispatchMessage(ref interop_MSG); } current._hwnd = IntPtr.Zero; if (current._windowToActivate != null) { IntPtr i = current._windowToActivate.Handle; current._windowToActivate = null; Interop.SetForegroundWindow(Interop.GetLastActivePopup(i)); } } }
/// <summary> /// Directs the preview handler to handle a keystroke passed up from the message pump of the process in which the preview handler is running. /// </summary> /// <param name="pmsg">A pointer to a window message.</param> /// <returns> /// If the keystroke message can be processed by the preview handler, the handler will process it and return S_OK. If the preview handler cannot process the keystroke message, it will offer it to the host using TranslateAccelerator. If the host processes the message, this method will return S_OK. If the host does not process the message, this method will return S_FALSE. /// </returns> int IPreviewHandler.TranslateAccelerator(Interop.MSG pmsg) { // TODO: We must offer the ability to handle the translation ourselves - currently we'll just pass onto the frame. if (previewHandlerFrame != null) { return(previewHandlerFrame.TranslateAccelerator(pmsg)); } // Return success. return(WinError.S_OK); }
private static void SplashThreadProcedure() { bool flag = true; if (splashWindowProcedure == null) { flag = current.RegisterWindowClass(); } if (flag) { flag = current.CreateNativeWindow(); } if (flag) { Interop.MSG msg = new Interop.MSG(); while (Interop.GetMessage(ref msg, IntPtr.Zero, 0, 0)) { Interop.TranslateMessage(ref msg); Interop.DispatchMessage(ref msg); } current._hwnd = IntPtr.Zero; if (current._windowToActivate != null) { IntPtr handle = current._windowToActivate.Handle; current._windowToActivate = null; Interop.SetForegroundWindow(Interop.GetLastActivePopup(handle)); } } }