• Login
Community
  • Login

sub menu in npp plugin

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
3 Posts 2 Posters 2.4k 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.
  • Z
    Zhixian_Jason Yu
    last edited by May 27, 2017, 1:39 AM

    Does any one know how to create a functional submenu in a plugin? Right now I am able to create a submenu, but not sure how to execute it. Once I click the items in the sub menu, there is no message (such as WM_COMMAND) passed by windows or npp into the plugin.

    C 1 Reply Last reply May 27, 2017, 10:26 PM Reply Quote 0
    • C
      Claudia Frank @Zhixian_Jason Yu
      last edited by May 27, 2017, 10:26 PM

      @Zhixian_Jason-Yu

      why not using the npp source to find out how it is done?

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • Z
        Zhixian_Jason Yu
        last edited by Jun 2, 2017, 11:02 PM

        I figured it out finally. It’s actually pretty simple. Just specify a unique identifier (through
        NPPM_ALLOCATECMDID) when creating a submenu (the uIDNewItem parameter of winAPI insertmenu function). The WM_COMMAND message will be passed to LRESULT messageProc(UINT Message, WPARAM wParam, LPARAM lParam) when the submenu is clicked.

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