共用方式為


MFCDialogStringVariableExtender Interface

Definition

Provides access to the maximum character range of a string-type variable in an MFC dialog box.

public interface class MFCDialogStringVariableExtender
public interface class MFCDialogStringVariableExtender
__interface MFCDialogStringVariableExtender
[System.Runtime.InteropServices.Guid("C5E3BA8E-C05A-4C92-9C63-491FE8D109CC")]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)]
public interface MFCDialogStringVariableExtender
[<System.Runtime.InteropServices.Guid("C5E3BA8E-C05A-4C92-9C63-491FE8D109CC")>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable | System.Runtime.InteropServices.TypeLibTypeFlags.FDual)>]
type MFCDialogStringVariableExtender = interface
Public Interface MFCDialogStringVariableExtender
Attributes

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.

Remarks

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

Properties

MaxChars

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

Methods

Initialize(Object, IExtenderSite, Int32)

Microsoft Internal Use Only.

Applies to