Partager via


IVsUIShell.SetMRUComboTextW Method

Adds information to a combo box list.

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

Syntax

'Declaration
Function SetMRUComboTextW ( _
    pguidCmdGroup As Guid(), _
    dwCmdID As UInteger, _
    pwszText As String, _
    fAddToList As Integer _
) As Integer
int SetMRUComboTextW(
    Guid[] pguidCmdGroup,
    uint dwCmdID,
    string pwszText,
    int fAddToList
)
int SetMRUComboTextW(
    [InAttribute] array<Guid>^ pguidCmdGroup, 
    [InAttribute] unsigned int dwCmdID, 
    [InAttribute] String^ pwszText, 
    [InAttribute] int fAddToList
)
abstract SetMRUComboTextW : 
        pguidCmdGroup:Guid[] * 
        dwCmdID:uint32 * 
        pwszText:string * 
        fAddToList:int -> int
function SetMRUComboTextW(
    pguidCmdGroup : Guid[], 
    dwCmdID : uint, 
    pwszText : String, 
    fAddToList : int
) : int

Parameters

  • pguidCmdGroup
    Type: array<Guid[]

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

  • dwCmdID
    Type: UInt32

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

  • pwszText
    Type: String

    [in] Text to place in the combo box.

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

.NET Framework Security

See Also

Reference

IVsUIShell Interface

Microsoft.VisualStudio.Shell.Interop Namespace