How to get text from CEdit control

前端 未结 2 1638
不思量自难忘°
不思量自难忘° 2021-02-09 18:55

I\'m a new guy with ATL. So forgive me to ask this question.

Problem description: One CEdit control is added into a ATL dialog class. It\'s

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-09 19:24

    This has been tested with MFC & VS2015:

    //
    // Get char string/CString from CEdit m_ceDate;
    // where
    // DDX_Control(pDX, IDC_EDIT_DATE, m_ceDate);
    
    char cdateBuf[128];
    UINT nCountOfCharacters = GetDlgItemText(IDC_EDIT_DATE, cdateBuf, 16);
    CString csDate = cdateBuf; 
    

提交回复
热议问题