共用方式為


IVsUIShell.SetMRUComboTextW(Guid[], UInt32, String, Int32) Method

Definition

Adds information to a combo box list.

public:
 int SetMRUComboTextW(cli::array <Guid> ^ pguidCmdGroup, System::UInt32 dwCmdID, System::String ^ pwszText, int fAddToList);
public int SetMRUComboTextW (Guid[] pguidCmdGroup, uint dwCmdID, string pwszText, int fAddToList);
abstract member SetMRUComboTextW : Guid[] * uint32 * string * int -> int
Public Function SetMRUComboTextW (pguidCmdGroup As Guid(), dwCmdID As UInteger, pwszText As String, fAddToList As Integer) As Integer

Parameters

pguidCmdGroup
Guid[]

[in] Unique identifier of the command group; can be null to specify the standard group. All the commands that are passed in the dwCmdID must belong to the group specified by pguidCmdGroup.

dwCmdID
UInt32

[in] The command to be executed. This command must belong to the group specified with pguidCmdGroup.

pwszText
String

[in] Text to place in the combo box.

fAddToList
Int32

[in] If true, then the text in lpszText is added to the combo box and the associated list. If false, then the lpszText is only added to the combo box, but not added to the associated list.

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::SetMRUComboTextW(  
   [in] const GUID * pguidCmdGroup,  
   [in] DWORD dwCmdId,  
   [in] LPWSTR pwszText,  
   [in] BOOL fAddToList  
);  

This method is useful for combo boxes that are designated as MRUCOMBO in a .ctc file.

Applies to