Details for context menu related events.
상속: CancelEventArgs
예제 #1
0
 /// <summary>
 /// Raises the WndProcHitTest event.
 /// </summary>
 /// <param name="e">A ViewControlHitTestArgs containing the event data.</param>
 protected virtual void OnWndProcHitTest(ViewControlHitTestArgs e)
 {
     if (WndProcHitTest != null)
     {
         WndProcHitTest(this, e);
     }
 }
예제 #2
0
        /// <summary>
        /// Process Windows-based messages.
        /// </summary>
        /// <param name="m">A Windows-based message.</param>
        protected override void WndProc(ref Message m)
        {
            // Only interested in intercepting the hit testing
            if (m.Msg == PI.WM_NCHITTEST)
            {
                // Extract the screen point for the hit test
                Point screenPoint = new Point((int)m.LParam.ToInt64());

                // Generate event so message can be processed
                ViewControlHitTestArgs args = new ViewControlHitTestArgs(PointToClient(screenPoint));
                OnWndProcHitTest(args);

                if (!args.Cancel)
                {
                    m.Result = args.Result;
                    return;
                }
            }

            base.WndProc(ref m);
        }
 private void OnChildWndProcHitTest(object sender, ViewControlHitTestArgs e)
 {
     if (_ribbonTabs != null)
     {
         if (_ribbonTabs.GetViewForSpare != null)
         {
             if (_ribbonTabs.GetViewForSpare.ClientRectangle.Contains(e.Point))
             {
                 e.Cancel = false;
                 e.Result = (IntPtr)PI.HTTRANSPARENT;
             }
         }
     }
 }
예제 #4
0
 /// <summary>
 /// Raises the WndProcHitTest event.
 /// </summary>
 /// <param name="e">A ViewControlHitTestArgs containing the event data.</param>
 protected virtual void OnWndProcHitTest(ViewControlHitTestArgs e)
 {
     WndProcHitTest?.Invoke(this, e);
 }
예제 #5
0
파일: ViewControl.cs 프로젝트: yp25/Krypton
        /// <summary>
        /// Process Windows-based messages.
        /// </summary>
        /// <param name="m">A Windows-based message.</param>
        protected override void WndProc(ref Message m)
        {
            // Only interested in intercepting the hit testing
            if (m.Msg == PI.WM_NCHITTEST)
            {
                // Extract the screen point for the hit test
                Point screenPoint = new Point((int)m.LParam.ToInt64());

                // Generate event so message can be processed
                ViewControlHitTestArgs args = new ViewControlHitTestArgs(PointToClient(screenPoint));
                OnWndProcHitTest(args);

                if (!args.Cancel)
                {
                    m.Result = args.Result;
                    return;
                }
            }

            base.WndProc(ref m);
        }
예제 #6
0
파일: ViewControl.cs 프로젝트: yp25/Krypton
 /// <summary>
 /// Raises the WndProcHitTest event.
 /// </summary>
 /// <param name="e">A ViewControlHitTestArgs containing the event data.</param>
 protected virtual void OnWndProcHitTest(ViewControlHitTestArgs e)
 {
     if (WndProcHitTest != null)
         WndProcHitTest(this, e);
 }