Dlg_Flash.cpp 901 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Dlg_OCX.cpp : 实现文件
  2. //
  3. #include "stdafx.h"
  4. #include "Dlg_Flash.h"
  5. // CDlg_Flash 对话框
  6. IMPLEMENT_DYNAMIC(CDlg_Flash, CPropertyPage)
  7. CDlg_Flash::CDlg_Flash()
  8. : CPropertyPage(CDlg_Flash::IDD)
  9. , m_sEdit_FlashPath(_T(""))
  10. {
  11. }
  12. CDlg_Flash::~CDlg_Flash()
  13. {
  14. }
  15. void CDlg_Flash::DoDataExchange(CDataExchange* pDX)
  16. {
  17. CPropertyPage::DoDataExchange(pDX);
  18. DDX_Text(pDX, IDC_EDIT_FLASHPATH, m_sEdit_FlashPath);
  19. }
  20. BEGIN_MESSAGE_MAP(CDlg_Flash, CPropertyPage)
  21. ON_BN_CLICKED(IDC_BTN_BROWSE, OnBnClickedBtnBrowse)
  22. END_MESSAGE_MAP()
  23. // CDlg_Flash 消息处理程序
  24. void CDlg_Flash::OnBnClickedBtnBrowse()
  25. {
  26. CFileDialog dlg(TRUE,NULL,
  27. NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT |OFN_ALLOWMULTISELECT|OFN_ENABLESIZING ,
  28. _T("SWF Files (*.swf)|*.swf||"),NULL);
  29. if (dlg.DoModal() != IDOK)
  30. {
  31. return;
  32. }
  33. CString sPath = dlg.GetPathName();
  34. m_sEdit_FlashPath = sPath;
  35. UpdateData( false );
  36. }