Author: akhaldi
Date: Tue Jun 9 22:49:12 2015
New Revision: 68096
URL:
http://svn.reactos.org/svn/reactos?rev=68096&view=rev
Log:
[RAPPS] Fix the fact that the rapps download dialog uses the 32pixel icon for the download
window. By Ismael Ferreras Morezuelas (IRC name swyter). CORE-9750
Modified:
trunk/reactos/base/applications/rapps/loaddlg.c
Modified: trunk/reactos/base/applications/rapps/loaddlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/lo…
==============================================================================
--- trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] Tue Jun 9 22:49:12 2015
@@ -30,7 +30,6 @@
#include <shellapi.h>
static PAPPLICATION_INFO AppInfo;
-static HICON hIcon = NULL;
typedef struct _IBindStatusCallbackImpl
{
@@ -378,12 +377,15 @@
switch (Msg)
{
case WM_INITDIALOG:
-
- hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(IDI_MAIN));
- if (hIcon)
+ HICON hIconSm = NULL, hIconBg = NULL;
+
+ hIconBg = (HICON)GetClassLongPtr(hMainWnd, GCLP_HICON);
+ hIconSm = (HICON)GetClassLongPtr(hMainWnd, GCLP_HICONSM);
+
+ if (hIconBg && hIconSm)
{
- SendMessageW(Dlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon);
- SendMessageW(Dlg, WM_SETICON, ICON_SMALL, (LPARAM) hIcon);
+ SendMessageW(Dlg, WM_SETICON, ICON_BIG, (LPARAM) hIconBg);
+ SendMessageW(Dlg, WM_SETICON, ICON_SMALL, (LPARAM) hIconSm);
}
SetWindowLongPtrW(Dlg, GWLP_USERDATA, 0);
@@ -408,7 +410,6 @@
return FALSE;
case WM_CLOSE:
- if (hIcon) DestroyIcon(hIcon);
EndDialog(Dlg, 0);
return TRUE;