diff options
author | George Hazan <ghazan@miranda.im> | 2022-08-04 17:52:34 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-08-04 17:52:34 +0300 |
commit | 3de995f6736e1869fedbff7d14c210df0b9b20a9 (patch) | |
tree | 659c27f242e1e0bca78013849f195564e6ab145b /src/core | |
parent | 4cb450857e40d6c61f1346801c40374e7f1b0d10 (diff) |
custom icons for UserInfo (AVS, SeenPlugin)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stduserinfo/src/contactinfo.cpp | 2 | ||||
-rw-r--r-- | src/core/stduserinfo/src/stdinfo.cpp | 8 | ||||
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index 165c6ba214..8447a39024 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -570,6 +570,6 @@ void InitContactInfo(WPARAM wParam, USERINFOPAGE &uip) {
uip.pDialog = new CContactPage();
uip.szTitle.a = LPGEN("Contact");
- uip.dwInitParam = IDI_CONTACT;
+ uip.dwInitParam = (INT_PTR)g_plugin.getIconHandle(IDI_CONTACT);
g_plugin.addUserInfo(wParam, &uip);
}
diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index cea7d02464..9b7f624307 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -467,19 +467,19 @@ int DetailsInit(WPARAM wParam, LPARAM lParam) uip.pDialog = new CSummaryDlg();
uip.szGroup.a = LPGEN("General");
uip.szTitle.a = LPGEN("Summary");
- uip.dwInitParam = IDI_SUMMARY;
+ uip.dwInitParam = (INT_PTR)g_plugin.getIconHandle(IDI_SUMMARY);
g_plugin.addUserInfo(wParam, &uip);
InitContactInfo(wParam, uip);
uip.pDialog = new CLocationDlg();
uip.szTitle.a = LPGEN("Location");
- uip.dwInitParam = IDI_LOCATION;
+ uip.dwInitParam = (INT_PTR)g_plugin.getIconHandle(IDI_LOCATION);
g_plugin.addUserInfo(wParam, &uip);
uip.pDialog = new CWorkDlg();
uip.szTitle.a = LPGEN("Work");
- uip.dwInitParam = IDI_WORK;
+ uip.dwInitParam = (INT_PTR)g_plugin.getIconHandle(IDI_WORK);
g_plugin.addUserInfo(wParam, &uip);
uip.pDialog = new CBackgroundDlg();
@@ -489,7 +489,7 @@ int DetailsInit(WPARAM wParam, LPARAM lParam) uip.pDialog = new CNotesDlg();
uip.szTitle.a = LPGEN("Notes");
- uip.dwInitParam = IDI_NOTES;
+ uip.dwInitParam = (INT_PTR)g_plugin.getIconHandle(IDI_NOTES);
g_plugin.addUserInfo(wParam, &uip);
return 0;
}
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 82b0cc3ae3..0d24f785b6 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -158,9 +158,11 @@ class CUserInfoDlg : public CDlgBase int iImage = 1;
if ((it->dwFlags & ODPF_ICON) && it->lParam) {
- HICON hIcon = g_plugin.getIcon(it->lParam);
- if (hIcon)
+ HICON hIcon = IcoLib_GetIconByHandle((HANDLE)it->lParam);
+ if (hIcon) {
iImage = ImageList_AddIcon(m_imageList, hIcon);
+ IcoLib_ReleaseIcon(hIcon);
+ }
}
TVINSERTSTRUCT tvis;
|