---------------------------------------------------------------------------
| 1692 | } |
| 1693 | //--------------------------------------------------------------------------- |
| 1694 | String __fastcall GetRecommendedPath(bool common, String folder, String def) |
| 1695 | { |
| 1696 | String result; |
| 1697 | |
| 1698 | // CSIDL_APPDATA (roaming) |
| 1699 | // XP C:\Documents and Settings\username\Application Data |
| 1700 | // Vista&7 C:\\Users\\username\\AppData\\Roaming\\ |
| 1701 | // CSIDL_COMMON_APPDATA C:\Documents and Settings\All Users\Application Data |
| 1702 | // CSIDL_LOCAL_APPDATA C:\Documents and Settings\username\Local Settings\Application Data (nonroaming) |
| 1703 | char str[MN]; |
| 1704 | if( SHGetFolderPath(NULL, (common ? CSIDL_COMMON_APPDATA : CSIDL_APPDATA) | CSIDL_FLAG_CREATE, |
| 1705 | NULL, SHGFP_TYPE_CURRENT, str) == S_OK ) |
| 1706 | { |
| 1707 | result = IncludeTrailingPathDelimiter(str); |
| 1708 | if( folder.Length() > 0 ) |
| 1709 | { |
| 1710 | result += IncludeTrailingPathDelimiter(folder); |
| 1711 | if( ! DirectoryExists(result) ) |
| 1712 | CreateDir(result); |
| 1713 | } |
| 1714 | } |
| 1715 | else |
| 1716 | { |
| 1717 | result = def; |
| 1718 | } |
| 1719 | return result; |
| 1720 | } |
| 1721 | //--------------------------------------------------------------------------- |
| 1722 | bool RunPaint(String file, String * error) |
| 1723 | { |
nothing calls this directly
no outgoing calls
no test coverage detected