Partager via


MMCCtrl.GetFirstTask method

The GetFirstTask method returns an MMCTask object that represents the first task in the set of tasks to be displayed on the taskpad.

Syntax

MMCCtrl.GetFirstTask( _
  ByVal szGroupText _
)

Parameters

szGroupText [in]

A string that contains the group name that identifies the taskpad. The group name is the string that follows the hash (#) in the string passed in the ppViewType parameter when MMC called IComponent::GetResultViewType to display the taskpad. If no group name was specified, szGroupText is an empty string.

Be aware that the group name is stored in the hash property of the location object of the taskpad's HTML page. See the following example.

Return value

An MMCTask object that represents the first task to be placed on the taskpad. If there are no tasks for the taskpad, NULL is returned.

Examples

The following code example gets the first task by calling the GetFirstTask method on an MMCCtrl control with an ID of taskctrl:

var hash = location.hash;
if (hash != "") {
    hash = hash.substr(1);
}
 
// get first task
var task = taskctrl.GetFirstTask (hash);

Requirements

Redistributable
MMC 1.1 or later
DLL
Cic.dll