mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:13:03 +00:00
[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:
parent
eacaf65459
commit
fbf119fde1
11 changed files with 574 additions and 69 deletions
|
@ -13,6 +13,8 @@
|
|||
|
||||
#include <atlcom.h>
|
||||
|
||||
#include <gdiplus.h>
|
||||
|
||||
HWND hMainWnd;
|
||||
HINSTANCE hInst;
|
||||
SETTINGS_INFO SettingsInfo;
|
||||
|
@ -28,6 +30,10 @@ END_OBJECT_MAP()
|
|||
CRAppsModule gModule;
|
||||
CAtlWinModule gWinModule;
|
||||
|
||||
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
|
||||
ULONG_PTR gdiplusToken;
|
||||
|
||||
|
||||
static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize)
|
||||
{
|
||||
if (bInitialize)
|
||||
|
@ -40,6 +46,18 @@ static VOID InitializeAtlModule(HINSTANCE hInstance, BOOL bInitialize)
|
|||
}
|
||||
}
|
||||
|
||||
VOID InitializeGDIPlus(BOOL bInitialize)
|
||||
{
|
||||
if (bInitialize)
|
||||
{
|
||||
Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
Gdiplus::GdiplusShutdown(gdiplusToken);
|
||||
}
|
||||
}
|
||||
|
||||
VOID FillDefaultSettings(PSETTINGS_INFO pSettingsInfo)
|
||||
{
|
||||
ATL::CStringW szDownloadDir;
|
||||
|
@ -129,6 +147,7 @@ INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
|
|||
BOOL bIsFirstLaunch;
|
||||
|
||||
InitializeAtlModule(hInstance, TRUE);
|
||||
InitializeGDIPlus(TRUE);
|
||||
|
||||
if (GetUserDefaultUILanguage() == MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT))
|
||||
{
|
||||
|
@ -169,6 +188,7 @@ INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi
|
|||
if (hMutex)
|
||||
CloseHandle(hMutex);
|
||||
|
||||
InitializeGDIPlus(FALSE);
|
||||
InitializeAtlModule(hInstance, FALSE);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue