次の方法で共有


What Are the Variable Types for the DDX Value Property?

OverviewHow Do I

The following table shows the type of DDX Value variables ClassWizard initially provides. To create additional variable types, see .**

DDX Variable Types for the Value Property

Control Variable type
Edit box CString, int, UINT, long, DWORD, float, double, short, BOOL, COleDateTime, ColeCurrency
Normal check box BOOL
Three-state check box int
Radio button (first in group) int
Nonsorted list box Cstring, int
Drop-down list Cstring, int
All other list box and drop-down list types Cstring

The following additional notes apply to using DDX Value variables:

  • Possible values for three-state check boxes are 0 (off), 1 (on), and 2 (indeterminate).

  • Values for a group of radio buttons range from 0 for the first button in the group to n–1 for a group with n buttons. A value of –1 indicates that no buttons are selected.

  • When you are using a group of check boxes or radio buttons with a DDX variable, set the Auto property from each control's Property window.

  • Set the Group property for the first radio button in a group, and make sure all the other radio buttons immediately follow the first button in the tab order.

  • To use an integer value with a drop-down list or list box, turn off the Sort property found on each control's Property window Styles tab.