MFC gets the value of the drop-down list box and sets the value in the static text box

Source: Internet
Author: User

1 CString strInfo1; // Store the value selected in the drop-down list box 2 int NSel1; // the index that holds the drop-down list box selected 3 nSel1 = M_combox_first. GetCurSel (); // gets the index of the selected value 4 M_combox_first. Getlbtext (NSEL1,STRINFO1); // get the corresponding value by index 5 Setdlgitemtext (Idc_edit_city_info, m_strinfo); // set the value of static text based on resource ID 6 7 Add additional data to the drop-down list, related functions: SetItemData

MFC Gets the value of the drop-down list box and sets the value in the static text box

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: info-contact@alibabacloud.com 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.