예제 #1
0
        public bool PreFilterMessage(ref Message m)
        {
            // Has a key been pressed?
            if (m.Msg == (int)Win32.Msgs.WM_KEYDOWN)
            {
                // Is it the ESCAPE key?
                if ((int)m.WParam == (int)Win32.VirtualKeys.VK_ESCAPE)
                {
                    // Are we in a redocking activity?
                    if (_intercept)
                    {
                        // Quite redocking
                        _redocker.QuitTrackingMode(null);

                        // Release capture
                        this.Capture = false;

                        // Reset state
                        _intercept = false;

                        return(true);
                    }
                }
            }

            return(false);
        }
예제 #2
0
        public bool PreFilterMessage(ref Message m)
        {
            // Has a key been pressed?
            if (m.Msg == (int)Win32.Msgs.WM_KEYDOWN)
            {
                // Is it the ESCAPE key?
                if ((int)m.WParam == (int)Win32.VirtualKeys.VK_ESCAPE)
                {
                    // Are we in redocking mode?
                    if (_redocker != null)
                    {
                        // Cancel the redocking activity
                        _redocker.QuitTrackingMode(null);

                        // Put back the page that was removed when dragging started
                        RestoreDraggingPage();

                        // No longer need the object
                        _redocker = null;

                        return(true);
                    }
                }
            }

            return(false);
        }