mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
Updater: fixed rc positions
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@5372 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -69,13 +69,13 @@ CAPTION "Process Hacker Updater"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Close",IDOK,203,70,50,14
|
||||
CONTROL "Check for new releases?",IDC_MESSAGE,"Static",SS_SIMPLE | SS_NOPREFIX | SS_WORDELLIPSIS | WS_GROUP,7,7,197,18,WS_EX_TRANSPARENT
|
||||
CONTROL "",IDC_RELDATE,"Static",SS_SIMPLE | SS_NOPREFIX | SS_WORDELLIPSIS | WS_GROUP,7,24,192,9,WS_EX_TRANSPARENT
|
||||
CONTROL "Check for new releases?",IDC_MESSAGE,"Static",SS_SIMPLE | SS_NOPREFIX | SS_WORDELLIPSIS | WS_GROUP,7,7,194,13,WS_EX_TRANSPARENT
|
||||
CONTROL "",IDC_RELDATE,"Static",SS_SIMPLE | SS_NOPREFIX | SS_WORDELLIPSIS | WS_GROUP,7,24,194,11,WS_EX_TRANSPARENT
|
||||
PUSHBUTTON "Start",IDC_DOWNLOAD,149,70,50,14
|
||||
CONTROL "",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | NOT WS_VISIBLE,7,54,245,11
|
||||
CONTROL "",IDC_UPDATEICON,"Static",SS_BITMAP | SS_CENTERIMAGE,214,2,41,45,WS_EX_TRANSPARENT
|
||||
CONTROL "",IDC_UPDATEICON,"Static",SS_BITMAP | SS_CENTERIMAGE,218,3,38,38,WS_EX_TRANSPARENT
|
||||
CONTROL "",IDC_STATUS,"Static",SS_SIMPLE | SS_NOPREFIX | SS_WORDELLIPSIS | WS_GROUP,7,72,135,8,WS_EX_TRANSPARENT
|
||||
CONTROL "<a>View Changelog</a>",IDC_INFOSYSLINK,"SysLink",NOT WS_VISIBLE | WS_TABSTOP,7,37,89,9
|
||||
CONTROL "<a>View Changelog</a>",IDC_INFOSYSLINK,"SysLink",NOT WS_VISIBLE | WS_TABSTOP,7,39,89,11,WS_EX_TRANSPARENT
|
||||
END
|
||||
|
||||
IDD_OPTIONS DIALOGEX 0, 0, 215, 54
|
||||
@@ -109,9 +109,9 @@ BEGIN
|
||||
IDD_OPTIONS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 193
|
||||
RIGHTMARGIN, 208
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 53
|
||||
BOTTOMMARGIN, 47
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
@@ -39,6 +39,8 @@ static HWND UpdateDialogHandle = NULL;
|
||||
static PH_EVENT InitializedEvent = PH_EVENT_INIT;
|
||||
|
||||
static HBITMAP LoadImageFromResources(
|
||||
__in UINT Width,
|
||||
__in UINT Height,
|
||||
__in LPCTSTR Name,
|
||||
__in LPCTSTR Type
|
||||
)
|
||||
@@ -94,21 +96,21 @@ static HBITMAP LoadImageFromResources(
|
||||
__leave;
|
||||
|
||||
bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
bitmapInfo.bmiHeader.biWidth = 64;
|
||||
bitmapInfo.bmiHeader.biHeight = -((LONG)64);
|
||||
bitmapInfo.bmiHeader.biWidth = Width;
|
||||
bitmapInfo.bmiHeader.biHeight = -((LONG)Height);
|
||||
bitmapInfo.bmiHeader.biPlanes = 1;
|
||||
bitmapInfo.bmiHeader.biBitCount = 32;
|
||||
bitmapInfo.bmiHeader.biCompression = BI_RGB;
|
||||
|
||||
if ((bitmapHandle = CreateDIBSection(hdcScreen, &bitmapInfo, DIB_RGB_COLORS, (void**)&bitmapBuffer, NULL, 0)) != NULL)
|
||||
if ((bitmapHandle = CreateDIBSection(hdcScreen, &bitmapInfo, DIB_RGB_COLORS, (PVOID*)&bitmapBuffer, NULL, 0)) != NULL)
|
||||
{
|
||||
WICRect rect = { 0, 0, 64, 64 };
|
||||
WICRect rect = { 0, 0, Width, Height };
|
||||
|
||||
if (FAILED(IWICImagingFactory_CreateBitmapScaler(wicFactory, &wicScaler)))
|
||||
__leave;
|
||||
if (FAILED(IWICBitmapScaler_Initialize(wicScaler, (IWICBitmapSource*)wicFrame, 64, 64, WICBitmapInterpolationModeFant)))
|
||||
if (FAILED(IWICBitmapScaler_Initialize(wicScaler, (IWICBitmapSource*)wicFrame, Width, Height, WICBitmapInterpolationModeFant)))
|
||||
__leave;
|
||||
if (SUCCEEDED(IWICBitmapScaler_CopyPixels(wicScaler, &rect, 64 * 4, 64 * 64 * 4, bitmapBuffer)))
|
||||
if (SUCCEEDED(IWICBitmapScaler_CopyPixels(wicScaler, &rect, Width * 4, Width * Height * 4, bitmapBuffer)))
|
||||
__leave;
|
||||
}
|
||||
}
|
||||
@@ -736,7 +738,7 @@ static NTSTATUS UpdateDownloadThread(
|
||||
PhInitializeHash(&hashContext, Sha1HashAlgorithm);
|
||||
|
||||
// Zero the buffer.
|
||||
ZeroMemory(buffer, PAGE_SIZE);
|
||||
memset(buffer, 0, PAGE_SIZE);
|
||||
|
||||
// Download the data.
|
||||
while (WinHttpReadData(requestHandle, buffer, PAGE_SIZE, &bytesDownloaded))
|
||||
@@ -905,6 +907,7 @@ static INT_PTR CALLBACK UpdaterWndProc(
|
||||
);
|
||||
|
||||
context->SourceforgeBitmap = LoadImageFromResources(
|
||||
48, 48,
|
||||
MAKEINTRESOURCE(IDB_SF_PNG),
|
||||
L"PNG"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user