Поделиться через


DDX_LBString

The DDX_LBString function manages the transfer of CString data between a list box control in a dialog box, form view, or control view object and a CString data member of the dialog box, form view, or control view object.

void AFXAPI DDX_LBString(
   CDataExchange* pDX,
   int nIDC,
   CString& value 
);

Параметры

  • pDX
    A pointer to a CDataExchange object. The framework supplies this object to establish the context of the data exchange, including its direction.

  • nIDC
    The resource ID of the list box control associated with the control property.

  • value
    A reference to a member variable of the dialog box, form view, or control view object with which data is exchanged.

Заметки

When DDX_LBString is called to transfer data to a list box control, the first item in the control whose beginning matches value is selected. (To match the entire item rather than just a prefix, use DDX_LBStringExact.) If there are no matches, no items are selected. The matching is case-insensitive.

When DDX_LBString is called to transfer data from a list box control, value is set to the current list box selection. If no item is selected, value is set to a string of zero length.

ПримечаниеПримечание.

If the list box is a drop-down list box, the value exchanged is limited to 255 characters.

For more information about DDX, see Dialog Data Exchange and Validation.

Требования

Header: afxdd_.h

См. также

Основные понятия

Standard Dialog Data Exchange Routines

MFC Macros and Globals

DDP_LBString