...
Code Block |
---|
NAVSETITEM taskRootData; NavGetItem(L"TASKLIST", &taskRootData); // Get the task root to put our group under NavHandle taskRoot = taskRootData.hItem; NAVSETITEM taskGroupData; memset(&taskGroupData, 0, sizeof(taskGroupData)); taskGroupData.flags = NI_FLAG_CONTAINER; // Signals it's a group that will hold tasks taskGroupData.strLabel = L"Ad Blocker"; taskGroupData.strDescription = L"Tasks for the Ad Blocker component"; NavInsertItem(taskRootData.hItemtaskRoot, L"AdBlockerTaskGroup", &taskGroupData); // Error handling removed for brevity NavHandle taskGroup = taskGroupData.hItem; |
As with all navigation items, the label passed to NavInsertItem is a free form text field that has to be unique within amongst its parentsiblings.
Once the group is inserted, add tasks beneath it in a similar manner.
...