diff --git a/Application/Application.cpp b/Application/Application.cpp index becf0a7c..e39d787d 100644 --- a/Application/Application.cpp +++ b/Application/Application.cpp @@ -21,7 +21,6 @@ #include #include #include -#include "resource.h" #include "../Library/Rainmeter.h" #if defined _M_IX86 diff --git a/Application/Application.rc b/Application/Application.rc index 7c992dcd..3a2b0ff5 100644 --- a/Application/Application.rc +++ b/Application/Application.rc @@ -1,23 +1,9 @@ // Microsoft Developer Studio generated resource script. -// Caution! Do not modify this file without changing \install\UpdateApplicationRC.au3 -// -#include "resource.h" +// +#include +#include "../Library/resource.h" #include "../Version.h" -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Finnish resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT #pragma code_page(1252) @@ -72,44 +58,3 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_RAINMETER ICON DISCARDABLE "Rainmeter.ico" - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE DISCARDABLE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE DISCARDABLE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE DISCARDABLE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Finnish resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Application/Application.vcxproj b/Application/Application.vcxproj index f5300d9f..6b6adec9 100644 --- a/Application/Application.vcxproj +++ b/Application/Application.vcxproj @@ -313,9 +313,6 @@ xcopy /Q /S /Y ..\Install\Default.ini ..\testbench\x32\release\ NDEBUG;%(PreprocessorDefinitions) - - - diff --git a/Application/Application.vcxproj.filters b/Application/Application.vcxproj.filters index 079efa20..ee504c01 100644 --- a/Application/Application.vcxproj.filters +++ b/Application/Application.vcxproj.filters @@ -19,11 +19,6 @@ Source Files - - - Header Files - - Resource Files diff --git a/Application/resource.h b/Application/resource.h deleted file mode 100644 index 4c05a793..00000000 --- a/Application/resource.h +++ /dev/null @@ -1,21 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by Host.rc -// -#define IDI_RAINMETER 103 -#define IDR_TRAYMENU 104 -#define ID_TRAYMENU_REFRESH 40001 -#define ID_TRAYMENU_QUIT 40002 -#define ID_TRAYMENU_SHOW 40003 -#define ID_TRAYMENU_HIDE 40010 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 105 -#define _APS_NEXT_COMMAND_VALUE 40011 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/Library/DialogAbout.cpp b/Library/DialogAbout.cpp index 3971c927..46f28a13 100644 --- a/Library/DialogAbout.cpp +++ b/Library/DialogAbout.cpp @@ -245,7 +245,7 @@ INT_PTR CALLBACK CDialogAbout::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR INT_PTR CDialogAbout::OnInitDialog(WPARAM wParam, LPARAM lParam) { - HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY)); + HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, 16, 16, LR_SHARED); SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); if (wcscmp(GetString(ID_STR_ISRTL), L"1") == 0) @@ -1030,7 +1030,7 @@ void CDialogAbout::CTabVersion::Initialize() m_Initialized = true; HWND item = GetDlgItem(m_Window, IDC_ABOUTVERSION_RAINMETER_ICON); - HICON icon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_WINDOW)); + HICON icon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, 32, 32, LR_SHARED); Static_SetIcon(item, icon); item = GetDlgItem(m_Window, IDC_ABOUTVERSION_VERSION_TEXT); diff --git a/Library/DialogManage.cpp b/Library/DialogManage.cpp index 5a6e9d9a..77913c81 100644 --- a/Library/DialogManage.cpp +++ b/Library/DialogManage.cpp @@ -226,7 +226,7 @@ INT_PTR CALLBACK CDialogManage::DlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam) { - HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY)); + HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, 16, 16, LR_SHARED); SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); if (wcscmp(GetString(ID_STR_ISRTL), L"1") == 0) diff --git a/Library/Library.rc b/Library/Library.rc index d99347bf..a2a9da39 100644 --- a/Library/Library.rc +++ b/Library/Library.rc @@ -49,13 +49,3 @@ BEGIN VALUE "Translation", 0x409, 1252 END END - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_TRAY ICON DISCARDABLE "res\\tray.ico" -IDI_WINDOW ICON DISCARDABLE "res\\window.ico" diff --git a/Library/Library.vcxproj b/Library/Library.vcxproj index eb3ea322..b59cbbf2 100644 --- a/Library/Library.vcxproj +++ b/Library/Library.vcxproj @@ -924,10 +924,6 @@ - - - - diff --git a/Library/Library.vcxproj.filters b/Library/Library.vcxproj.filters index f41e19f7..5fc2558e 100644 --- a/Library/Library.vcxproj.filters +++ b/Library/Library.vcxproj.filters @@ -597,14 +597,6 @@ Header Files - - - Resource Files - - - Resource Files - - Resource Files diff --git a/Library/Res/tray.ico b/Library/Res/tray.ico deleted file mode 100644 index e5c46e33..00000000 Binary files a/Library/Res/tray.ico and /dev/null differ diff --git a/Library/Res/window.ico b/Library/Res/window.ico deleted file mode 100644 index 97bd22c6..00000000 Binary files a/Library/Res/window.ico and /dev/null differ diff --git a/Library/TrayWindow.cpp b/Library/TrayWindow.cpp index d1d8fd7b..3e767ec8 100644 --- a/Library/TrayWindow.cpp +++ b/Library/TrayWindow.cpp @@ -264,7 +264,7 @@ HICON CTrayWindow::CreateTrayIcon(double value) } // Return the default icon if there is no valid measure - return LoadIcon(m_Instance, MAKEINTRESOURCE(IDI_TRAY)); + return (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RAINMETER), IMAGE_ICON, 16, 16, LR_SHARED); } void CTrayWindow::ReadConfig(CConfigParser& parser) diff --git a/Library/resource.h b/Library/resource.h index cc2eed23..b6949301 100644 --- a/Library/resource.h +++ b/Library/resource.h @@ -3,8 +3,8 @@ // Used by Library.rc // #define IDC_STATIC -1 -#define IDI_TRAY 100 -#define IDI_WINDOW 101 +#define IDI_RAINMETER 100 +#define IDI_TRAY 101 #define IDR_CONTEXT_MENU 102 #define IDR_SKIN_MENU 103 #define IDR_MANAGESKINS_MENU 104