Skip to content

Commit 7c668aa

Browse files
Hybrid Machineclaude
andcommitted
feat: implement NPPM_GETMENUHANDLE for plugin menu access
Returns the main menu or plugin submenu handle based on wParam (NPPMAINMENU vs NPPPLUGINMENU). ComparePlus uses this for dynamic menu state management during compare mode. Phase 1d of issue #100 — ComparePlus macOS port. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0dd5a96 commit 7c668aa

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

macos/platform/nppm_handler.mm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "lexer_styles.h"
1010
#include "document_manager.h"
1111
#include "file_operations.h"
12+
#include "menu_builder.h"
1213
#include "string_utils.h"
1314
#include "Notepad_plus_msgs.h"
1415
#include "Scintilla.h"
@@ -145,6 +146,15 @@ LRESULT handleNppmMessage(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
145146
return TRUE;
146147
}
147148

149+
case NPPM_GETMENUHANDLE:
150+
{
151+
int menuChoice = static_cast<int>(wParam);
152+
if (menuChoice == NPPMAINMENU)
153+
return reinterpret_cast<LRESULT>(GetMenu(hWnd));
154+
else // NPPPLUGINMENU
155+
return reinterpret_cast<LRESULT>(getPluginsMenuHandle());
156+
}
157+
148158
case NPPM_GETPLUGINSCONFIGDIR:
149159
{
150160
@autoreleasepool {

0 commit comments

Comments
 (0)