Custom dodataexchange functions of ActiveX

Source: Internet
Author: User

Add a control on the property page and associate it with a member variable. We hope this member variable can be associated with the property value of the ActiveX control. When a member variable is added to vc6.0

Optional property name option, which can associate member variables with attribute values. But not in vs2008. In this case, you need to customize the dodataexchange function.
The cwnd: dodataexchange function is used to establish a link between the property page value and the control property value. To establish a link, you must map the property page fields to their respective control properties.
These mappings are implemented using the DDP _ function. The DDP _ function is similar to the DDX _ function in the Standard MFC dialog box, but only a reference to the member variable. The DDP _ function uses the name of the control property.
For example:
DDP_Text(pDX, IDC_CAPTION, m_caption, _T("Caption"));

This function associates the m_caption member variable on the property page with the property name caption.

The property pages of MFC are valid for controls in other dialog boxes, such as single-choice, multiple-choice buttons, and list boxes. The following table lists all the DDP _ functions and their functions.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.