From cbe3cb21f5bca61a03bbd4ae811ee906e09b3f4f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 13 Jun 2015 16:55:17 +0000 Subject: - miranda32.exe now does nothing bug extends PATH to %miranda_root%\libs and loads mir_app.dll; - everything that was in miranda32.exe (including resources) moved to mir_app.dll; - exports from mir_app.dll now available for using directly, without perversions; - src/stdplug.h deleted; git-svn-id: http://svn.miranda-ng.org/main/trunk@14143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_blind/res/resource.rc | 8 ++++---- .../Clist_modern/src/hdr/modern_commonprototypes.h | 2 +- plugins/Clist_modern/src/init.cpp | 3 ++- plugins/Clist_modern/src/modern_clc.cpp | 12 ++++++------ plugins/Clist_modern/src/modern_clistevents.cpp | 2 +- plugins/Clist_modern/src/modern_clui.cpp | 2 +- plugins/Clist_modern/src/modern_skinbutton.cpp | 5 +---- plugins/Clist_modern/src/modern_viewmodebar.cpp | 2 +- plugins/Clist_nicer/res/resource.rc | 8 ++++---- plugins/Folders/src/services.cpp | 2 +- plugins/MirFox/MirFoxNG_10.vcxproj | 4 ++-- plugins/MirFox/MirFoxNG_12.vcxproj | 4 ++-- plugins/ModernOpt/src/commonheaders.h | 2 +- plugins/NewAwaySysMod/src/AwayOpt.cpp | 2 +- plugins/NewAwaySysMod/src/SetAwayMsg.cpp | 2 +- plugins/OpenSSL/OpenSSL_10.vcxproj | 8 ++++---- plugins/OpenSSL/OpenSSL_12.vcxproj | 8 ++++---- plugins/Popup/src/actions.cpp | 22 +++++++++++----------- plugins/Popup/src/history.cpp | 4 ++-- plugins/Popup/src/icons.cpp | 12 ------------ plugins/Popup/src/icons.h | 1 - plugins/Popup/src/main.cpp | 14 +++++++------- plugins/Popup/src/opt_adv.cpp | 2 +- plugins/Popup/src/opt_class.cpp | 6 +++--- plugins/Popup/src/opt_contacts.cpp | 20 ++++++++++---------- plugins/Popup/src/opt_gen.cpp | 6 +++--- plugins/Popup/src/opt_skins.cpp | 4 ++-- plugins/Popup/src/popup_wnd2.cpp | 18 +++++++++--------- plugins/Popup/src/services.cpp | 6 +++--- plugins/Popup/src/srmm_menu.cpp | 8 ++++---- plugins/TabSRMM/res/resource.rc | 6 +++--- plugins/TopToolBar/res/main.rc | 4 ++-- plugins/UserInfoEx/src/ctrl_button.cpp | 2 +- .../src/ex_import/dlg_ExImOpenSaveFile.cpp | 2 +- 34 files changed, 99 insertions(+), 114 deletions(-) (limited to 'plugins') diff --git a/plugins/Clist_blind/res/resource.rc b/plugins/Clist_blind/res/resource.rc index 175d58206c..a9388733bd 100644 --- a/plugins/Clist_blind/res/resource.rc +++ b/plugins/Clist_blind/res/resource.rc @@ -299,7 +299,7 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_RENAME ICON "rename.ico" -IDI_BLANK ICON "..\\..\\..\\src\\res\\_blank.ico" +IDI_BLANK ICON "..\\..\\..\\src\\mir_app\\res\\_blank.ico" IDI_DELETE ICON "delete.ico" ///////////////////////////////////////////////////////////////////////////// @@ -307,9 +307,9 @@ IDI_DELETE ICON "delete.ico" // Cursor // -IDC_HYPERLINKHAND CURSOR "..\\..\\..\\src\\res\\cursor_hyperlink.cur" -IDC_DROP CURSOR "..\\..\\..\\src\\res\\cursor_drag_copy.cur" -IDC_DROPUSER CURSOR "..\\..\\..\\src\\res\\cursor_drop_user.cur" +IDC_HYPERLINKHAND CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_hyperlink.cur" +IDC_DROP CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drag_copy.cur" +IDC_DROPUSER CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drop_user.cur" ///////////////////////////////////////////////////////////////////////////// // diff --git a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h index 512f145f69..63c5f5ef09 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h @@ -56,7 +56,7 @@ extern BYTE g_bCalledFromShowHide; extern HICON g_hListeningToIcon; extern HWND g_hCLUIOptionsWnd; extern BOOL g_bTransparentFlag; -extern HINSTANCE g_hInst; +extern HINSTANCE g_hInst, g_hMirApp; extern BOOL g_mutex_bChangingMode; extern UINT g_dwMainThreadID; extern HANDLE g_hAwayMsgThread, g_hGetTextAsyncThread, g_hSmoothAnimationThread; diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 870ac56431..a676957105 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CHECKRES(sub) if (sub != S_OK) return S_FALSE; -HINSTANCE g_hInst = 0; +HINSTANCE g_hInst = 0, g_hMirApp = 0; CLIST_INTERFACE *pcli = NULL; CLIST_INTERFACE corecli = { 0 }; CLUIDATA g_CluiData = { 0 }; @@ -80,6 +80,7 @@ extern "C" __declspec(dllexport) int CListInitialise() mir_getTMI(&tmi); g_dwMainThreadID = GetCurrentThreadId(); + g_hMirApp = GetModuleHandleA("mir_app.dll"); CHECKRES(PreLoadContactListModule()); CHECKRES(SubclassClistInterface()); diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index a6cb44c833..2f3a6d4313 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1011,7 +1011,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR break; if (contSour->type == CLCIT_CONTACT && mir_strcmp(contSour->proto, META_PROTO)) { if (!contSour->isSubcontact) - hNewCursor = LoadCursor(GetModuleHandle(NULL), MAKEINTRESOURCE(IDC_DROPUSER)); /// Add to meta + hNewCursor = LoadCursor(g_hMirApp, MAKEINTRESOURCE(IDC_DROPUSER)); /// Add to meta else hNewCursor = LoadCursor(g_hInst, MAKEINTRESOURCE(IDC_DROPMETA)); } @@ -1024,7 +1024,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR break; if (contSour->type == CLCIT_CONTACT && mir_strcmp(contSour->proto, META_PROTO)) { if (!contSour->isSubcontact) - hNewCursor = LoadCursor(GetModuleHandle(NULL), MAKEINTRESOURCE(IDC_DROPUSER)); /// Add to meta + hNewCursor = LoadCursor(g_hMirApp, MAKEINTRESOURCE(IDC_DROPUSER)); /// Add to meta else if (contSour->subcontacts == contDest) hNewCursor = LoadCursor(g_hInst, MAKEINTRESOURCE(IDC_DEFAULTSUB)); ///MakeDefault else @@ -1039,7 +1039,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR break; if (contSour->type == CLCIT_CONTACT && mir_strcmp(contSour->proto, META_PROTO)) { if (!contSour->isSubcontact) - hNewCursor = LoadCursor(GetModuleHandle(NULL), MAKEINTRESOURCE(IDC_DROPUSER)); /// Add to meta + hNewCursor = LoadCursor(g_hMirApp, MAKEINTRESOURCE(IDC_DROPUSER)); /// Add to meta else if (contDest->subcontacts == contSour->subcontacts) break; else @@ -1048,11 +1048,11 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR break; case DROPTARGET_ONGROUP: - hNewCursor = LoadCursor(GetModuleHandle(NULL), MAKEINTRESOURCE(IDC_DROPUSER)); + hNewCursor = LoadCursor(g_hMirApp, MAKEINTRESOURCE(IDC_DROPUSER)); break; case DROPTARGET_INSERTION: - hNewCursor = LoadCursor(GetModuleHandle(NULL), MAKEINTRESOURCE(IDC_DROP)); + hNewCursor = LoadCursor(g_hMirApp, MAKEINTRESOURCE(IDC_DROP)); break; case DROPTARGET_OUTSIDE: @@ -1088,7 +1088,7 @@ static LRESULT clcOnMouseMove(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPAR ClcContact *contSour; cliGetRowByIndex(dat, dat->iDragItem, &contSour, NULL); if (!contSour->isSubcontact) - hNewCursor = LoadCursor(GetModuleHandle(NULL), MAKEINTRESOURCE(IDC_DROPUSER)); + hNewCursor = LoadCursor(g_hMirApp, MAKEINTRESOURCE(IDC_DROPUSER)); } break; } diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index 6460bdab29..d2afb5b63c 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -351,7 +351,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC) ske_DrawText(hDC, szName, -1, &rc, DT_VCENTER | DT_SINGLELINE); } else { - HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_BLANK), IMAGE_ICON, 16, 16, 0); + HICON hIcon = (HICON)LoadImage(g_hMirApp, MAKEINTRESOURCE(IDI_BLANK), IMAGE_ICON, 16, 16, 0); TCHAR *ptszEvents = TranslateT("No events"); ske_DrawText(hDC, ptszEvents, (int)mir_tstrlen(ptszEvents), &rc, DT_VCENTER | DT_SINGLELINE); ske_DrawIconEx(hDC, 4, (rc.bottom + rc.top - 16) / 2, hIcon, 16, 16, 0, 0, DI_NORMAL | DI_COMPAT); diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index b1ea419cb8..adb904fab5 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -896,7 +896,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) if (!tszFolderPath[0]) { TCHAR szRelativePath[MAX_PATH]; - GetModuleFileName(GetModuleHandle(NULL), szRelativePath, MAX_PATH); + GetModuleFileName(NULL, szRelativePath, MAX_PATH); TCHAR *str = _tcsrchr(szRelativePath, '\\'); if (str != NULL) *str = 0; diff --git a/plugins/Clist_modern/src/modern_skinbutton.cpp b/plugins/Clist_modern/src/modern_skinbutton.cpp index c2908ede3a..2e2d8ec652 100644 --- a/plugins/Clist_modern/src/modern_skinbutton.cpp +++ b/plugins/Clist_modern/src/modern_skinbutton.cpp @@ -488,14 +488,11 @@ HWND SetToolTip(HWND hwnd, TCHAR * tip) if (!tip) return 0; mir_cslock lck(csTips); if (!hwndToolTips) { - // hwndToolTips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL); - hwndToolTips = CreateWindowEx(0, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hwnd, NULL, GetModuleHandle(NULL), - NULL); + hwnd, NULL, g_hMirApp, NULL); SetWindowPos(hwndToolTips, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index f776ccf551..cd53b1e77b 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -649,7 +649,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP Skin_ReleaseIcon(hIcon); } - HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_SMALLDOT), IMAGE_ICON, 16, 16, 0); + HICON hIcon = (HICON)LoadImage(g_hMirApp, MAKEINTRESOURCE(IDI_SMALLDOT), IMAGE_ICON, 16, 16, 0); nullImage = ImageList_AddIcon(himlViewModes, hIcon); DestroyIcon(hIcon); diff --git a/plugins/Clist_nicer/res/resource.rc b/plugins/Clist_nicer/res/resource.rc index 77f029667b..e2ec27705c 100644 --- a/plugins/Clist_nicer/res/resource.rc +++ b/plugins/Clist_nicer/res/resource.rc @@ -542,7 +542,7 @@ IDI_CLIST ICON "clist.ico" IDI_DELETE ICON "delete.ico" IDI_CLVM_OPTIONS ICON "options_clvm.ico" IDI_CLVM_SELECT ICON "arrow-down.ico" -IDI_BLANK ICON "..\\..\\..\\src\\res\\_blank.ico" +IDI_BLANK ICON "..\\..\\..\\src\\mir_app\\res\\_blank.ico" IDI_OVL_OFFLINE ICON "overlay/offline.ico" IDI_OVL_ONLINE ICON "overlay/online.ico" IDI_OVL_AWAY ICON "overlay/away.ico" @@ -570,9 +570,9 @@ IDI_TBACCOUNTS ICON "accounts.ico" // Cursor // -IDC_HYPERLINKHAND CURSOR "..\\..\\..\\src\\res\\cursor_hyperlink.cur" -IDC_DROP CURSOR "..\\..\\..\\src\\res\\cursor_drag_copy.cur" -IDC_DROPUSER CURSOR "..\\..\\..\\src\\res\\cursor_drop_user.cur" +IDC_HYPERLINKHAND CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_hyperlink.cur" +IDC_DROP CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drag_copy.cur" +IDC_DROPUSER CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drop_user.cur" ///////////////////////////////////////////////////////////////////////////// // diff --git a/plugins/Folders/src/services.cpp b/plugins/Folders/src/services.cpp index c09446f9d7..dfd24f6b59 100644 --- a/plugins/Folders/src/services.cpp +++ b/plugins/Folders/src/services.cpp @@ -83,7 +83,7 @@ int InitServices() CallService(MS_DB_GETPROFILENAMET, SIZEOF(szCurrentProfile), (LPARAM)szCurrentProfile); TCHAR *pos = _tcsrchr(szCurrentProfile, '.'); if (pos) *pos = 0; - GetModuleFileName(GetModuleHandle(NULL), szMirandaPath, SIZEOF(szMirandaPath)); + GetModuleFileName(GetModuleHandleA("mir_app.dll"), szMirandaPath, SIZEOF(szMirandaPath)); pos = _tcsrchr(szMirandaPath, '\\'); if (pos) *pos = 0; TCHAR *szTemp = Utils_ReplaceVarsT(_T("%miranda_userdata%")); diff --git a/plugins/MirFox/MirFoxNG_10.vcxproj b/plugins/MirFox/MirFoxNG_10.vcxproj index ef0a414871..30b94c3d67 100644 --- a/plugins/MirFox/MirFoxNG_10.vcxproj +++ b/plugins/MirFox/MirFoxNG_10.vcxproj @@ -117,7 +117,7 @@ true $(ProfileDir)..\..\bin10\lib - src\lib\$(PlatformToolset)\MirFoxCommons$(Configuration)$(PlatformArchitecture).lib;mir_core64.lib;Miranda64.lib;%(AdditionalDependencies) + src\lib\$(PlatformToolset)\MirFoxCommons$(Configuration)$(PlatformArchitecture).lib;mir_core64.lib;%(AdditionalDependencies) Windows $(IntDir)$(TargetName).lib @@ -173,7 +173,7 @@ true true true - src\lib\$(PlatformToolset)\MirFoxCommons$(Configuration)$(PlatformArchitecture).lib;mir_core64.lib;Miranda64.lib;%(AdditionalDependencies) + src\lib\$(PlatformToolset)\MirFoxCommons$(Configuration)$(PlatformArchitecture).lib;mir_core64.lib;%(AdditionalDependencies) Windows $(IntDir)$(TargetName).lib $(ProfileDir)..\..\bin10\lib diff --git a/plugins/MirFox/MirFoxNG_12.vcxproj b/plugins/MirFox/MirFoxNG_12.vcxproj index f805b939dc..00e267c6a3 100644 --- a/plugins/MirFox/MirFoxNG_12.vcxproj +++ b/plugins/MirFox/MirFoxNG_12.vcxproj @@ -122,7 +122,7 @@ true $(ProfileDir)..\..\bin12\lib - src\lib\$(PlatformToolset)\MirFoxCommons$(Configuration)$(PlatformArchitecture).lib;mir_core64.lib;Miranda64.lib;%(AdditionalDependencies) + src\lib\$(PlatformToolset)\MirFoxCommons$(Configuration)$(PlatformArchitecture).lib;mir_core64.lib;%(AdditionalDependencies) Windows $(IntDir)$(TargetName).lib @@ -177,7 +177,7 @@ true true true - src\lib\$(PlatformToolset)\MirFoxCommons$(Configuration)$(PlatformArchitecture).lib;mir_core64.lib;Miranda64.lib;%(AdditionalDependencies) + src\lib\$(PlatformToolset)\MirFoxCommons$(Configuration)$(PlatformArchitecture).lib;mir_core64.lib;%(AdditionalDependencies) Windows $(IntDir)$(TargetName).lib $(ProfileDir)..\..\bin12\lib diff --git a/plugins/ModernOpt/src/commonheaders.h b/plugins/ModernOpt/src/commonheaders.h index 839233870d..51e6bc386c 100644 --- a/plugins/ModernOpt/src/commonheaders.h +++ b/plugins/ModernOpt/src/commonheaders.h @@ -44,4 +44,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "resource.h" #include "version.h" #include "modernopt.h" -#include "..\..\..\src\resource.h" +#include "..\..\..\src\mir_app\src\resource.h" diff --git a/plugins/NewAwaySysMod/src/AwayOpt.cpp b/plugins/NewAwaySysMod/src/AwayOpt.cpp index 39ad214e9e..8f70efaf24 100644 --- a/plugins/NewAwaySysMod/src/AwayOpt.cpp +++ b/plugins/NewAwaySysMod/src/AwayOpt.cpp @@ -552,7 +552,7 @@ INT_PTR CALLBACK AutoreplyOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l IDC_MOREOPTDLG_EVNTURL, LPGENT("URL"), IDC_MOREOPTDLG_EVNTFILE, LPGENT("File") }; - hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP | TTS_NOPREFIX, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL); + hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP | TTS_NOPREFIX, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.dll"), NULL); TOOLINFO ti = { 0 }; ti.cbSize = sizeof(ti); ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index b3f1478f5e..3cf2276d51 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -609,7 +609,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA // init tooltips TOOLINFO ti = { 0 }; - hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL); + hWndTooltips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, _T(""), WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.dll"), NULL); ti.cbSize = sizeof(ti); ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS; for (int i = 0; i < SIZEOF(Tooltips); i++) { diff --git a/plugins/OpenSSL/OpenSSL_10.vcxproj b/plugins/OpenSSL/OpenSSL_10.vcxproj index 29a81f0130..0ffca79075 100644 --- a/plugins/OpenSSL/OpenSSL_10.vcxproj +++ b/plugins/OpenSSL/OpenSSL_10.vcxproj @@ -93,7 +93,7 @@ ..\..\include\msapi;..\..\include - miranda32.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + ws2_32.lib;comctl32.lib;%(AdditionalDependencies) true true true @@ -127,7 +127,7 @@ ..\..\include\msapi;..\..\include - miranda32.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + ws2_32.lib;comctl32.lib;%(AdditionalDependencies) true 0x3ae00000 false @@ -158,7 +158,7 @@ ..\..\include\msapi;..\..\include - miranda64.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + ws2_32.lib;comctl32.lib;%(AdditionalDependencies) true true true @@ -191,7 +191,7 @@ ..\..\include\msapi;..\..\include - miranda64.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + ws2_32.lib;comctl32.lib;%(AdditionalDependencies) true 0x3ae00000 false diff --git a/plugins/OpenSSL/OpenSSL_12.vcxproj b/plugins/OpenSSL/OpenSSL_12.vcxproj index b2095a7d1c..20708138ac 100644 --- a/plugins/OpenSSL/OpenSSL_12.vcxproj +++ b/plugins/OpenSSL/OpenSSL_12.vcxproj @@ -97,7 +97,7 @@ ..\..\include\msapi;..\..\include - miranda32.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + ws2_32.lib;comctl32.lib;%(AdditionalDependencies) true true true @@ -131,7 +131,7 @@ ..\..\include\msapi;..\..\include - miranda32.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + ws2_32.lib;comctl32.lib;%(AdditionalDependencies) true 0x3ae00000 false @@ -162,7 +162,7 @@ ..\..\include\msapi;..\..\include - miranda64.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + ws2_32.lib;comctl32.lib;%(AdditionalDependencies) true true true @@ -195,7 +195,7 @@ ..\..\include\msapi;..\..\include - miranda64.lib;ws2_32.lib;comctl32.lib;%(AdditionalDependencies) + ws2_32.lib;comctl32.lib;%(AdditionalDependencies) true 0x3ae00000 false diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index 291d2f10f8..9e33df9586 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -35,19 +35,19 @@ void LoadActions() { POPUPACTION actions[] = { - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_REPLY, 0), LPGEN("General")"/"LPGEN("Quick reply"), 0 }, - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_MESS, 0), LPGEN("General")"/"LPGEN("Send message"), 0 }, - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_INFO, 0), LPGEN("General")"/"LPGEN("User details"), 0 }, - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_MENU, 0), LPGEN("General")"/"LPGEN("Contact menu"), 0 }, - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_ADD, 0), LPGEN("General")"/"LPGEN("Add permanently"), 0 }, - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_PIN, 0), LPGEN("General")"/"LPGEN("Pin popup"), 0 }, - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_CLOSE, 0), LPGEN("General")"/"LPGEN("Dismiss popup"), 0 }, - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_COPY, 0), LPGEN("General")"/"LPGEN("Copy to clipboard"), 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_REPLY, 0), LPGEN("General")"/"LPGEN("Quick reply"), 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_MESS, 0), LPGEN("General")"/"LPGEN("Send message"), 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_INFO, 0), LPGEN("General")"/"LPGEN("User details"), 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_MENU, 0), LPGEN("General")"/"LPGEN("Contact menu"), 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_ADD, 0), LPGEN("General")"/"LPGEN("Add permanently"), 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_PIN, 0), LPGEN("General")"/"LPGEN("Pin popup"), 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_CLOSE, 0), LPGEN("General")"/"LPGEN("Dismiss popup"), 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_COPY, 0), LPGEN("General")"/"LPGEN("Copy to clipboard"), 0 }, // remove popup action #if defined(_DEBUG) - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_POPUP_ON, 0), "Popup Plus/Test action", PAF_ENABLED }, - { sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_CLOSE, 0), "Popup Plus/Second test action", 0 }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_POPUP_ON, 0), "Popup Plus/Test action", PAF_ENABLED }, + { sizeof(POPUPACTION), Skin_GetIcon(ICO_ACT_CLOSE, 0), "Popup Plus/Second test action", 0 }, { sizeof(POPUPACTION), LoadSkinnedIcon(SKINICON_OTHER_MIRANDA), "Popup Plus/One more action", PAF_ENABLED }, #endif }; @@ -189,7 +189,7 @@ INT_PTR CALLBACK DlgProcPopupActions(HWND hwnd, UINT msg, WPARAM wParam, LPARAM TranslateDialogDefault(hwnd); - SendDlgItemMessage(hwnd, IDC_ICO_INFO, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_MISC_NOTIFY, 0), 0); + SendDlgItemMessage(hwnd, IDC_ICO_INFO, STM_SETICON, (WPARAM)Skin_GetIcon(ICO_MISC_NOTIFY, 0), 0); CheckDlgButton(hwnd, IDC_CHK_ENABLEACTIONS, PopupOptions.actions & ACT_ENABLE ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwnd, IDC_CHK_IMCONTACTSONLY, PopupOptions.actions & ACT_DEF_IMONLY ? BST_CHECKED : BST_UNCHECKED); diff --git a/plugins/Popup/src/history.cpp b/plugins/Popup/src/history.cpp index b2c2d0473b..2f01e420a6 100644 --- a/plugins/Popup/src/history.cpp +++ b/plugins/Popup/src/history.cpp @@ -129,8 +129,8 @@ static INT_PTR CALLBACK HistoryDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lPara HWND hwndList = GetDlgItem(hwnd, IDC_POPUP_LIST); for (int i = 0; i < arPopupHistory.getCount(); ++i) ListBox_SetItemData(hwndList, ListBox_AddString(hwndList, _T("")), 0); - SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)IcoLib_GetIcon(ICO_HISTORY, 0)); - SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(ICO_HISTORY, 1)); + SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon(ICO_HISTORY, 0)); + SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIcon(ICO_HISTORY, 1)); if (gbHppInstalled && PopupOptions.UseHppHistoryLog) { logType = LOG_HPP; diff --git a/plugins/Popup/src/icons.cpp b/plugins/Popup/src/icons.cpp index 321e62d569..de297c46c8 100644 --- a/plugins/Popup/src/icons.cpp +++ b/plugins/Popup/src/icons.cpp @@ -59,18 +59,6 @@ static IconItem iconList[] = { LPGEN("Copy to clipboard"), ICO_ACT_COPY, IDI_ACT_COPY } }; -/** - * Returns a icon, identified by a name - * @param pszIcon - name of the icon - * @param big - bool big icon (default = false) - * @return: HICON if the icon is loaded, NULL otherwise - **/ - -HICON IcoLib_GetIcon(LPCSTR pszIcon, bool big) -{ - return (pszIcon) ? Skin_GetIcon(pszIcon, big) : NULL; -} - void InitIcons() { Icon_Register(hInst, SECT_TOLBAR, iconList, 2); diff --git a/plugins/Popup/src/icons.h b/plugins/Popup/src/icons.h index 06b873b71b..40e502686d 100644 --- a/plugins/Popup/src/icons.h +++ b/plugins/Popup/src/icons.h @@ -65,6 +65,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define ICO_OPT_BLOCK MODULNAME"_opt_block" void InitIcons(); -HICON IcoLib_GetIcon(LPCSTR pszIcon, bool big = false); #endif // __icons_h__ diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index 302fe6f860..56c2277fd9 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -113,17 +113,17 @@ static int IconsChanged(WPARAM, LPARAM) CLISTMENUITEM mi = { sizeof(mi) }; if (PopupOptions.ModuleIsEnabled == TRUE) { // The module is enabled. // The action to do is "disable popups" (show disabled) and we must write "enable popup" in the new item. - mi.hIcon = IcoLib_GetIcon(ICO_POPUP_ON, 0); + mi.hIcon = Skin_GetIcon(ICO_POPUP_ON, 0); } else { // The module is disabled. // The action to do is enable popups (show enabled), then write "disable popup" in the new item. - mi.hIcon = IcoLib_GetIcon(ICO_POPUP_OFF, 0); + mi.hIcon = Skin_GetIcon(ICO_POPUP_OFF, 0); } mi.flags = CMIM_ICON; Menu_ModifyItem(hMenuItem, &mi); Menu_ModifyItem(hMenuRoot, &mi); - mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0); + mi.hIcon = Skin_GetIcon(ICO_HISTORY, 0); mi.flags = CMIM_ICON; Menu_ModifyItem(hMenuItemHistory, &mi); return 0; @@ -156,7 +156,7 @@ INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM) PopupOptions.ModuleIsEnabled = FALSE; db_set_b(NULL, "Popup", "ModuleIsEnabled", FALSE); mi.ptszName = LPGENT("Enable Popups"); - mi.hIcon = IcoLib_GetIcon(ICO_POPUP_OFF, 0); + mi.hIcon = Skin_GetIcon(ICO_POPUP_OFF, 0); } else { // The module is disabled. @@ -164,7 +164,7 @@ INT_PTR svcEnableDisableMenuCommand(WPARAM, LPARAM) PopupOptions.ModuleIsEnabled = TRUE; db_set_b(NULL, "Popup", "ModuleIsEnabled", TRUE); mi.ptszName = LPGENT("Disable Popups"); - mi.hIcon = IcoLib_GetIcon(ICO_POPUP_ON, 0); + mi.hIcon = Skin_GetIcon(ICO_POPUP_ON, 0); } mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR; Menu_ModifyItem(hMenuItem, &mi); @@ -193,7 +193,7 @@ void InitMenuItems(void) // Build main menu mi.position = -1000000000 /*1000001*/; mi.ptszName = LPGENT(MODULNAME_PLU); - mi.hIcon = IcoLib_GetIcon(PopupOptions.ModuleIsEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0); + mi.hIcon = Skin_GetIcon(PopupOptions.ModuleIsEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0); hMenuRoot = Menu_AddMainMenuItem(&mi); // Add item to main menu @@ -209,7 +209,7 @@ void InitMenuItems(void) mi.position = 1000000000; mi.popupPosition = 1999990000; mi.ptszName = LPGENT("Popup History"); - mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0); + mi.hIcon = Skin_GetIcon(ICO_HISTORY, 0); mi.pszService = MENUCOMMAND_HISTORY; hMenuItemHistory = Menu_AddMainMenuItem(&mi); } diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index 1183fa07d6..ee594e7494 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -112,7 +112,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HWND hCtrl = GetDlgItem(hwnd, IDC_SHOWHISTORY); SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0); SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)Translate("Popup History"), 0); - SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_HISTORY, 0)); + SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon(ICO_HISTORY, 0)); EnableWindow(GetDlgItem(hwnd, IDC_HISTORY_STATIC1), PopupOptions.EnableHistory); EnableWindow(GetDlgItem(hwnd, IDC_HISTORYSIZE), PopupOptions.EnableHistory); diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 35bd585ed0..f2f427c551 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -183,14 +183,14 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l TreeView_DeleteAllItems(hwndTree); // Treeview create image list HIMAGELIST hImgLst = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR | ILC_COLOR32 | ILC_MASK, 5, num_classes + 1); - ImageList_ReplaceIcon(hImgLst, -1, IcoLib_GetIcon(ICO_OPT_GROUP, 0)); + ImageList_ReplaceIcon(hImgLst, -1, Skin_GetIcon(ICO_OPT_GROUP, 0)); TreeView_SetImageList(hwndTree, hImgLst, TVSIL_NORMAL); for (i = 0; i < gTreeData.getCount(); ++i) { switch (gTreeData[i]->typ) { case 1: // Treeview part for typ 1 (notification) mir_snprintf(iconName, SIZEOF(iconName), "%s_%S_%S", MODULNAME, gTreeData[i]->pszTreeRoot, gTreeData[i]->pszDescription); - iconIndex = ImageList_ReplaceIcon(hImgLst, -1, IcoLib_GetIcon(iconName)); + iconIndex = ImageList_ReplaceIcon(hImgLst, -1, Skin_GetIcon(iconName)); mir_sntprintf(itemName, SIZEOF(itemName), _T("%s/%s"), gTreeData[i]->pszTreeRoot, gTreeData[i]->pszDescription); break; case 2: // Treeview part typ 2 (popup class api) @@ -223,7 +223,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l (WPARAM)Translate(statusButtons[i].title), 0); } // info icon - SendDlgItemMessage(hwnd, IDC_ICO_INFO, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_MISC_NOTIFY, 0), 0); + SendDlgItemMessage(hwnd, IDC_ICO_INFO, STM_SETICON, (WPARAM)Skin_GetIcon(ICO_MISC_NOTIFY, 0), 0); // more button EnableWindow(GetDlgItem(hwnd, IDC_MORE), FALSE); // preview button diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp index 31041c357a..e51aefe49e 100644 --- a/plugins/Popup/src/opt_contacts.cpp +++ b/plugins/Popup/src/opt_contacts.cpp @@ -35,7 +35,7 @@ static void sttSetAllContactIcons(HWND hwndList) DWORD dwMode = db_get_b(hContact, MODULNAME, "ShowMode", 0); for (int i = 0; i < 4 /*SIZEOF(sttIcons)*/; ++i) // hIml element [0] = SKINICON_OTHER_SMALLDOT - // hIml element [1..5] = IcoLib_GetIcon(....) ~ old sttIcons + // hIml element [1..5] = Skin_GetIcon(....) ~ old sttIcons SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, ((int)dwMode == i) ? i + 1 : 0)); } } @@ -46,17 +46,17 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) case WM_INITDIALOG: TranslateDialogDefault(hwnd); - SendDlgItemMessage(hwnd, IDC_ICO_AUTO, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_DEF, 0), 0); - SendDlgItemMessage(hwnd, IDC_ICO_FAVORITE, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_FAV, 0), 0); - SendDlgItemMessage(hwnd, IDC_ICO_FULLSCREEN, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_FULLSCREEN, 0), 0); - SendDlgItemMessage(hwnd, IDC_ICO_BLOCK, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_BLOCK, 0), 0); + SendDlgItemMessage(hwnd, IDC_ICO_AUTO, STM_SETICON, (WPARAM)Skin_GetIcon(ICO_OPT_DEF, 0), 0); + SendDlgItemMessage(hwnd, IDC_ICO_FAVORITE, STM_SETICON, (WPARAM)Skin_GetIcon(ICO_OPT_FAV, 0), 0); + SendDlgItemMessage(hwnd, IDC_ICO_FULLSCREEN, STM_SETICON, (WPARAM)Skin_GetIcon(ICO_OPT_FULLSCREEN, 0), 0); + SendDlgItemMessage(hwnd, IDC_ICO_BLOCK, STM_SETICON, (WPARAM)Skin_GetIcon(ICO_OPT_BLOCK, 0), 0); { HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 5, 5); ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT)); - ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_DEF, 0)); - ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FAV, 0)); - ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FULLSCREEN, 0)); - ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_BLOCK, 0)); + ImageList_AddIcon(hIml, Skin_GetIcon(ICO_OPT_DEF, 0)); + ImageList_AddIcon(hIml, Skin_GetIcon(ICO_OPT_FAV, 0)); + ImageList_AddIcon(hIml, Skin_GetIcon(ICO_OPT_FULLSCREEN, 0)); + ImageList_AddIcon(hIml, Skin_GetIcon(ICO_OPT_BLOCK, 0)); SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hIml); SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRACOLUMNS, 4 /*SIZEOF(sttIcons)*/, 0); sttResetListOptions(GetDlgItem(hwnd, IDC_LIST)); @@ -88,7 +88,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) if (iImage != EMPTY_EXTRA_ICON) { for (int i = 0; i < 4 /*SIZEOF(sttIcons)*/; ++i) // hIml element [0] = SKINICON_OTHER_SMALLDOT - // hIml element [1..5] = IcoLib_GetIcon(....) ~ old sttIcons + // hIml element [1..5] = Skin_GetIcon(....) ~ old sttIcons SendDlgItemMessage(hwnd, IDC_LIST, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, (i == nm->iColumn) ? i + 1 : 0)); } SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0); diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index 9d11296629..234216ca39 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -182,7 +182,7 @@ INT_PTR CALLBACK DlgProcPopupGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM HWND hCtrl = GetDlgItem(hwnd, IDC_CUSTOMPOS); SendMessage(hCtrl, BUTTONSETASFLATBTN, TRUE, 0); SendMessage(hCtrl, BUTTONADDTOOLTIP, (WPARAM)_T("Popup area"), BATF_TCHAR); - SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_RESIZE, 0)); + SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon(ICO_OPT_RESIZE, 0)); } // Spreading combobox { @@ -627,11 +627,11 @@ INT_PTR CALLBACK PositionBoxDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendDlgItemMessage(hwndDlg, IDOK, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage(hwndDlg, IDOK, BUTTONADDTOOLTIP, (WPARAM)_T("OK"), BATF_TCHAR); - SendDlgItemMessage(hwndDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_OK, 0)); + SendDlgItemMessage(hwndDlg, IDOK, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon(ICO_OPT_OK, 0)); SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONSETASFLATBTN, TRUE, 0); SendDlgItemMessage(hwndDlg, IDCANCEL, BUTTONADDTOOLTIP, (WPARAM)_T("Cancel"), BATF_TCHAR); - SendDlgItemMessage(hwndDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_CANCEL, 0)); + SendDlgItemMessage(hwndDlg, IDCANCEL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon(ICO_OPT_CANCEL, 0)); SetDlgItemInt(hwndDlg, IDC_TXT_TOP, PopupOptions.gapTop, FALSE); SetDlgItemInt(hwndDlg, IDC_TXT_BOTTOM, PopupOptions.gapBottom, FALSE); diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 52ac9b6ddc..041607951c 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -361,7 +361,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR // Skin List reload button SendDlgItemMessage(hwndDlg, IDC_BTN_RELOAD, BUTTONSETASFLATBTN, TRUE, 0); - SendDlgItemMessage(hwndDlg, IDC_BTN_RELOAD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIcon(ICO_OPT_RELOAD, 0)); + SendDlgItemMessage(hwndDlg, IDC_BTN_RELOAD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon(ICO_OPT_RELOAD, 0)); SendDlgItemMessage(hwndDlg, IDC_BTN_RELOAD, BUTTONADDTOOLTIP, (WPARAM)Translate("Refresh List"), 0); // Skin Option List @@ -544,7 +544,7 @@ static void BoxPreview_OnPaint(HWND hwnd, HDC mydc, int mode) HFONT hfnt = (HFONT)SelectObject(mydc, fonts.title); GetClientRect(hwnd, &rc); FillRect(mydc, &rc, hbr); - DrawIconEx(mydc, 10, (rc.bottom - rc.top - 16) / 2, IcoLib_GetIcon(ICO_POPUP_ON, 0), 16, 16, 0, hbr, DI_NORMAL); + DrawIconEx(mydc, 10, (rc.bottom - rc.top - 16) / 2, Skin_GetIcon(ICO_POPUP_ON, 0), 16, 16, 0, hbr, DI_NORMAL); SetBkMode(mydc, TRANSPARENT); GetClientRect(hwnd, &rc); rc.left += 30; // 10+16+4 -- icon diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 1dd02de909..e99ec235a0 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -578,7 +578,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && isIm && IsActionEnabled("General/Quick reply")) { m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION); - m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_REPLY, iconSize); + m_actions[iAction].actionA.lchIcon = Skin_GetIcon(ICO_ACT_REPLY, iconSize); mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Quick reply"); m_actions[iAction].actionA.wParam = 0; m_actions[iAction].actionA.lParam = ACT_DEF_REPLY; @@ -587,7 +587,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && isIm && IsActionEnabled("General/Send message")) { m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION); - m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_MESS, iconSize); + m_actions[iAction].actionA.lchIcon = Skin_GetIcon(ICO_ACT_MESS, iconSize); mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Send message"); m_actions[iAction].actionA.wParam = 0; m_actions[iAction].actionA.lParam = ACT_DEF_MESSAGE; @@ -596,7 +596,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && IsActionEnabled("General/User details")) { m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION); - m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_INFO, iconSize); + m_actions[iAction].actionA.lchIcon = Skin_GetIcon(ICO_ACT_INFO, iconSize); mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/User details"); m_actions[iAction].actionA.wParam = 0; m_actions[iAction].actionA.lParam = ACT_DEF_DETAILS; @@ -605,7 +605,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && IsActionEnabled("General/Contact menu")) { m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION); - m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_MENU, iconSize); + m_actions[iAction].actionA.lchIcon = Skin_GetIcon(ICO_ACT_MENU, iconSize); mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Contact menu"); m_actions[iAction].actionA.wParam = 0; m_actions[iAction].actionA.lParam = ACT_DEF_MENU; @@ -614,7 +614,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultUsr && db_get_b(m_hContact, "CList", "NotOnList", 0) && IsActionEnabled("General/Add permanently")) { m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION); - m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_ADD, iconSize); + m_actions[iAction].actionA.lchIcon = Skin_GetIcon(ICO_ACT_ADD, iconSize); mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Add permanently"); m_actions[iAction].actionA.wParam = 0; m_actions[iAction].actionA.lParam = ACT_DEF_ADD; @@ -623,7 +623,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultGen && (m_iTimeout != -1) && IsActionEnabled("General/Pin popup")) { m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION); - m_actions[iAction].actionA.lchIcon = m_bIsPinned ? IcoLib_GetIcon(ICO_ACT_PINNED, iconSize) : IcoLib_GetIcon(ICO_ACT_PIN, iconSize); + m_actions[iAction].actionA.lchIcon = m_bIsPinned ? Skin_GetIcon(ICO_ACT_PINNED, iconSize) : Skin_GetIcon(ICO_ACT_PIN, iconSize); mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Pin popup"); m_actions[iAction].actionA.wParam = 0; m_actions[iAction].actionA.lParam = ACT_DEF_PIN; @@ -632,7 +632,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultGen && IsActionEnabled("General/Dismiss popup")) { m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION); - m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_CLOSE, iconSize); + m_actions[iAction].actionA.lchIcon = Skin_GetIcon(ICO_ACT_CLOSE, iconSize); mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Dismiss popup"); m_actions[iAction].actionA.wParam = 0; m_actions[iAction].actionA.lParam = ACT_DEF_DISMISS; @@ -641,7 +641,7 @@ int PopupWnd2::fixActions(POPUPACTION *theActions, int count) if (enableDefaultGen && IsActionEnabled("General/Copy to clipboard")) { m_actions[iAction].actionA.cbSize = sizeof(POPUPACTION); - m_actions[iAction].actionA.lchIcon = IcoLib_GetIcon(ICO_ACT_COPY, iconSize); + m_actions[iAction].actionA.lchIcon = Skin_GetIcon(ICO_ACT_COPY, iconSize); mir_strcpy(m_actions[iAction].actionA.lpzTitle, "General/Copy to clipboard"); m_actions[iAction].actionA.wParam = 0; m_actions[iAction].actionA.lParam = ACT_DEF_COPY; @@ -988,7 +988,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara m_bIsPinned = !m_bIsPinned; { bool iconSize = PopupOptions.actions&ACT_LARGE ? TRUE : FALSE; - PUModifyActionIcon(m_hwnd, wParam, lParam, m_bIsPinned ? IcoLib_GetIcon(ICO_ACT_PINNED, iconSize) : IcoLib_GetIcon(ICO_ACT_PIN, iconSize)); + PUModifyActionIcon(m_hwnd, wParam, lParam, m_bIsPinned ? Skin_GetIcon(ICO_ACT_PINNED, iconSize) : Skin_GetIcon(ICO_ACT_PIN, iconSize)); } break; diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index b77c87a75a..c5da930c89 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -240,21 +240,21 @@ INT_PTR Popup_ShowMessageW(WPARAM wParam, LPARAM lParam) ppd2.lptzText = (TCHAR*)wParam; switch (lParam & 0x7fffffff) { case SM_ERROR: - ppd2.lchIcon = IcoLib_GetIcon(ICO_MISC_ERROR, 0); + ppd2.lchIcon = Skin_GetIcon(ICO_MISC_ERROR, 0); ppd2.colorBack = RGB(191, 0, 0); ppd2.colorText = RGB(255, 245, 225); ppd2.lchNotification = g_hntfError; ppd2.lptzTitle = TranslateT("Error"); break; case SM_WARNING: - ppd2.lchIcon = IcoLib_GetIcon(ICO_MISC_WARNING, 0); + ppd2.lchIcon = Skin_GetIcon(ICO_MISC_WARNING, 0); ppd2.colorBack = RGB(210, 210, 150); ppd2.colorText = RGB(0, 0, 0); ppd2.lchNotification = g_hntfWarning; ppd2.lptzTitle = TranslateT("Warning"); break; case SM_NOTIFY: - ppd2.lchIcon = IcoLib_GetIcon(ICO_MISC_NOTIFY, 0); + ppd2.lchIcon = Skin_GetIcon(ICO_MISC_NOTIFY, 0); ppd2.colorBack = RGB(230, 230, 230); ppd2.colorText = RGB(0, 0, 0); ppd2.lchNotification = g_hntfNotification; diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index c8b0c7289f..00c2451c84 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -109,22 +109,22 @@ void SrmmMenu_Load() sid.dwId = 0; sid.szTooltip = LPGEN("Popup Mode: Auto"); - sid.hIcon = sid.hIconDisabled = IcoLib_GetIcon(ICO_POPUP_ON, 0); + sid.hIcon = sid.hIconDisabled = Skin_GetIcon(ICO_POPUP_ON, 0); Srmm_AddIcon(&sid); sid.dwId = 1; sid.szTooltip = LPGEN("Popup Mode: Favorite"); - sid.hIcon = sid.hIconDisabled = IcoLib_GetIcon(ICO_FAV, 0); + sid.hIcon = sid.hIconDisabled = Skin_GetIcon(ICO_FAV, 0); Srmm_AddIcon(&sid); sid.dwId = 2; sid.szTooltip = LPGEN("Popup Mode: Ignore fullscreen"); - sid.hIcon = sid.hIconDisabled = IcoLib_GetIcon(ICO_FULLSCREEN, 0); + sid.hIcon = sid.hIconDisabled = Skin_GetIcon(ICO_FULLSCREEN, 0); Srmm_AddIcon(&sid); sid.dwId = 3; sid.szTooltip = LPGEN("Popup Mode: Block contact"); - sid.hIcon = sid.hIconDisabled = IcoLib_GetIcon(ICO_POPUP_OFF, 0); + sid.hIcon = sid.hIconDisabled = Skin_GetIcon(ICO_POPUP_OFF, 0); Srmm_AddIcon(&sid); HookEvent(ME_MSG_ICONPRESSED, SrmmMenu_ProcessIconClick); diff --git a/plugins/TabSRMM/res/resource.rc b/plugins/TabSRMM/res/resource.rc index d33d32ea4c..57c50a8670 100644 --- a/plugins/TabSRMM/res/resource.rc +++ b/plugins/TabSRMM/res/resource.rc @@ -693,9 +693,9 @@ END // Cursor // -IDC_HYPERLINKHAND CURSOR "..\\..\\..\\src\\res\\cursor_hyperlink.cur" -IDC_DROP CURSOR "..\\..\\..\\src\\res\\cursor_drag_copy.cur" -IDC_DROPUSER CURSOR "..\\..\\..\\src\\res\\cursor_drop_user.cur" +IDC_HYPERLINKHAND CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_hyperlink.cur" +IDC_DROP CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drag_copy.cur" +IDC_DROPUSER CURSOR "..\\..\\..\\src\\mir_app\\res\\cursor_drop_user.cur" ///////////////////////////////////////////////////////////////////////////// // diff --git a/plugins/TopToolBar/res/main.rc b/plugins/TopToolBar/res/main.rc index 5f2191cc3f..1344c89e5c 100644 --- a/plugins/TopToolBar/res/main.rc +++ b/plugins/TopToolBar/res/main.rc @@ -128,8 +128,8 @@ IDI_GROUPSOFF ICON "Groups On_Off_UP.ico" IDI_GROUPSON ICON "Groups On_Off_DN.ico" IDI_SOUNDSOFF ICON "Sounds Enable_Disable_DN.ico" IDI_SOUNDSON ICON "Sounds Enable_Disable_UP.ico" -IDI_METAON ICON "..\\..\\..\\src\\res\\meta_menu.ico" -IDI_METAOFF ICON "..\\..\\..\\src\\res\\meta_menuof.ico" +IDI_METAON ICON "..\\..\\..\\src\\mir_app\\res\\meta_menu.ico" +IDI_METAOFF ICON "..\\..\\..\\src\\mir_app\\res\\meta_menuof.ico" #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp index 6d85de3475..45670de8a2 100644 --- a/plugins/UserInfoEx/src/ctrl_button.cpp +++ b/plugins/UserInfoEx/src/ctrl_button.cpp @@ -504,7 +504,7 @@ static LRESULT CALLBACK Button_WndProc(HWND hwndBtn, UINT uMsg, WPARAM wParam, L if (wParam) { mir_cslock lck(csTips); if (!hwndToolTips) - hwndToolTips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL); + hwndToolTips = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP, 0, 0, 0, 0, NULL, NULL, GetModuleHandleA("mir_app.dll"), NULL); if (lParam == MBBF_UNICODE) { TOOLINFOW ti; diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index 4bd3fad8f2..7093d5770f 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -61,7 +61,7 @@ static void InitAlteredPlacesBar() dwFolderID = 17; RegSetValueEx(hkPlacesBar, _T("Place2"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD)); // Miranda's installation path - GetModuleFileNameA(GetModuleHandle(NULL), szMirandaPath, SIZEOF(szMirandaPath)); + GetModuleFileNameA(GetModuleHandleA("mir_app.dll"), szMirandaPath, SIZEOF(szMirandaPath)); p = mir_strrchr(szMirandaPath, '\\'); if (p) { -- cgit v1.2.3