Announcement

Collapse
No announcement yet.

Listbox and mouse

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Listbox and mouse

    It seems a listbox with %LBS_NOTIFY doesn't generate right mouse button events or %WM_KEYDOWN.
    Is there a way to receive them? (Want to use right mouse and INS/DEL keys...)


    ------------------
    Peter.
    mailto[email protected][email protected]</A>

    [This message has been edited by Peter Lameijn (edited April 08, 2001).]
    Regards,
    Peter

  • #2
    those are low-level messages which the control does not reflect/pass back to the parent callback, so you'll need to subclass the control in order to intercpt such messages.

    some time back, i posted an example (in the source code forum) which shows how to subclass an edit control - this exact code should work fine for subclassing a listbox.

    see

    i hope this helps!

    ------------------
    lance
    powerbasic support
    mailto:[email protected][email protected]</a>
    Lance
    mailto:[email protected]

    Comment


    • #3
      peter,

      i had a similar problem a few weeks ago. windows uses right mouse button as a getting help command - you'll get a wm_contextmenu message when you right-click on the listbox. look at http://www.powerbasic.com/support/pb...ead.php?t=3514 - fred oxenby posted a very useful sample code.

      ------------------



      [this message has been edited by aldo cavini (edited april 08, 2001).]
      Rgds, Aldo

      Comment


      • #4
        Lance, Aldo,
        Thanks! It seems both methods can solve my problem. Wouldn't it be a lot easier if
        controls had a bit more equal behaviour (Listview DOES return a right-click; why listbox not?)
        BTW: The dropdown part of a combobox doesn't seem to generate any event.
        Is this already subclassed to the edit box part?


        ------------------
        Peter.
        mailto[email protected][email protected]</A>

        [This message has been edited by Peter Lameijn (edited April 09, 2001).]
        Regards,
        Peter

        Comment

        Working...
        X