DockResizeFilter.PreFilterMessage Method
Parameters
- m
 - Message
 
The message to be dispatched. You cannot modify this message.
Return Value
booltrue to filter the message and stop it from being dispatched; false to allow the message to continue to the next filter or control.
Implements
IMessageFilter.PreFilterMessage
public bool PreFilterMessage(ref Message m)
 {
     if (!(m.Msg == (int)Enums.WINDOW_MESSAGE.MOUSE_MOVE ||
           m.Msg == (int)Enums.WINDOW_MESSAGE.L_BUTTON_DOWN ||
           m.Msg == (int)Enums.WINDOW_MESSAGE.L_BUTTON_UP ||
           m.Msg == (int)Enums.WINDOW_MESSAGE.L_BUTTON_DBL_CLK ||
           m.Msg == (int)Enums.WINDOW_MESSAGE.R_BUTTON_DOWN ||
           m.Msg == (int)Enums.WINDOW_MESSAGE.R_BUTTON_UP ||
           m.Msg == (int)Enums.WINDOW_MESSAGE.R_BUTTON_DBL_CLK))
         return false;
     if (m.Msg == (int)Enums.WINDOW_MESSAGE.L_BUTTON_UP)
     {
         if (_isDragging)
         {
             StopDrag();
             return true;
         }
     }
     if (m.Msg == (int)Enums.WINDOW_MESSAGE.L_BUTTON_UP &&
         !_isDragging)
         return false;
     if (_isDragging)
         Cursor.Current = _activeSplitter.ResizeCursor;
     if (m.Msg == (int)Enums.WINDOW_MESSAGE.MOUSE_MOVE &&
         !_isDragging &&
         _dockPanel.MouseButtonState !=
         MouseButtons.None)
         return false;
     var control = Control.FromHandle(m.HWnd);
     if (control == null)
         return false;
     if (!(control == _dockPanel || _dockPanel.Contains(control)))
         return false;
     CheckCursor();
     if (m.Msg == (int)Enums.WINDOW_MESSAGE.L_BUTTON_DOWN)
     {
         var hotSplitter = HotSplitter();
         if (hotSplitter != null)
         {
             StartDrag(hotSplitter);
             return true;
         }
     }
     if (HotSplitter() != null)
         return true;
     if (_isDragging)
         return true;
     return false;
 }
								
				This language is not supported or no code example is available.