IVsContainedLanguageHost.InsertControl 方法

发送一个请求插入标记。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop.8.0(在 Microsoft.VisualStudio.TextManager.Interop.8.0.dll 中)

语法

声明
Function InsertControl ( _
    pwcFullType As String, _
    pwcID As String _
) As Integer
int InsertControl(
    string pwcFullType,
    string pwcID
)
int InsertControl(
    [InAttribute] String^ pwcFullType, 
    [InAttribute] String^ pwcID
)
abstract InsertControl : 
        pwcFullType:string * 
        pwcID:string -> int
function InsertControl(
    pwcFullType : String, 
    pwcID : String
) : int

参数

  • pwcFullType
    类型:String

    [in] 完全限定的对象类型标记要插入的名称。 例如, “System.Web.UI.Pa ge”。

  • pwcID
    类型:String

    [in] 包含对象的 ID 的字符串。 有关示例参见备注。

返回值

类型:Int32
如果成功,则返回; S_OK否则,返回错误代码。

备注

COM 签名

从 singlefileeditor.idl:

HRESULT InsertControl(
   [in]const WCHAR * pwcFullType,
   [in]const WCHAR * pwcID
);

此方法要求编辑器到一个标记到父中的文档表示控件使用指定的类型和 ID. 插入 例如,因此,如果包含的语言插入与 “System.Web.UI.Bu tton”和 “MyButton” ID 的类型的控件添加到 ASP.NET 页中,标记可能如下所示:

<asp:Button runat="server" id="MyButton" />

.NET Framework 安全性

请参阅

参考

IVsContainedLanguageHost 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间