Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

SetMenuItmInfo doesn't produce any effect in Menu toolbar

cghersi
2014-04-21
2014-04-22
  • cghersi
    cghersi
    2014-04-21

    Hi all!

    I'm developing a plugin in C# where I need to modify at runtime the label and the enablement of some menu items.
    E.g. when the user clicks on "Logout" menu item I need to gray another item and change the label of this item to "Login".

    I used the MENUITEMINFO structure and SetMenuItemInfo(position) method but this doesn't result any change in the UI.
    Is there any other Win32 message I need to send in order to refresh the menu items?

    Thank you very much
    Best regards
    cghersi

     
  • Are you calling DrawMenuBar() after setting the info?

     
  • cghersi
    cghersi
    2014-04-22

    Ahh, that was the missing piece!
    Thank you very much, this solved my issue!