News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Menu

Started by ragdog, April 23, 2010, 09:12:32 PM

Previous topic - Next topic

ragdog

Hi

I have a menu bar in my Tool and now have i a quetsion
with left click can a select a function of this menu can i use i right click for a second function?

Greets,

Slugsnack

hi ragdog, afaik there is no easy way to check for right clicks from popup menus. however, just to make sure some obscure message is not being sent out, it may be worth it to use spy++ to see if anything is sent when right-clicks occur

// edit : i got bored and took my own advice :-P

http://img90.imageshack.us/img90/3633/58040721.png

i stopped logging some of the messages that are irrelevant, but WM_MENURBUTTONUP is probably the one you are interested in ^_^

donkey

There are no easy ways to trap messages from standard menus without affecting overall performance since it involves message hooks. To customize the behavior of a menu you should use a toolbar with popup menus and a hook DLL, this allows you to only hook messages while the program is waiting for input. These are fairly simple to write and will give you complete control over the menus and more flexibility in the design of your menu system. You can find a working example of menu toolbars at my website on the GoAsm Projects page.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable