I don't know if the Windows API even exposes that information.
Maybe test which mouse button is down when the callback starts.
Code:
function menuitem_onclick(...)
if isKeyPressed(VK_LBUTTON) then
-- ...
elseif isKeyPressed(VK_RBUTTON) then
-- ...
else
-- something else or user released too quickly; safe bet is do nothing
end
end
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Joined: 09 May 2003 Posts: 25948 Location: The netherlands
Posted: Tue Jan 26, 2021 5:47 am Post subject:
Not possible with the windows api
but you can always implement your own popupmenu. Give the object a mousedown event. Then if it's a rightclick create a new form at the position of the control or mouse, and make it's items respond to mouseover like a popupmenu does, and a mousedown where you can see if it's a left or right click _________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping
Ah, that would be a chore, since i'm just modifying the disassembler's popup menu. How hard would it be for you to implement so that CE passes the mouse clicked? Something like:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum