1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| #pragma once
|
| #include <shlobj.h>
| #undef _XWIN
| #include "win32/xfolder.hpp"
|
| xstring xfolder::GetFolderForSave()
| {
| /*
| wchar_t szPath[MAX_PATH];
| if (!SUCCEEDED(SHGetFolderPath(NULL,
| CSIDL_PERSONAL | CSIDL_FLAG_CREATE,
| NULL,
| 0,
| szPath))) return L"";
| return szPath;
| */
| BROWSEINFO bi = { 0 };
| bi.lpszTitle = L"Ñ¡Ôñ±£´æÄ¿Â¼";
| LPITEMIDLIST pidl = SHBrowseForFolder(&bi);
|
| if (pidl != NULL) {
| wchar_t path[MAX_PATH];
| SHGetPathFromIDList(pidl, path);
| xstring folderPath = path;
| CoTaskMemFree(pidl);
|
| return folderPath;
| }
| return L"";
| }
|
| #define X_WIN 1
|
|