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

is it possible after x.showmenu (or to determine which mouse key did select an item?
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.
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?
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.
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
Copy      Help
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
SendMessage w WM_LBUTTONUP 0 xy
To close menu - function EndMenu.

Forum Jump:

Users browsing this thread: 1 Guest(s)