반응형
MFC Feature Pack - CMFCEditBrowseCtrl
Dlg Header file declaration
CMFCEditBrowseCtrl m_wndFileEdit;
Dlg cpp file DoDataExchange part
DDX_Control(pDX, IDC_FILE_EDIT, m_wndFileEdit);
BEGIN_MESSAGE_MAP
ON_EN_CHANGE(IDC_FILE_EDIT, OnEnChangeFileEdit)
OnInitDialog()
{
m_wndFileEdit.EnableFileBrowseButton();
// or csv file open and all file filter settting
// m_wndFileEdit.EnableFileBrowseButton(0,_T(" CSV files (*.csv)|*.csv| AllFiles (*.*)|*.*|"),0);
}
OnEnChangeFileEdit()
{
CString strPathText = _T("");
m_wndFileEdit.GetWindowTextW(strPathText);
}
반응형
'C++' 카테고리의 다른 글
std::stringstream std::getline (0) | 2020.06.02 |
---|---|
Using struct access[] (0) | 2020.06.02 |
"DTD cannot be used" when loading C++ xml DOM. Methods that can be used for error messages (0) | 2020.06.02 |
AfxGetMainWnd() (0) | 2020.05.28 |
MFC Class cross reference (0) | 2020.05.28 |