<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Multi menu in my plugins]]></title><description><![CDATA[<p dir="auto">Is this possible for creating multi menu in my plugin?</p>
<p dir="auto">For example:<br />
This is demo plugin menu<br />
it only has one layer<br />
<img src="https://camo.nodebb.org/1187d8b963fb2385e17175b1b442b9a2e46a751a?url=https%3A%2F%2Fi.imgur.com%2FMxuMzOa.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">How to modify like this(two layer)<br />
<img src="https://camo.nodebb.org/3a4861640a25e8648f13c1e85378707410253861?url=https%3A%2F%2Fi.imgur.com%2FWdPcixl.jpg" alt="alt text" class=" img-fluid img-markdown" /></p>
<p dir="auto">Thanks,<br />
John</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22452/multi-menu-in-my-plugins</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 15:25:31 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22452.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 29 Jan 2022 03:03:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Multi menu in my plugins on Mon, 31 Jan 2022 09:48:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/john-huang" aria-label="Profile: john-huang">@<bdi>john-huang</bdi></a></p>
<p dir="auto">From Npp’s point of view you only provide the main menu via the function item array, everything else has to be handled by your plugin.<br />
To do that, ask Npp for the <a href="https://github.com/bruderstein/PythonScript/blob/b6ef33e8c0327070b70a2f0f316b573e91e11364/PythonScript/src/MenuManager.cpp#L273" rel="nofollow ugc">plugin menu handle</a> and once you have it, find the menu item you want to add sub-items to like <a href="https://github.com/bruderstein/PythonScript/blob/b6ef33e8c0327070b70a2f0f316b573e91e11364/PythonScript/src/MenuManager.cpp#L304" rel="nofollow ugc">here</a>.<br />
Now, to know when an npp user has clicked on such a menu item, you need to listen to the <a href="https://github.com/bruderstein/PythonScript/blob/3d3fbeb755946f4cf1a92d864b6303aff78f385b/PythonScript/src/PythonScript.cpp#L363" rel="nofollow ugc">messageProc</a> and <a href="https://github.com/bruderstein/PythonScript/blob/3d3fbeb755946f4cf1a92d864b6303aff78f385b/PythonScript/src/PythonScript.cpp#L422" rel="nofollow ugc">act accordingly</a>.<br />
If it is necessary to manipulate the main menu of the plugin at runtime, then you need to ask Npp for a <a href="https://npp-user-manual.org/docs/plugin-communication/#nppm-allocatecmdid" rel="nofollow ugc">list of pre-assigned menu items</a>.<br />
I agree that this part could be described in more detail in the manual, which I will do soon.<br />
If there is anything else that you think is not well described or maybe irritating, let us know.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a></p>
<blockquote>
<p dir="auto">It is the same for any Windows program coding.</p>
</blockquote>
<p dir="auto">Creating the menu, yes, but with some Npp-related *quirks that I hope I described clearly above.</p>
<p dir="auto">*can’t find another/better word for it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73505</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73505</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Mon, 31 Jan 2022 09:48:28 GMT</pubDate></item><item><title><![CDATA[Reply to Multi menu in my plugins on Sun, 30 Jan 2022 13:47:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/john-huang" aria-label="Profile: john-huang">@<bdi>john-huang</bdi></a> said in <a href="/post/73477">Multi menu in my plugins</a>:</p>
<blockquote>
<p dir="auto">How to create two menu layer for the Notepad++ plugins.</p>
</blockquote>
<p dir="auto">It is the same for any Windows program coding.<br />
Suggest you take it to a more appropriate forum where you will get better help.<br />
It really is off-topic here.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73478</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73478</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 30 Jan 2022 13:47:47 GMT</pubDate></item><item><title><![CDATA[Reply to Multi menu in my plugins on Sun, 30 Jan 2022 13:25:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: ekopalypse">@<bdi>ekopalypse</bdi></a><br />
Hi Ekopalypse,<br />
Thank you for your help.</p>
<p dir="auto">It’s beyond me. How to create two menu layer for the Notepad++ plugins.</p>
<p dir="auto">I know I need to return a FuncItem * in getFuncsArray.<br />
I see the getFuncsArray() function in PythonScript.<br />
I think the key point is</p>
<pre><code>m_funcItems[position]._init2Check = false;
m_funcItems[position]._pShKey = NULL;
m_funcItems[position]._pFunc = NULL;
</code></pre>
<p dir="auto">Now I can use the FuncItem * array to create one menu layer, but<br />
I still don’t know how to create two menu layer.</p>
<p dir="auto">Please give me more information.<br />
Thank you a lof.</p>
<p dir="auto">John</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73477</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73477</guid><dc:creator><![CDATA[John Huang]]></dc:creator><pubDate>Sun, 30 Jan 2022 13:25:24 GMT</pubDate></item><item><title><![CDATA[Reply to Multi menu in my plugins on Sat, 29 Jan 2022 15:46:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/john-huang" aria-label="Profile: john-huang">@<bdi>john-huang</bdi></a></p>
<p dir="auto"><a href="https://github.com/bruderstein/PythonScript/blob/b6ef33e8c0327070b70a2f0f316b573e91e11364/PythonScript/src/MenuManager.cpp" rel="nofollow ugc">here</a> it is.<br />
And <a href="https://github.com/bruderstein/PythonScript/blob/b6ef33e8c0327070b70a2f0f316b573e91e11364/PythonScript/src/MenuManager.cpp#L273" rel="nofollow ugc">here</a> where to start.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73459</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73459</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Sat, 29 Jan 2022 15:46:28 GMT</pubDate></item><item><title><![CDATA[Reply to Multi menu in my plugins on Sat, 29 Jan 2022 12:59:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ekopalypse" aria-label="Profile: ekopalypse">@<bdi>ekopalypse</bdi></a><br />
Thanks for your information</p>
<p dir="auto">I can not find the key point.<br />
Do you an another example?</p>
<p dir="auto">I will contiune to try it.<br />
Thank you</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73455</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73455</guid><dc:creator><![CDATA[John Huang]]></dc:creator><pubDate>Sat, 29 Jan 2022 12:59:46 GMT</pubDate></item><item><title><![CDATA[Reply to Multi menu in my plugins on Sat, 29 Jan 2022 09:33:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/john-huang" aria-label="Profile: john-huang">@<bdi>john-huang</bdi></a></p>
<p dir="auto">Yes, see <a href="https://github.com/bruderstein/PythonScript" rel="nofollow ugc">https://github.com/bruderstein/PythonScript</a> for example.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73449</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73449</guid><dc:creator><![CDATA[Ekopalypse]]></dc:creator><pubDate>Sat, 29 Jan 2022 09:33:40 GMT</pubDate></item></channel></rss>