QuakeConsole.QuakeTerminal.WinEventProc C# (CSharp) 메소드

WinEventProc() 공개 메소드

public WinEventProc ( IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime ) : void
hWinEventHook System.IntPtr
eventType uint
hwnd System.IntPtr
idObject int
idChild int
dwEventThread uint
dwmsEventTime uint
리턴 void
        void WinEventProc(IntPtr hWinEventHook, uint eventType, IntPtr hwnd, int idObject, int idChild, uint dwEventThread, uint dwmsEventTime)
        {
            // if we got the EVENT_SYSTEM_FOREGROUND, and the hwnd is the putty terminal hwnd (m_AppWin)
            // then bring the supperputty window to the foreground
            bool isThis = (hwnd == ChildHandle);
            if (eventType == EVENT_SYSTEM_FOREGROUND)
            {
                HasFocus = (GetForegroundWindow() == ChildHandle);
            }
            else if (isThis && eventType == EVENT_OBJECT_NAMECHANGE)
            {
                SetCaptionFromTerminal();
            }
        }