PeekMessage() 개인적인 메소드

private PeekMessage ( MSG &msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, int flags ) : bool
msg MSG
hWnd IntPtr
messageFilterMin int
messageFilterMax int
flags int
리턴 bool
예제 #1
0
        public void ProcessEvents()
        {
            while (!IsIdle)
            {
                if (!Functions.PeekMessage(ref msg, window.WindowHandle, 0, 0, Functions.PeekMessageOption.PM_REMOVE))
                {
                    throw new PlatformException(String.Format(
                                                    "An error happened while processing the message queue. Windows error: {0}",
                                                    Marshal.GetLastWin32Error()));
                }
                //Functions.GetMessage(ref msg, window.WindowHandle, 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);
            }
        }