What is the "Right-Click Drag" Event in the ListView control called?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom P.

    What is the "Right-Click Drag" Event in the ListView control called?

    I am writting a extended ListView control and I'd like to stop the
    default behavior when a user right-clciks on a non-label area and then
    drags causing a "marching ants" selection box to appear. First, what
    event is this? And second, how do I stop it?

    I've trapped the OnItemDrag and OnDragEnter events and it's not them
    (OnDragEnter doesn't even fire).

    In OnClick I test for right-click and simply return.

    Where is this stuff?

    Tom P.
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: What is the "Right-Click Drag" Event in the ListView control called?

    Tom,

    You are probably going to have to drop down to the WndProc method
    (override it, that is) and handle the windows messages that signal the
    beginning of the right click (WM_RBUTTONDOWN ) as well as the subsequent
    messages (WM_RBUTTONUP).


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Tom P." <padilla.henry@ gmail.comwrote in message
    news:17ab347d-d610-40e6-9ee8-1b4b34b47739@v2 6g2000prm.googl egroups.com...
    >I am writting a extended ListView control and I'd like to stop the
    default behavior when a user right-clciks on a non-label area and then
    drags causing a "marching ants" selection box to appear. First, what
    event is this? And second, how do I stop it?
    >
    I've trapped the OnItemDrag and OnDragEnter events and it's not them
    (OnDragEnter doesn't even fire).
    >
    In OnClick I test for right-click and simply return.
    >
    Where is this stuff?
    >
    Tom P.

    Comment

    • Tom P.

      #3
      Re: What is the &quot;Right-Click Drag&quot; Event in the ListView controlcalled?

      That allows me to trap the series of events that cause the behavior
      but I still can't stop it.

      I'm trying to stop the drawing of the rubberband selection marquee.
      And now that I look it's happening during left-clicks as well. My
      inherited ListView is set to OwnerDraw = true but nothing I can do
      will turn the selection marquee off.

      Tom P.


      On Jul 19, 10:03 am, "Nicholas Paldino [.NET/C# MVP]"
      <m...@spam.guar d.caspershouse. comwrote:
      Tom,
      >
          You are probably going to have to drop down to the WndProc method
      (override it, that is) and handle the windows messages that signal the
      beginning of the right click (WM_RBUTTONDOWN ) as well as the subsequent
      messages (WM_RBUTTONUP).
      >
      --
       - Nicholas Paldino [.NET/C# MVP]
       - m...@spam.guard .caspershouse.c om
      >
      "Tom P." <padilla.he...@ gmail.comwrote in message
      >
      news:17ab347d-d610-40e6-9ee8-1b4b34b47739@v2 6g2000prm.googl egroups.com...
      >
      I am writting a extended ListView control and I'd like to stop the
      default behavior when a user right-clciks on a non-label area and then
      drags causing a "marching ants" selection box to appear. First, what
      event is this? And second, how do I stop it?
      >
      I've trapped the OnItemDrag and OnDragEnter events and it's not them
      (OnDragEnter doesn't even fire).
      >
      In OnClick I test for right-click and simply return.
      >
      Where is this stuff?
      >
      Tom P.

      Comment

      Working...