Index: src/ch/FolderDialog.h =================================================================== diff -u -rd5c3edd0d167db9b5d47d04248820fda49499a5e -r0d5b67ee96b435d63f7bf075dc8e28603793b187 --- src/ch/FolderDialog.h (.../FolderDialog.h) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) +++ src/ch/FolderDialog.h (.../FolderDialog.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) @@ -32,12 +32,10 @@ #ifndef __FOLDERDIALOG_H__ #define __FOLDERDIALOG_H__ -#include "afxtempl.h" #include "DirTreeCtrl.h" #include "ThemedButton.h" -#include "shortcuts.h" -#include "charvect.h" #include "../libictranslate/LanguageDialog.h" +#include "../libchengine/TLocalFilesystem.h" ///////////////////////////////////////////////////////////////////////////// // CFolderDialog dialog @@ -46,50 +44,40 @@ { // Construction public: - CFolderDialog(CWnd* pParent = NULL); // standard constructor + explicit CFolderDialog(CWnd* pParent = nullptr); // standard constructor virtual ~CFolderDialog(); -// Dialog Data - //{{AFX_DATA(CFolderDialog) - //}}AFX_DATA +public: + INT_PTR DoModal() override; -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CFolderDialog) - public: - virtual INT_PTR DoModal(); - protected: - virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); - //}}AFX_VIRTUAL +protected: + LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam) override; public: - virtual BOOL OnTooltipText(UINT uiID, TOOLTIPTEXT* pTip); + BOOL OnTooltipText(UINT uiID, TOOLTIPTEXT* pTip) override; // structure used for passing parameters struct BROWSEDATA { - BROWSEDATA() { cx=0; cy=0; iView=2; bExtended=false; }; -// BROWSEDATA& operator=(const BROWSEDATA& data) { strCaption=data.strCaption; strText=data.strText; strInitialDir=data.strInitialDir; astrRecent.Copy(data.astrRecent); -// ascShortcuts.Copy(data.ascShortcuts); cx=data.cx; cy=data.cy; iView=data.iView; bExtended=data.bExtended; return *this;}; - CString strCaption; CString strText; CString strInitialDir; - char_vector cvRecent; - char_vector cvShortcuts; + std::vector cvRecent; + std::vector cvShortcuts; - int cx, cy; // pixels - int iView; // type of view (large icons, small icons, ...) - bool bExtended; // with the shortcuts or not - bool bIgnoreDialogs; // if tree ctrl should show shell dialogs in style 'insert floppy' + int cx = 0; + int cy = 0; // pixels + int iView = 2; // type of view (large icons, small icons, ...) + bool bExtended = false; // with the shortcuts or not + bool bIgnoreDialogs = true; // if tree ctrl should show shell dialogs in style 'insert floppy' } m_bdData; // getting path - after dialog exits void GetPath(CString& rstrPath); void GetPath(LPTSTR pszPath); // function displays dialog with some parameters - friend int BrowseForFolder(BROWSEDATA* pData, LPTSTR pszPath); + friend INT_PTR BrowseForFolder(BROWSEDATA* pData, LPTSTR pszPath); // Implementation protected: @@ -102,7 +90,6 @@ void ResizeControls(int cx, int cy); CString m_strTip; // for tooltip storage - TCHAR m_szBuffer[2048]; // shell functions buffer CString m_strPath; // for path after dialog exits bool m_bIgnoreUpdate; // ignores nearest edit update (with path) @@ -131,7 +118,6 @@ CThemedButton m_ctlAddShortcut; CThemedButton m_ctlRemoveShortcut; - // Generated message map functions //{{AFX_MSG(CFolderDialog) afx_msg void OnEndLabelEditShortcutList(NMHDR* pNMHDR, LRESULT* pResult); @@ -141,10 +127,10 @@ afx_msg void OnSelchangedFolderTree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnGetInfoTipFolderTree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnShortcutKeyDown(NMHDR* pNMHDR, LRESULT* pResult); - virtual BOOL OnInitDialog(); + BOOL OnInitDialog() override; afx_msg void OnNewfolderButton(); - virtual void OnCancel(); - virtual void OnOK(); + void OnCancel() override; + void OnOK() override; afx_msg void OnPathChanging(); afx_msg void OnIconsRadio(); afx_msg void OnSmalliconsRadio(); @@ -158,9 +144,9 @@ afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI); //}}AFX_MSG DECLARE_MESSAGE_MAP() + +private: + chengine::TLocalFilesystem m_fsLocal; }; -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - #endif