f



Check for menu activity

Hello,
Is there a way to find out if the menu is active, other than figuring it out
from messages like WM_INITMENU and WMENTERMENULOOP.
I am looking for a function like this

bool isActive=MenuIsActive(hmenu);

with MenuIsActive a WIN32 API function and hmenu of type HMENU.
Does such a function exist?

-X


0
Agent
11/21/2003 10:04:27 AM
comp.os.programmer.win32 14522 articles. 0 followers. Post Follow

3 Replies
254 Views

Similar Articles

[PageSpeed] 29

"Agent Mulder" <mbmulder_remove_this_@home.nl> wrote in message
news:bpkngd$un3$1@news2.tilbu1.nb.home.nl...
> Hello,
> Is there a way to find out if the menu is active, other than figuring it
out
> from messages like WM_INITMENU and WMENTERMENULOOP.
> I am looking for a function like this
>
> bool isActive=MenuIsActive(hmenu);
>
> with MenuIsActive a WIN32 API function and hmenu of type HMENU.
> Does such a function exist?
>
> -X
>
>

By active you mean...?

-- 
Derek


0
Derek
11/21/2003 10:05:42 AM
> > Is there a way to find out if the menu is active

> By active you mean...?

Activated by the user with the ALT key or clicked
with the mouse. One of the submenu's from the main menu
is showing. Traditional menu at the top of the window, no
popup somewhere (so far).

Also, is there a way to force to redraw a menu while
it is 'active'? One of my menu's shows selections with
a radio mark next to it. I want the user to pre-select
the menu item by a right mouse click. The menu stays
active, showing, but the radio mark jumps to the right
clicked item. I have problems removing the stale radio
mark from the previous selection. Only the highlighted
menu item is updated, ie radio checked, but other radio
marks on the menu stay visible, although I marked them
unchecked with MF_UNCHECK.

-X


0
Agent
11/21/2003 10:21:02 AM
Agent Mulder" <mbmulder_remove_this_@home.nl> wrote in message
news:bpkofk$bni$1@news1.tilbu1.nb.home.nl...
> > > Is there a way to find out if the menu is active
>
> > By active you mean...?
>
> Activated by the user with the ALT key or clicked
> with the mouse. One of the submenu's from the main menu
> is showing. Traditional menu at the top of the window, no
> popup somewhere (so far).
>
> Also, is there a way to force to redraw a menu while
> it is 'active'? One of my menu's shows selections with
> a radio mark next to it. I want the user to pre-select
> the menu item by a right mouse click. The menu stays
> active, showing, but the radio mark jumps to the right
> clicked item. I have problems removing the stale radio
> mark from the previous selection. Only the highlighted
> menu item is updated, ie radio checked, but other radio
> marks on the menu stay visible, although I marked them
> unchecked with MF_UNCHECK.
>
> -X
>
>

Do you have the Win32 Programmer's Reference?

If not get it here:

http://info.borland.com/devsupport/borlandcpp/patches/BC52HLP1.ZIP

Sections in there on menu messages and functions.

WM_MENUSELECT gets sent when a menu item gets highlighted whether by mouse
or keyboard.

Might also want to look at GetMenuState / GetMenuItemInfo.

As to the redraw is DRAWMENUBAR not working?

-- 
Derek


0
Derek
11/21/2003 10:36:45 AM
Reply: