IUIFramework::InvalidateUICommand method (uiribbon.h)
Invalidates a Windows Ribbon framework Command property, value, or state.
HRESULT InvalidateUICommand( [in] UINT32 commandId, [in] UI_INVALIDATIONS flags, [in] const PROPERTYKEY *key );
The ID for the Command, which is specified in the markup resource file.
Identifies which aspect of a command to invalidate.
Type: const PROPERTYKEY*
The property key of the command property or state. This parameter can be NULL.
Returns S_OK if successful; otherwise, an error value from the following list.
|E_INVALIDARG||An invalid value for key was supplied.|
|E_FAIL||The operation failed. All the commands failed to invalidate, or none of the properties specified are supported.|
Resources defined in the Ribbon framework markup are stored in a resource table that is created when the markup file is compiled into binary format. A resource cannot be reinstated from the Markup resource table after it has been invalidated.
After invalidation, the framework queries the host application for the resource details.
When a Command value is invalidated (flags contains UI_INVALIDATIONS_VALUE) the value of key is NULL.
If IUIFramework::InvalidateUICommand is called multiple times and the UI_INVALIDATIONS value passed in each call specifies overlapping properties, such as UI_INVALIDATIONS_STATE and UI_INVALIDATIONS_ALLPROPERTIES, then only one callback to the host application is created.
|Minimum supported client||Windows 7 [desktop apps only]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps only]|