Highlighting a menu item in VC++

Hi Guys,

I want to highlight a menu item in VC++, I used the following function SetMenuItemInfo, but when I read the documentation, the documentation says that I cannot change the state of an item using this function, so I tried to send an Ownerdraw message but it also doesn't work with me, So please can anyone help me in how I can highlight a menu item?

Thanx in advance.
Who is Participating?
It is up to the user to decide which menu item to hightlight (highlighting meaning that the background of the item goes dark and the lettering goes light.  The highlighted menu item is the one that will be executed when the user presses Enter).

I can't really think of any reason to programmatically highlight a specific menu item.  It is counter to windows GUI programming guidelines.

You might be interested in what is called the "default" menu item -- it is the one with bold text.  Or you might be interested in setting a checkmark on an item.  Please describe your goal.

-- Dan
You can do the highlighting with bitmapped menus if it is worth doing it.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.