sub menu in npp plugin
-
Does any one know how to create a functional submenu in a plugin? Right now I am able to create a submenu, but not sure how to execute it. Once I click the items in the sub menu, there is no message (such as WM_COMMAND) passed by windows or npp into the plugin.
-
-
I figured it out finally. It’s actually pretty simple. Just specify a unique identifier (through
NPPM_ALLOCATECMDID) when creating a submenu (the uIDNewItem parameter of winAPI insertmenu function). The WM_COMMAND message will be passed to LRESULT messageProc(UINT Message, WPARAM wParam, LPARAM lParam) when the submenu is clicked.