Reputation: 1341
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
Upvotes: 3
Views: 3919
Reputation: 43585
Using
InsertMenu(hMenu, indexMenu++, MF_SEPARATOR|MF_BYPOSITION, 0, NULL);
works fine for me. With hMenu
being the menu handle, and indexMenu
as the menu item index to insert.
Upvotes: 7
Reputation: 176016
When you add the item in response to QueryContextMenu
use InsertMenuItem
with the MFT_SEPARATOR
flag.
Upvotes: 3