00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023 #include "afxwin.h"
00024
00025
00026
00027 class COpenDlg : public CResizableDialog
00028 {
00029
00030
00031 public:
00032 COpenDlg(CWnd* pParent = NULL);
00033 virtual ~COpenDlg();
00034
00035 bool m_fMultipleFiles;
00036 CList<CString> m_fns;
00037
00038
00039 enum { IDD = IDD_OPENDIALOG };
00040 CComboBox m_mrucombo;
00041 CString m_path;
00042 CComboBox m_mrucombo2;
00043 CString m_path2;
00044 CButton m_openbtn2;
00045 CStatic m_label2;
00046
00047 protected:
00048 virtual void DoDataExchange(CDataExchange* pDX);
00049 virtual BOOL OnInitDialog();
00050
00051 DECLARE_MESSAGE_MAP()
00052
00053 public:
00054 afx_msg void OnBnClickedBrowsebutton();
00055 afx_msg void OnBnClickedBrowsebutton2();
00056 afx_msg void OnBnClickedOk();
00057 afx_msg void OnUpdateDub(CCmdUI* pCmdUI);
00058 };
00059
00060
00061
00062 class COpenFileDialog : public CFileDialog
00063 {
00064 DECLARE_DYNAMIC(COpenFileDialog)
00065
00066 private:
00067 CStringArray& m_mask;
00068
00069 public:
00070 COpenFileDialog(CStringArray& mask, bool fAllowDirSelection,
00071 LPCTSTR lpszDefExt = NULL,
00072 LPCTSTR lpszFileName = NULL,
00073 DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
00074 LPCTSTR lpszFilter = NULL,
00075 CWnd* pParentWnd = NULL);
00076 virtual ~COpenFileDialog();
00077
00078 static bool m_fAllowDirSelection;
00079 static WNDPROC m_wndProc;
00080 static LRESULT CALLBACK WindowProcNew(HWND hwnd,UINT message, WPARAM wParam, LPARAM lParam);
00081
00082 virtual BOOL OnInitDialog();
00083
00084 protected:
00085 DECLARE_MESSAGE_MAP()
00086 virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
00087 virtual BOOL OnIncludeItem(OFNOTIFYEX* pOFNEx, LRESULT* pResult);
00088 public:
00089 afx_msg void OnDestroy();
00090 };
00091
00092