IVsUIShell::SetMRUComboTextW Method (array<Guid>^, UInt32, String^, Int32)

 

Adds information to a combo box list.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int SetMRUComboTextW(
	array<Guid>^ pguidCmdGroup,
	unsigned int dwCmdID,
	String^ pwszText,
	int fAddToList
)

Parameters

pguidCmdGroup
Type: array<System::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
Type: System::UInt32

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

pwszText
Type: System::String^

[in] Text to place in the combo box.

fAddToList
Type: System::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.

Return Value

Type: System::Int32

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

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.

Return to top
Show: