Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a separator between context menus using shell extension dll C++

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

like image 526
Ullan Avatar asked Dec 05 '25 02:12

Ullan


1 Answers

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.

like image 78
Stefan Avatar answered Dec 08 '25 01:12

Stefan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!