Announcement

Collapse
No announcement yet.

Trap keys in DDT combo

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

  • Trap keys in DDT combo

    I'm trying to trap keys in a DDT dialog with a subclassed ComboBox. What I would like, is that if the combobox has focus, users are able to use the INS/DEL key to insert or delete items from the combobox. Subclassing works fine with edit controls and listboxes, but somehow not with combo's. (You can only intercept %WM_ENTER/%WM_ESC/%WM_TAB/etc..) Edit controls and Listboxes generate a %WM_KEYDOWN, but combo's don't.
    Regards,
    Peter

    "Simplicity is a prerequisite for reliability"

  • #2
    technic, described in my message in http://www.powerbasic.com/support/pb...ad.php?t=12662
    works with all controls.
    insert after while getmessage(msg, %null, 0, 0) following
    if msg.hwnd = getdlgitem(hdlg, 301) and _
    (msg.message = %wm_keydown) then ...

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

    Comment


    • #3
      Thanks,
      I've found that adding the %CBS_SIMPLE style to the combobox also makes it generate key events...
      Peter

      ------------------
      Regards,
      Peter

      "Simplicity is a prerequisite for reliability"

      Comment

      Working...
      X