Page tree
Skip to end of metadata
Go to start of metadata

Tasks are grouped clickable text items that sit in the Tasks panel in the WMC. Your component should use tasks to provide a uniform method of configuration adjustment.

Adding tasks

Tasks stay visible until they are removed with NavDeleteItem so you can create permanent task items (Like the Submit feedback task above) by not deleting the task and its group. Typically however, you want to add them when your panel becomes active and delete them when the panel is deactivated. See Tree items and panels for information on handling (de)activation events.

To add a task, first insert a task group under the TASKLIST domain with NavInsertItem.

As with all navigation items, the label passed to NavInsertItem is a free form text field that has to be unique amongst its siblings.


Once the group is inserted, add tasks beneath it in a similar manner.

The NavItemHelpers code in sdk\helpers has more convenient ways to manage tasks

Removing tasks

To remove a task simply call NavDeleteItem with the FQN or alias of the task you wish to delete.

Changing tasks

If you wish to change a task item's properties (label, description etc) you can do so with NavSetItem or NavSetItemEx


Responding to task activation

In order to respond to user task selection you need to create the task with the NI_EVENT_MOUSE_LCLICK mask bit set in the EventMask field and you need to provide a NavigationItemUIInterface pointer that has a NavItemNotify function. When a user clicks a task then the framework calls your NavItemNotify function with the message value NI_EVENT_MOUSE_LCLICK. 

If you have used the same NavigationItemUIInterface for all of your task items, you will need to distinguish them from each other. You can do this by the context data that was supplied when the item was inserted, the Navigation Path that the item was added with, or its alias. For example:



  • No labels