Files
virtual-controller/extension-reaper-macos/vendor/reaper-sdk/WDL/win32_helpers.h
T
Paul Lipscomb cd5ebd84d6 Add bare-minimum extension-reaper-macos REAPER extension skeleton
C/C++ extension built directly against the vendored Cockos reaper-sdk
headers (no Rust/reaper-rs wrapper layer). Loads, registers a test
action, and confirms via REAPER's console — confirmed working in
REAPER 2026-07-15.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-15 19:12:33 -04:00

27 lines
703 B
C

#ifndef _WDL_WIN32_HELPERS_H_
#define _WDL_WIN32_HELPERS_H_
static WDL_STATICFUNC_UNUSED HMENU InsertSubMenu(HMENU hMenu, int pos, const char *name, int flags=0)
{
HMENU sub = NULL;
if (hMenu)
{
sub = CreatePopupMenu();
InsertMenu(hMenu,pos,flags|MF_BYPOSITION|(sub?MF_POPUP:0)|MF_STRING,(UINT_PTR)sub, name);
}
return sub;
}
static WDL_STATICFUNC_UNUSED void InsertMenuString(HMENU hMenu, int pos, const char *name, int idx, int flags=0)
{
if (hMenu) InsertMenu(hMenu,pos,flags|MF_BYPOSITION|MF_STRING, idx, name);
}
static WDL_STATICFUNC_UNUSED void InsertMenuSeparator(HMENU hMenu, int pos)
{
if (hMenu) InsertMenu(hMenu,pos,MF_BYPOSITION|MF_SEPARATOR, 0, NULL);
}
#endif