Beispiel #1
0
void CMainFrame::OnDropDown()
{
	CString FileName;
	CMFCToolBarComboBoxButton* pComboButton = (CMFCToolBarComboBoxButton*) m_wndLoadFileBar.GetButton(1);
	CComboBox* pLoadFile = pComboButton->GetComboBox();

	pLoadFile->GetWindowText(FileName);
	pLoadFile->ResetContent();
	pLoadFile->Dir(DDL_READWRITE,"*.*");
	pLoadFile->SetWindowText(FileName);
}
Beispiel #2
0
void CMainFrame::OnSelChange()
{
	CString FileName;
	CMFCToolBarComboBoxButton* pComboButton = (CMFCToolBarComboBoxButton*) m_wndLoadFileBar.GetButton(1);
	CComboBox* pLoadFile = pComboButton->GetComboBox();

	if(CB_ERR!=pLoadFile->GetCurSel())
	{
		pLoadFile->GetLBText(pLoadFile->GetCurSel(),FileName);
		AfxGetApp()->OpenDocumentFile(FileName);
	}
}