共用方式為


IVsUIShell.UpdateCommandUI(Int32) Method

Definition

Informs the environment to update the state of the command bars (menus and toolbars).

public:
 int UpdateCommandUI(int fImmediateUpdate);
public:
 int UpdateCommandUI(int fImmediateUpdate);
int UpdateCommandUI(int fImmediateUpdate);
public int UpdateCommandUI (int fImmediateUpdate);
abstract member UpdateCommandUI : int -> int
Public Function UpdateCommandUI (fImmediateUpdate As Integer) As Integer

Parameters

fImmediateUpdate
Int32

[in] true if the update is performed synchronously (immediately). It is strongly recommended to pass false for this parameter.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShell::UpdateCommandUI(  
   [in] BOOL fImmediateUpdate  
);  

This method is equivalent to UpdateUI. It causes the environment to re-query by means of IOleCommandTarget the state of all commands. Typically, the update is not performed immediately but rather delayed until idle time.

Applies to