1*f6dc9357SAndroid Build Coastguard Worker // BrowseDialog.h 2*f6dc9357SAndroid Build Coastguard Worker 3*f6dc9357SAndroid Build Coastguard Worker #ifndef ZIP7_INC_BROWSE_DIALOG_H 4*f6dc9357SAndroid Build Coastguard Worker #define ZIP7_INC_BROWSE_DIALOG_H 5*f6dc9357SAndroid Build Coastguard Worker 6*f6dc9357SAndroid Build Coastguard Worker #include "../../../Windows/CommonDialog.h" 7*f6dc9357SAndroid Build Coastguard Worker 8*f6dc9357SAndroid Build Coastguard Worker bool MyBrowseForFolder(HWND owner, LPCWSTR title, LPCWSTR path, UString &resultPath); 9*f6dc9357SAndroid Build Coastguard Worker 10*f6dc9357SAndroid Build Coastguard Worker struct CBrowseFilterInfo 11*f6dc9357SAndroid Build Coastguard Worker { 12*f6dc9357SAndroid Build Coastguard Worker UStringVector Masks; 13*f6dc9357SAndroid Build Coastguard Worker UString Description; 14*f6dc9357SAndroid Build Coastguard Worker }; 15*f6dc9357SAndroid Build Coastguard Worker 16*f6dc9357SAndroid Build Coastguard Worker struct CBrowseInfo: public NWindows::CCommonDialogInfo 17*f6dc9357SAndroid Build Coastguard Worker { 18*f6dc9357SAndroid Build Coastguard Worker bool BrowseForFile(const CObjectVector<CBrowseFilterInfo> &filters); 19*f6dc9357SAndroid Build Coastguard Worker }; 20*f6dc9357SAndroid Build Coastguard Worker 21*f6dc9357SAndroid Build Coastguard Worker 22*f6dc9357SAndroid Build Coastguard Worker /* CorrectFsPath removes undesirable characters in names (dots and spaces at the end of file) 23*f6dc9357SAndroid Build Coastguard Worker But it doesn't change "bad" name in any of the following cases: 24*f6dc9357SAndroid Build Coastguard Worker - path is Super Path (with \\?\ prefix) 25*f6dc9357SAndroid Build Coastguard Worker - path is relative and relBase is Super Path 26*f6dc9357SAndroid Build Coastguard Worker - there is file or dir in filesystem with specified "bad" name */ 27*f6dc9357SAndroid Build Coastguard Worker 28*f6dc9357SAndroid Build Coastguard Worker bool CorrectFsPath(const UString &relBase, const UString &path, UString &result); 29*f6dc9357SAndroid Build Coastguard Worker 30*f6dc9357SAndroid Build Coastguard Worker bool Dlg_CreateFolder(HWND wnd, UString &destName); 31*f6dc9357SAndroid Build Coastguard Worker 32*f6dc9357SAndroid Build Coastguard Worker #endif 33