Example #1
0
 internal static extern LRESULT DispatchMessage(ref MSG msg);
Example #2
0
 internal static extern BOOL TranslateMessage(ref MSG lpMsg);
Example #3
0
 internal static extern bool PeekMessage(ref MSG msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, PeekMessageFlags flags);
Example #4
0
 //[return: MarshalAs(UnmanagedType.Bool)]
 internal static extern INT GetMessage(ref MSG msg,
     IntPtr windowHandle, int messageFilterMin, int messageFilterMax);
        void ProcessEvents()
        {
            Native = ConstructMessageWindow();
            CreateDrivers();

            // Subclass the window to retrieve the events we are interested in.
            OldWndProc = Functions.SetWindowLong(Parent.Handle, WndProc);
            Debug.Print("Input window attached to {0}", Parent);

            InputReady.Set();

            MSG msg = new MSG();
            while (Native.Exists)
            {
                int ret = Functions.GetMessage(ref msg, Parent.Handle, 0, 0);
                if (ret == -1)
                {
                    throw new PlatformException(String.Format(
                        "An error happened while processing the message queue. Windows error: {0}",
                        Marshal.GetLastWin32Error()));
                }

                Functions.TranslateMessage(ref msg);
                Functions.DispatchMessage(ref msg);
            }
        }
Example #6
0
 private void ProcessEvents()
 {
     this.Native = this.ConstructMessageWindow();
       this.CreateDrivers();
       this.OldWndProc = Functions.SetWindowLong(this.Parent.WindowHandle, this.WndProc);
       this.InputReady.Set();
       MSG msg = new MSG();
       while (this.Native.Exists)
       {
     if (Functions.GetMessage(ref msg, this.Parent.WindowHandle, 0, 0) == -1)
       throw new PlatformException(string.Format("An error happened while processing the message queue. Windows error: {0}", (object) Marshal.GetLastWin32Error()));
     Functions.TranslateMessage(ref msg);
     Functions.DispatchMessage(ref msg);
       }
 }
Example #7
0
 internal static bool TranslateMessage(ref MSG lpMsg);
Example #8
0
 internal static IntPtr DispatchMessage(ref MSG msg);
Example #9
0
 internal static extern bool TranslateMessage(ref MSG lpMsg);
Example #10
0
 internal static extern IntPtr DispatchMessage(ref MSG msg);
Example #11
0
 internal static extern bool PeekMessage(ref MSG msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, int flags);