Community
    • Login

    ::EnableMenuItem "do noting" on fileclosed??

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    3 Posts 2 Posters 314 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • MarioRosiM
      MarioRosi
      last edited by MarioRosi

      Hello,

      i have an strange effect.

      In my plugin is set on/off the menu items by filet ype. Only the actions for the relevant file type are activated.

      This ‘bufferIsActivated’-function is trigered on “NPPN_BUFFERACTIVATED” and work fine.
      But only after closing a file do the EnableMenuItem function apparently nothing, more exatly all menu items as new draw and enabled, like an redraw/recreate.

      It is possible, that notepad redraw his menues on file open and file close?
      Because, after i change the ‘bufferIsActivated’-function to “do only any thing by after ‘change the file type’”, it the sam effect, when open a new file with the sam file type as the currently file, all menu items are redraw.

      Is this a knowing effect? What can id do, which message can i catch?

      regards Mario

      CoisesC 1 Reply Last reply Reply Quote 0
      • CoisesC
        Coises @MarioRosi
        last edited by

        @MarioRosi

        Try adding:

        DrawMenuBar(nppData._nppHandle);
        

        after you enable or disable menu items.

        MarioRosiM 1 Reply Last reply Reply Quote 2
        • MarioRosiM
          MarioRosi @Coises
          last edited by

          @Coises
          DrawMenuBar has no effect.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors