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.
    • Zhixian_Jason YuZ
      Zhixian_Jason Yu
      last edited by

      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.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Zhixian_Jason Yu
        last edited by

        @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
        • Zhixian_Jason YuZ
          Zhixian_Jason Yu
          last edited by

          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
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors