Posts

Showing posts from September, 2024

Donate

Add Menu Separator To Notepad++ Using The Notepad++ Plugin Pack In C#

Image
Hello, I'm currently adding modules to my Notepad++ plugin project and we noticed that the menu items are growing. So our architect suggested that it needs to be grouped and using a line separator for organization and proper grouping. At the moment, the menu itmes for the plugin isn't grouped based from the screenshot below. And here's the C# code to add the menu items. internal static void CommandMenuInit() { StringBuilder sbIniFilePath = new StringBuilder(Win32.MAX_PATH); Win32.SendMessage(PluginBase.nppData._nppHandle, ( uint )NppMsg.NPPM_GETPLUGINSCONFIGDIR, Win32.MAX_PATH, sbIniFilePath); iniFilePath = sbIniFilePath.ToString(); if (!Directory.Exists(iniFilePath)) Directory.CreateDirectory(iniFilePath); iniFilePath = Path.Combine(iniFilePath, PluginName + ".ini" ); someSetting = (Win32.GetPrivateProfileInt( "SomeSection" , "SomeKey" , 0, iniFilePath) != 0); PluginBase.SetCommand(0, "Session Laws" , SessionLaws

Donate