Positioning of a menu item image (hbmpItem of a MENUITEMINFO) in a context menu

后端 未结 1 1832
醉话见心
醉话见心 2021-01-24 03:22

I am inserting a menu item into an Outlook Context menu for a subject text control. Here you can find a previous question I had on doing this.

The issue I have is that t

1条回答
  •  野的像风
    2021-01-24 03:52

    I have two answers to this problem.

    I indicated above that the issue existed on an menu in Outlook 2010 but not in Outlook 2007. This is not true. These office versions are of course on different computers and it was a display setting in windows that was the cause of the problem. The above menu is what you get when you have the setting "Use Visual Styles on Windows and buttons" in Performance Options > Visual Effects turned off (Win 7). If you enable this setting then the menus look and especially act very differently.

    But what if a user disables this setting how can you deal with it (Not sure if this is relevant for Win10).

    You need to set the menu style through the use of the Menuinfo in particular you need to set the flag MNS_NOCHECK. Then the space is gone as the menu no longer is expecting the check marks.

    This solution can also be seen here in another stackoverflow answer.

    0 讨论(0)
提交回复
热议问题