MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ApplyColor

Method ApplyColor

source/script_menu.cpp:996–1007  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994
995
996void UserMenu::ApplyColor(bool aApplyToSubmenus)
997// Caller has ensured that mMenu is not NULL.
998// The below should be done even if the default color is being (re)applied because
999// testing shows that the OS sets the color to white if the HBRUSH becomes invalid.
1000// The caller is also responsible for calling UPDATE_GUI_MENU_BARS if desired.
1001{
1002 MENUINFO mi = {0};
1003 mi.cbSize = sizeof(MENUINFO);
1004 mi.fMask = MIM_BACKGROUND|(aApplyToSubmenus ? MIM_APPLYTOSUBMENUS : 0);
1005 mi.hbrBack = mBrush;
1006 SetMenuInfo(mMenu, &mi);
1007}
1008
1009
1010

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected