[RAPPS] Screenshot preview and other trivial fixes (#2894)

* add one more layer of window
* using Path* API to operate path
* always use rappmgr.cab as file name when downloading db. ignore the URL
* add snapshot preview window
* show a broken-image icon when failed to load image
* add a padding between image and content, and make sure always some space is reserved for richedit
* hide the padding if snapshot window does not have a width
* some work to avoid blinking when window resizing
* add WM_PRINTCLIENT handling
This commit is contained in:
He Yang 2020-06-14 21:22:58 +08:00 committed by Mark Jansen
parent eacaf65459
commit fbf119fde1
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
11 changed files with 574 additions and 69 deletions

View file

@ -177,14 +177,15 @@ BOOL StartProcess(LPWSTR lpPath, BOOL Wait)
BOOL GetStorageDirectory(ATL::CStringW& Directory)
{
if (!SHGetSpecialFolderPathW(NULL, Directory.GetBuffer(MAX_PATH), CSIDL_LOCAL_APPDATA, TRUE))
LPWSTR DirectoryStr = Directory.GetBuffer(MAX_PATH);
if (!SHGetSpecialFolderPathW(NULL, DirectoryStr, CSIDL_LOCAL_APPDATA, TRUE))
{
Directory.ReleaseBuffer();
return FALSE;
}
PathAppendW(DirectoryStr, L"rapps");
Directory.ReleaseBuffer();
Directory += L"\\rapps";
return (CreateDirectoryW(Directory.GetString(), NULL) || GetLastError() == ERROR_ALREADY_EXISTS);
}