[WIN] Win32Lib Combo *list* not respond to *right* click?

new topic     » topic index » view thread      » older message » newer message

Matt, Derek, David, etc:

I've been trying to adapt Al Getz's method of using right-click to select an
item in a list, so that it could allow right click on a *Combo box's* list,
but it won't work.  I'm wondering if maybe Win32Lib events don't *respond*
to right-click in Combo's *list* at all??

It that's true, maybe that capability could be added to an upcoming version
of Win32Lib?  And, also if that's true, I suspect it's possible to add that
option to a program using the "general" event routine, but I don't know how.
Any help would be appreciated.

Dan Moyer

P.S.

Here's my variation of what Al sent me, to try to make right-click work in
combo box list; it demos that right-click only seems to work on the *edit*
box portion of the combo box, not on the *list* portion:

<code follows:>

constant CB_GETITEMHEIGHT = #0154,
             CB_GETTOPINDEX    = #015B  --         0x015b

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

procedure onMouse_EuRoutinesCombo(integer event, integer x, integer y,
integer shift)
atom index,bool,height,topindex,indexoffset
sequence itemtext


if event=RIGHT_DOWN then  -- note: can use "RightDown", also
-- start of "housekeeping" to allow right click to work:
   height=sendMessage(EuRoutinesCombo,CB_GETITEMHEIGHT,0,0)
   topindex=sendMessage(EuRoutinesCombo,CB_GETTOPINDEX,0,0)
   indexoffset=floor(y/height)
   index=indexoffset+topindex
   bool=sendMessage(EuRoutinesCombo,CB_SETCURSEL,index,0)
   index +=1
--   NOTE:  USE "index" TO REFERENCE TO ITEM SELECTED BY RIGHT CLICK
-- end of right click housekeeping

   end if
end if
end procedure

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu