MCPcopy Create free account
hub / github.com/WinMerge/winmerge / TraverseMenuRecursive

Function TraverseMenuRecursive

Src/FileFilterHelperMenu.cpp:10–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9template <typename Func>
10static void TraverseMenuRecursive(CMenu* pMenu, Func func)
11{
12 if (!pMenu)
13 return;
14 int itemCount = pMenu->GetMenuItemCount();
15 for (int i = itemCount - 1; i >= 0; --i)
16 {
17 UINT id = pMenu->GetMenuItemID(i);
18 if (id == (UINT)-1)
19 {
20 CMenu* pSubMenu = pMenu->GetSubMenu(i);
21 if (pSubMenu)
22 TraverseMenuRecursive(pSubMenu, func);
23 }
24 func(pMenu, i, id);
25 }
26}
27
28static void DisableMenuItemRecursive(CMenu* pMenu, UINT idDisabled)
29{

Callers 4

DisableMenuItemRecursiveFunction · 0.85
CheckMenuItemRecursiveFunction · 0.85
RemoveTrailingSeparatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected