3

I have created a context menu using Shell Extension DLL (C++). When user clicks on any explorer folder, the newly created context menu will be displayed which has sub menus. I want to add a line separator between the sub menus

4

2 回答 2

7

使用

InsertMenu(hMenu, indexMenu++, MF_SEPARATOR|MF_BYPOSITION, 0, NULL);

对我来说很好。作为hMenu菜单句柄,并indexMenu作为要插入的菜单项索引。

于 2012-02-23T15:16:00.453 回答
2

当您添加响应项时与标志一起QueryContextMenu使用。InsertMenuItemMFT_SEPARATOR

于 2012-02-21T17:59:29.620 回答