IProvideTaskPage::GetPage method (mstask.h)

[[This API may be altered or unavailable in subsequent versions of the operating system or product. Please use the Task Scheduler 2.0 Interfaces instead.] ]

This method retrieves one or more property sheet pages associated with a task object.

Syntax

HRESULT GetPage(
  [in]  TASKPAGE       tpType,
  [in]  BOOL           fPersistChanges,
  [out] HPROPSHEETPAGE *phPage
);

Parameters

[in] tpType

One of the following TASKPAGE enumeration values that specify the page to return.

TASKPAGE_TASK

General page property.

TASKPAGE_SCHEDULE

Schedule properties for the task.

TASKPAGE_SETTINGS

Settings properties for the task.

[in] fPersistChanges

Specifies whether changes to the task object are made persistent automatically. If TRUE, the page updates the persistent task object automatically if there is a change made on release. If FALSE, the caller is responsible for making task object changes persistent by calling IPersistFile::Save on the task object.

[out] phPage

Handle to the returned property sheet page of the task object. This handle can then be used to display the page.

Return value

Returns S_OK if the method was successful, or STG_E_NOTFILEBASEDSTORAGE if the task has not been saved to disk.

Remarks

To retrieve the IProvideTaskPage interface, call ITask::QueryInterface.

The following code shows the variable declaration and calling syntax for using this method and for calling ITask::QueryInterface.

Examples

For a complete example of retrieving and displaying the general task page of a known task, see Retrieving a Task Page Example

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mstask.h
Library Mstask.lib
DLL Mstask.dll
Redistributable Internet Explorer 4.0 or later on Windows NT 4.0 and Windows 95

See also

IProvideTaskPage

TASKPAGE