Share via


SetDefaultActivity method

Sets the default Accelerator for the category.

 

Syntax

HRESULT retVal = object.SetDefaultActivity(pActivity, hwnd);

Parameters

  • pActivity [in]
    Type: IOpenServiceActivity

    An IOpenServiceActivity interface that specifies the default Accelerator, or NULL to specify no default.

  • hwnd [in]
    Type: HWND

    The window handle to use for the confirmation and error dialogs, or NULL to specify no window handle.

Return value

Type: HRESULT

This method can return one of these values.

Return code Description
E_FAIL

The operation failed.

 

Remarks

If the category of the current object and the Accelerator specified in pActivity do not match, this method returns E_FAIL.

See also

IOpenService::SetDefault