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

Method ApplyItemIcon

source/script_menu.cpp:1368–1380  ·  view source on GitHub ↗

Caller has ensured mMenu is non-NULL.

Source from the content-addressed store, hash-verified

1366
1367// Caller has ensured mMenu is non-NULL.
1368ResultType UserMenu::ApplyItemIcon(UserMenuItem *aMenuItem)
1369{
1370 if (aMenuItem->mBitmap)
1371 {
1372 MENUITEMINFO item_info;
1373 item_info.cbSize = sizeof(MENUITEMINFO);
1374 item_info.fMask = MIIM_BITMAP;
1375 // Set HBMMENU_CALLBACK or 32-bit bitmap as appropriate.
1376 item_info.hbmpItem = aMenuItem->mBitmap;
1377 SetMenuItemInfo(mMenu, aMenuItem_ID, aMenuItem_MF_BY, &item_info);
1378 }
1379 return OK;
1380}
1381
1382
1383ResultType UserMenu::RemoveItemIcon(UserMenuItem *aMenuItem)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected