Posts

Showing posts with the label NotepadPlusPlusPluginPack.Net

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

Creating Your First Notepad++ Plugin Using Visual Studio 2019 And C#

Image
Hello, In this blog post, I'll demonstrate on how to develop a Notepad++ Plugin (64 Bit) using Visual Studio 2019 and C# assuming that you have installed a 64 Bit version of the latest Notepad++ Editor. This tutorial is based from kblisted Notepad++ Plugin Package in GitHub . The plugin's architecture can communicate with the Notepad++ or the underlying Scintilla engine using NotepadPlusPlusGateway and ScintillaGateWay and Win32 API. To start with, download the Notepad++ Plugin Pack from the GitHub page and copy the zip file to the Project Templates folder of your Visual Studio 2019 IDE. In my laptop, the path is "C:\Users\my_username\Documents\Visual Studio 2019\Templates\ProjectTemplates\Visual C#" . Open your Visual Studio 2019 IDE and create a project using the Notepad++ Plugin template. Change the Platform Target to x64. (Our OS is Windows 10 64 bit) Create a function called SetFirstCharAllWordsCap inside Main.cs that get's the entire string content

Donate