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
'宣言
Function SetMRUComboTextW ( _
pguidCmdGroup As Guid(), _
dwCmdID As UInteger, _
pwszText As String, _
fAddToList As Integer _
) As Integer
'使用
Dim instance As IVsUIShell
Dim pguidCmdGroup As Guid()
Dim dwCmdID As UInteger
Dim pwszText As String
Dim fAddToList As Integer
Dim returnValue As Integer
returnValue = instance.SetMRUComboTextW(pguidCmdGroup, _
dwCmdID, pwszText, fAddToList)
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<System.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: 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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.