NppCppMSVS: A Visual Studio Project Template for a Notepad++ C++ Plugin
-
I’ve been working on this and I put a first version on GitHub:
NppCppMSVS version 1.0: A Visual Studio Project Template for a Notepad++ C++ Plugin
This is a Visual Studio template, not a GitHub template; you download the zip file, put it in
…\Documents\Visual Studio 2022\Templates\ProjectTemplates
and it shows up as a template when you create a new project in Visual Studio.There will surely be mistakes, but it does create a working plugin that you can use as a starting point. It sets up the C++ interface for Scintilla and includes examples of non-modal and docking dialogs, an About box, a Settings dialog, and an easy-to-use mechanism for saving settings in a JSON configuration file. There is a help file.
This is not a “definitive” template, nor is it endorsed by anyone with any authority to endorse anything. It might help you, it might not. It might change. It definitely reflects my own programming style, which I am certain is not for everyone.
Those points made, I welcome comments, suggestions and observations.
-
@Coises said in NppCppMSVS: A Visual Studio Project Template for a Notepad++ C++ Plugin:
…\Documents\Visual Studio 2022\Templates\ProjectTemplates
I don’t happen to have this directory setup. Am I supposed to make it? Or does the Community Edition not have this layout because it’s a Community edition?
Edit: Or did I make my directory when I installed it, point to other than what it wanted to. :-)
-
@Lycan-Thrope said in NppCppMSVS: A Visual Studio Project Template for a Notepad++ C++ Plugin:
I don’t happen to have this directory setup. Am I supposed to make it? Or does the Community Edition not have this layout because it’s a Community edition?
I have Community edition, so that’s not the cause.
Try this. Open any C++ project you have in Visual Studio 2022. From the Project menu, select Export Template…. The dialog should show Project template and your project selected. Click Next >.
Now, look at what it shows as the Output Location. You can copy that to the clipboard, excluding the file name at the end, and click Cancel.
Now close Visual Studio and go to the location you copied (e.g., Win+R, paste and OK).
Go up a folder level; a sibling of the folder of which you copied the path should be named Templates, and inside that should be the Project Templates folder. Inside that folder is where you want to put the zip file.
-
@Lycan-Thrope said in NppCppMSVS: A Visual Studio Project Template for a Notepad++ C++ Plugin:
I don’t happen to have this directory setup. Am I supposed to make it? Or does the Community Edition not have this layout because it’s a Community edition?
Edit: Or did I make my directory when I installed it, point to other than what it wanted to. :-)
I have a better answer than my previous one. Open Visual Studio 2022 and choose Continue without code.
From the menu bar, select Tools | Options….
In the Projects and Solutions section, select Locations.
User project template location shows the path to the correct folder in which to place the zip file.
Note that the “Source code (zip)” won’t work, because GitHub adds an extra folder level which Visual Studio won’t accept. Use NppCppMSVS-1.0.zip (and don’t unzip it).
-
@Coises ,
This was much easier to follow, and it’s installed and I saw that it was there. Thanks. That’s it for now, as I’ve already burned my candle on both ends for now and am needing sleep, so…will play more later with your instructions to see how it fares. Thanks for the assist.