...
Code Block |
---|
LPCWSTR settingsTaskFQN = L"TASKLIST\\AdBlockerTaskGroup\\SettingsTask"; LPCWSTR deleteTaskAlias = L"{MyComponentDeleteTask}"; static const unsigned int addItemTaskId = 1; // The registered handled for the notify messages for your navigation items. This example assumes that only task items use this function UINT NavItemNotify(NAVITEMNOTIFY* notifyMessage) { if ( notifyMessage->nMsg != NI_EVENT_MOUSE_LCLICK) // Not a click event so we are out of here { return 0; } if ( (UINTunsigned int)notifyMessage->pContext == addItemTaskId ) // addItemTaskId was set as the lParam field when registering that task { DoAddItem(); return 0; } if ( _wcsicmp(notifyMessage->strAlias, deleteTaskAlias) ) // We set strAlias when we registered the task { DoDelete(); return 0; } if ( _wcsicmp(notifyMessage->strFQN, settingsTaskFQN) ) // Compare the raw FQN { DoSettings(); return 0; } return 0; } |
...