Does anyone know how I can force an owner drawn menu to generate a new WM_MEASUREITEM message? What I am trying to do is to update the menu text to include a shortcut key while the application is running, but as the menu is owner drawn, it doesn't directly contain the text that is changing, so never sends a WM_MEASUREITEM apart from when the application starts.

Any ideas?

Nick
Posted on 2003-10-31 07:54:24 by Nick
Clear MFT_OWNERDRAW flag at least for that element (I'm cleaning all submenu) and while processing WM_INITMENUPOPUP set it again.
Posted on 2003-10-31 08:07:47 by masquer
Thanks for that, seemed to work very well, even just setting the type from MFT_OWNERDRAW to MFT_STRING, and then setting it straight back in the WM_INITMENUPOPUP works.

Nick
Posted on 2003-10-31 08:59:45 by Nick