Exemplo n.º 1
0
        private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            if (msg == OverlayMessage.WM_HOTKEY)
            {
                // we need the high-order word to get the virtual key code.
                // low-order word specifies the keys that were to be pressed in combination with the virtual key code - in our case none
                toggleRecordingKeyboardHook.OnHotKeyEvent(lParam.ToInt32() >> 16);
                toggleVisibilityKeyboardHook.OnHotKeyEvent(lParam.ToInt32() >> 16);
                toggleGraphVisibilityKeyboardHook.OnHotKeyEvent(lParam.ToInt32() >> 16);
                toggleBarVisibilityKeyboardHook.OnHotKeyEvent(lParam.ToInt32() >> 16);
                toggleLagIndicatorVisibilityKeyboardHook.OnHotKeyEvent(lParam.ToInt32() >> 16);
            }
            else if (msg == OverlayMessage.overlayMessage)
            {
                OverlayMessageType messageType = (OverlayMessageType)wParam.ToInt32();
                overlayTracker.ReceivedOverlayMessage(messageType, lParam);
            }
            else if (msg == presentMon.GetPresentMonRecordingStopMessage())
            {
                ToggleRecordingKeyDownEvent(); // Signal the recording to stop.
            }

            UpdateUserInterface();
            return(IntPtr.Zero);
        }
Exemplo n.º 2
0
        private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            if (msg == OverlayMessage.overlayMessage)
            {
                OverlayMessageType messageType = (OverlayMessageType)wParam.ToInt32();
                overlayTracker.ReceivedOverlayMessage(messageType, lParam);
            }
            else if (msg == presentMon.GetPresentMonRecordingStopMessage())
            {
                TogglePresentMonRecording(); // Signal the recording to stop.
            }

            UpdateUserInterface();
            return(IntPtr.Zero);
        }