Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Closed] Menu click
#1
Hi Gintaras,

is it possible after x.showmenu (or x.show) to determine which mouse key did select an item?
#2
Want to select with right button? With QM menu functions can only with left button.

EDIT: Also can with right button, use tpmFlags TPM_RIGHTBUTTON. But cannot know then.
#3
Ok, as windows allows both.
Thanks anyway.

A thought: would it work just after the menu is shown to wait for a right mouse click, get the menu item under cursor and get the item value ?

What I want to do is send menuitem value to a window by left click, or copy to clipboard menutiem value by right click.

Can we cheat like that?
#4
The menu must have an owner window, for example a hidden dialog. On right-click the dialog procedure will receive message WM_MENURBUTTONUP.
I added this code to drag_drop_text_menu_manager, now on right-click it shows another menu.
#5
Cool, I just tweaked the code to be able to directly copy to clipboard on right click,
in fact added the same code to autoclose menu on paste in clipboard (right click) from left click.

Function drag_drop_text_menu_manager
Code:
Copy      Help
;gRight
i=DDTM_GetItem(lParam wParam t_csv); if(i<0) ret
_s=DDTM_GetItemText(t_csv i); _s.setclip
w=child(mouse 1)
act w; err
xm p w 1
xy=p.y<<16|p.x
SendMessage w WM_LBUTTONDOWN MK_LBUTTON xy
SendMessage w WM_LBUTTONUP 0 xy
#6
To close menu - function EndMenu.
#7
Acknowledged.


Forum Jump:


Users browsing this thread: 1 Guest(s)