12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- // Dlg_OCX.cpp : 实现文件
- //
- #include "stdafx.h"
- #include "Dlg_OCX.h"
- #include ".\dlg_ocx.h"
- // CDlg_OCX 对话框
- IMPLEMENT_DYNAMIC(CDlg_OCX, CPropertyPage)
- CDlg_OCX::CDlg_OCX()
- : CPropertyPage(CDlg_OCX::IDD)
- , m_sEdit_OCXPath(_T(""))
- , m_nComb_OCXIndex(0)
- {
- }
- CDlg_OCX::~CDlg_OCX()
- {
- }
- void CDlg_OCX::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- DDX_Text(pDX, IDC_EDIT_OCXPATH, m_sEdit_OCXPath);
- DDX_CBIndex(pDX, IDC_COMBO_OCXINDEX, m_nComb_OCXIndex);
- }
- BEGIN_MESSAGE_MAP(CDlg_OCX, CPropertyPage)
- ON_BN_CLICKED(IDC_BTN_BROWSE, OnBnClickedBtnBrowse)
- END_MESSAGE_MAP()
- // CDlg_OCX 消息处理程序
- void CDlg_OCX::OnBnClickedBtnBrowse()
- {
- CFileDialog dlg(TRUE,NULL, NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT |OFN_ALLOWMULTISELECT|OFN_ENABLESIZING , _T("OCX Files (*.ocx)|*.ocx||"),NULL);
- if (dlg.DoModal() != IDOK)
- {
- return;
- }
- CString sPath = dlg.GetPathName();
- m_sEdit_OCXPath = sPath;
- UpdateData( false );
- }
|