mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 10:33:27 +00:00
Sync rapps_new with rapps. Porting done by Mark Jensen. Original code from Ismael Ferreras Morezuelas.
CORE-10986 svn path=/trunk/; revision=71043
This commit is contained in:
parent
72fc8c1283
commit
3ccdac9aca
1 changed files with 9 additions and 7 deletions
|
@ -36,7 +36,6 @@
|
||||||
#include <shellutils.h>
|
#include <shellutils.h>
|
||||||
|
|
||||||
static PAPPLICATION_INFO AppInfo;
|
static PAPPLICATION_INFO AppInfo;
|
||||||
static HICON hIcon = NULL;
|
|
||||||
|
|
||||||
class CDownloadDialog :
|
class CDownloadDialog :
|
||||||
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
||||||
|
@ -359,12 +358,16 @@ DownloadDlgProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
switch (Msg)
|
switch (Msg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
|
||||||
hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN));
|
|
||||||
if (hIcon)
|
|
||||||
{
|
{
|
||||||
SendMessageW(Dlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
|
HICON hIconSm = NULL, hIconBg = NULL;
|
||||||
SendMessageW(Dlg, WM_SETICON, ICON_SMALL, (LPARAM) hIcon);
|
|
||||||
|
hIconBg = (HICON)GetClassLongPtr(hMainWnd, GCLP_HICON);
|
||||||
|
hIconSm = (HICON)GetClassLongPtr(hMainWnd, GCLP_HICONSM);
|
||||||
|
|
||||||
|
if (hIconBg && hIconSm)
|
||||||
|
{
|
||||||
|
SendMessageW(Dlg, WM_SETICON, ICON_BIG, (LPARAM) hIconBg);
|
||||||
|
SendMessageW(Dlg, WM_SETICON, ICON_SMALL, (LPARAM) hIconSm);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetWindowLongPtrW(Dlg, GWLP_USERDATA, 0);
|
SetWindowLongPtrW(Dlg, GWLP_USERDATA, 0);
|
||||||
|
@ -379,7 +382,7 @@ DownloadDlgProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
if (!Thread) return FALSE;
|
if (!Thread) return FALSE;
|
||||||
CloseHandle(Thread);
|
CloseHandle(Thread);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
}
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
if (wParam == IDCANCEL)
|
if (wParam == IDCANCEL)
|
||||||
{
|
{
|
||||||
|
@ -389,7 +392,6 @@ DownloadDlgProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
if (hIcon) DestroyIcon(hIcon);
|
|
||||||
EndDialog(Dlg, 0);
|
EndDialog(Dlg, 0);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue