• PythonScript, editor.markerAdd has stopped working

    18
    0 Votes
    18 Posts
    1k Views
    Alan KilbornA

    The marker ID used for bookmarks changed in Notepad++ 8.4.6 (and later). It is now 20, instead of 24. So, all references to 24 in this thread and/or its script(s), should be changed to 20.

  • Best way to add a toolbar to a dockable dialog

    6
    0 Votes
    6 Posts
    514 Views
    dipaolovD

    My solution after considering the options available. The approach is the one used by the Notepad++ code for the Function List panel, but slightly different where some data structures are not visible by the plugin code.

    First of all, create an empty dialog in the resource file. Then use the following code in the .CPP file:

    INT_PTR CALLBACK ProjectDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { // the dialog is being initialized case WM_INITDIALOG: { // create the toolbar with the specified style int style = WS_CHILD | WS_VISIBLE | CCS_ADJUSTABLE | TBSTYLE_AUTOSIZE | TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_TRANSPARENT | BTNS_AUTOSIZE | BTNS_SEP | TBSTYLE_TOOLTIPS; _hToolBar = ::CreateWindowEx(0, TOOLBARCLASSNAME, NULL, style, 0, 0, 0, 0, _hSelf, nullptr, _hInst, NULL); // set the bitmap size ::SendMessage(_hToolBar, TB_SETBITMAPSIZE, 0, MAKELPARAM(24, 24)); // get the icons from the resources TBADDBITMAP addbmp = { 0, 0 }; const int nbIcons = 8; int iconIDs[nbIcons] = { IDB_NEWPRJ, IDB_OPENPRJ, IDB_SAVEPRJ, IDB_ADDLIB, IDB_RMVLIB, IDB_ADDFILE, IDB_COMFILE, IDB_COMALL }; int iconDarkModeIDs[nbIcons] = { IDB_NEWPRJ_DM, IDB_OPENPRJ_DM, IDB_SAVEPRJ_DM, IDB_ADDLIB_DM, IDB_RMVLIB_DM , IDB_ADDFILE_DM, IDB_COMFILE_DM , IDB_COMALL_DM }; for (size_t i = 0; i < nbIcons; ++i) { int icoID = ::SendMessage(nppData._nppHandle, NPPM_ISDARKMODEENABLED, (WPARAM)0, (LPARAM(0))) ? iconDarkModeIDs[i] : iconIDs[i]; HBITMAP hBmp = static_cast<HBITMAP>(::LoadImage(_hInst, MAKEINTRESOURCE(icoID), IMAGE_BITMAP, 24, 24, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT)); addbmp.nID = reinterpret_cast<UINT_PTR>(hBmp); ::SendMessage(_hToolBar, TB_ADDBITMAP, 1, reinterpret_cast<LPARAM>(&addbmp)); } // set up the buttons TBBUTTON tbButtons[nbIcons]; tbButtons[0].idCommand = IDC_NEWPRJ; tbButtons[0].iBitmap = 0; tbButtons[0].fsState = TBSTATE_ENABLED; tbButtons[0].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE; tbButtons[0].iString = reinterpret_cast<intptr_t>(TEXT("New project...")); // set up all the other buttons // set up the tool bar and show it ::SendMessage(_hToolBar, TB_SETMAXTEXTROWS, 0, 0); ::SendMessage(_hToolBar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0); ::SendMessage(_hToolBar, TB_SETBUTTONSIZE, 0, MAKELONG(24, 24)); ::SendMessage(_hToolBar, TB_ADDBUTTONS, sizeof(tbButtons) / sizeof(TBBUTTON), reinterpret_cast<LPARAM>(&tbButtons)); ::SendMessage(_hToolBar, TB_AUTOSIZE, 0, 0); ::ShowWindow(_hToolBar, SW_SHOW); // create the other controls // the dialog was resized case WM_SIZE: { // get the new width and height of the panel int width = LOWORD(lParam); int height = HIWORD(lParam); // get the size of the toolbar RECT toolbarMenuRect; ::GetClientRect(_hToolBar, &toolbarMenuRect); // move the toolbar to the top with a margin int margin = 1; ::MoveWindow(_hToolBar, margin, margin, width, toolbarMenuRect.bottom, TRUE); // set the size of all the other controls } // manage the other messages } return DockingDlgInterface::run_dlgProc(message, wParam, lParam); }

    Hope this will help someone eventually.

  • New version 1.5 for Elastic Tabstops

    14
    1 Votes
    14 Posts
    3k Views
    Alan KilbornA

    @mariusv-github

    Users!
    Welcome to the world of (free) development!

  • Help to porting SourceCookifier for 64bit

    18
    0 Votes
    18 Posts
    5k Views
    Michael VincentM

    @ArkadiuszMichalski said in Help to porting SourceCookifier for 64bit:

    Could anyone try port the SourceCookifier plugin for the 64-bit version of Notepad ++?

    Seems the (perhaps) original author finally got around to it:

    https://github.com/notepad-plus-plus/nppPluginList/commit/4233a0171213201fc296906200d179b3ace63179

    Cheers.

  • Focusing on the open document

    5
    1 Votes
    5 Posts
    575 Views
    dipaolovD

    @dail Nice. Thanks!

    V.

  • Notepad plugin xml and json

    2
    0 Votes
    2 Posts
    6k Views
    Alan KilbornA

    @API-Support said in Notepad plugin xml and json:

    Cntrl+ALT+Shift+M and Cntrl+ALT+Shift+B

    It sounds like you have (or maybe “had”?) a plugin that maps these keys, and that plugin is missing or not loading for some reason. Notepad++ doesn’t map those keycombos itself.

  • .Net 6 based plugin

    2
    0 Votes
    2 Posts
    541 Views
    rdipardoR

    @Carlos-Henrique-Guardão-Gandarez,

    or only the plugins developed under .Net full framework are supported?

    Afraid so.

    Every plugin is fundamentally limited to whatever APIs are used by Notepad++ itself. From the very beginning, those APIs have been the oldest, lowest-level ones available.

    Microsoft’s legacy .NET Framework is guaranteed to be installed on every Windows device from Vista onward, which is why the “official” .NET plugin template exclusively targets it.

    As the template’s maintainers recently admitted on GitHub, being stuck with such an old runtime is a technical debt that all .NET plugin developers just have to put up with.

  • Why does TextFX Change Case trim off the last character that is selected?

    4
    0 Votes
    4 Posts
    418 Views
    PeterJonesP

    @Herbert-Ripka said in Why does TextFX Change Case trim off the last character that is selected?:

    Why does TextFX Change Case trim off the last character that is selected?

    Because the original TextFX is outdated, and not communicating with the Notrpad++ editor according to the current interface. You were lucky you picked an operation that just truncated, rather than one that crashes Notepad++. Do not use old TextFX with recent Notepad++.

    If you look at our TextFX FAQ , you will see a link to NppTextFX2, where @rainman74 kindly updated the original plugin to work with recent Notepad++. You have to manually install it, but it should work for you.

    But, as @Alan-Kilborn said, Notepad++ natively handles that particular operation now, no plugin needed

  • 6 Votes
    8 Posts
    8k Views
    Fruchtzwerg94F

    A few months ago, I’ve created a PR which was already merged to the plugins pack origin repo which targets at least some of the pointers:
    https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/pull/91
    And there is still one open:
    https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net/pull/95

  • Move from deprecated type/symbols/structures to valid ones

    1
    2 Votes
    1 Posts
    843 Views
    No one has replied
  • Different spacing around commas for lists

    3
    0 Votes
    3 Posts
    223 Views
    lamprey13L

    @Alan-Kilborn My Bad. I had too many windows open. I meant to post in the SQLinForm forum.

  • [New Plugin] ComparePlus v1.0.0

    30
    15 Votes
    30 Posts
    33k Views
    datatraveller1D

    Thank you @PeterJones and @Alan-Kilborn,
    As Peter suggested, I manually updated the directory c:\Program Files\Notepad++\plugins\ComparePlus\ with the content of the plugin file ComparePlus_cp_1.1.0_x64.zip successfully.

  • NppTextFx don't work with NPP 8.4.3 (x86) and above

    11
    0 Votes
    11 Posts
    1k Views
    guy038G

    Hi, @peterjones,

    As agreed, Peter, I have just sent you, five minutes ago, an e-mail with an attached file, relative to the TextFX plugin !

    Take all the time you need to read it, there is no rush !

    Best Regards

    guy038

  • CTRL+SHIFT+O no longer works. (File Switcher Plugin)

    2
    0 Votes
    2 Posts
    282 Views
    Alan KilbornA

    @ravi-sri

    You might try Navigate To plugin, but without knowing more about what sort of “quick switch” you have in mind, it is difficult to assist you.

  • Notepad++ Upgrade

    4
    0 Votes
    4 Posts
    407 Views
    Alan KilbornA

    @Hervé-Anselme

    grep and sed are a couple of quick examples.
    These are not natively Windows tools, but versions can be found that run there.

  • Use of Python Script plugin to work with FORTRAN project

    21
    1 Votes
    21 Posts
    1k Views
    Alan KilbornA

    @PeterJones said

    You (Arjan-van-Dijk) need to figure out the exact sequence of events necessary to run your gfortran command from cmd.exe.

    I think this is the absolute key point. Nobody can really help with that, because nobody has this same toolchain.

  • NPP Task List Plugin Window Overwrites

    6
    0 Votes
    6 Posts
    813 Views
    NeArnoldN

    @PeterJones I haven’t heard anything from @chcg or anyone else, but I’ve been fiddling.

    I’ve recently determined that 1) this problem is ongoing with all NPP releases through 8.4.6, and 2) it does NOT occur in dark mode. The issue will return as soon as one switches back to “light” mode. (Not a dark mode fan anyway.)

    I decided to look into the cause. I started by copying the existing v2.4 code base from Github and comparing it to the latest NPP v8.4.6 source. It appears to me that this problem is related to changes in the handling of WM_ERASEBKGND messages in the NPP DockingDlgInterface class that were added for the handling of dark mode.

    I’m going to update some of the include files and attempt to fix this issue. Never worked on a project served from Github. Hopefully when I start making pull requests, I can work with @chcg to help get a new release addressing this issue.

  • Lifecycle of a plugin

    4
    0 Votes
    4 Posts
    438 Views
    Chris De BoeckC

    @Ekopalypse said in Lifecycle of a plugin:

    @Chris-De-Boeck
    These are the methods that are called by Npp when a plugin is loaded (once, at startup).

    Thanks, that’s clear now.

  • Preferred way to work with INI files

    4
    0 Votes
    4 Posts
    608 Views
    EkopalypseE

    @Chris-De-Boeck

    Unfortunattely I don’t know much about cpp. But there is GetPrivateProfileString, not sure if this works for you.

  • TextFX Proper Case does not handle 's properly

    Locked
    4
    0 Votes
    4 Posts
    4k Views
    guy038G

    Hi, all,

    With the last version v8.4.6, I’ve just tried to use the Edit > Convert Case to > Proper Case option against this INPUT text :

    McDonald MacDonald O'Neil Google's A FBI Inspector my.email@test.com John Smith III

    And I get :

    Mcdonald Macdonald O'neil Google's A Fbi Inspector My.Email@Test.Com John Smith Iii

    Now, if I use the Edit > Convert Case to > Proper Case (blend) option against this same INPUT text, I get :

    McDonald MacDonald O'neil Google's A FBI Inspector My.Email@Test.Com John Smith III

    Note that, whatever your choice, most of these expressions are not correct, after modifications !

    Refer, my previous post of 2015, above !

    Best Regards,

    guy038

    Funny : Exactly seven years, to the day, between my two posts !!