Applies to: desktop apps only
Invalidates a Windows Ribbon framework Command property, value, or state.
Syntax
HRESULT InvalidateUICommand( [in] UINT32 commandId, [in] UI_INVALIDATIONS flags, [in] const PROPERTYKEY *key );
Parameters
- commandId [in]
-
Type: UINT32
The ID for the Command, which is specified in the markup resource file.
- flags [in]
-
Type: UI_INVALIDATIONS
Identifies which aspect of a command to invalidate.
Note Passing UI_INVALIDATIONS_ALLPROPERTIES invalidates all properties bound to a command, including value and state.
- key [in]
-
Type: const PROPERTYKEY*
The property key of the command property or state. This parameter can be NULL.
Return value
Type: HRESULT
Returns S_OK if successful; otherwise, an error value from the following list.
| Value | Description |
|---|---|
| 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. |
Remarks
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.
Requirements
|
Minimum supported client | Windows 7 |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 |
|
Product | Windows UI |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/15/2012