MFCDialogStringVariableExtender.MaxChars Property

Gets or sets the maximum characters for the string-type variable represented by the parent object.

Namespace:  Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

Syntax

声明
Property MaxChars As String
用法
Dim instance As MFCDialogStringVariableExtender
Dim value As String

value = instance.MaxChars

instance.MaxChars = value
string MaxChars { get; set; }
property String^ MaxChars {
    String^ get ();
    void set (String^ value);
}
function get MaxChars () : String
function set MaxChars (value : String)

Property Value

Type: System.String

A string representing the maximum number of characters.

Remarks

The MFCDialogStringVariableExtender object represents the validation range of a string-type dialog box variable.

Examples

This example displays the maximum character range of the first dialog box variable, implemented by the CAboutDlg class.

Sub GetMaxChars()
    Dim vcCM as VCCodeModel
    Dim vcClass as VCCodeClass
    Dim mfcVar as VCCodeVariable
    vcCM = DTE.Solution.Item(1).CodeModel
    vcClass = vcCM.Classes.Find("CAboutDlg")
    vcVar = vcCM.Variables.Item(1)
    MsgBox(vcVar.Extender("MFCDialogStringVariable").MaxChars)
End Sub

See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

Permissions

See Also

Reference

MFCDialogStringVariableExtender Interface

MFCDialogStringVariableExtender Members

Microsoft.VisualStudio.VCCodeModel Namespace