summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-06-19 13:50:44 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-06-19 13:50:44 +0300
commita6bb80933c2984cf9a703e6dae6f1f18851c19b6 (patch)
tree2444742cfa248bd4c8edb382d7ee4fe64e99bca4
parent185ebd42c6f6364a615d8fe09d060c713ec10b46 (diff)
UM_FindUserFromIndex: another major useless crutch died
-rw-r--r--include/m_chat_int.h1
-rw-r--r--include/m_srmm_int.h2
-rw-r--r--libs/win32/mir_app.libbin262034 -> 262034 bytes
-rw-r--r--libs/win64/mir_app.libbin261036 -> 261036 bytes
-rw-r--r--plugins/Scriver/src/msgdialog.cpp15
-rw-r--r--plugins/Scriver/src/msgs.h1
-rw-r--r--plugins/Scriver/src/msgutils.cpp19
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp4
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp9
-rw-r--r--plugins/TabSRMM/src/msgs.h1
-rw-r--r--src/core/stdmsg/src/chat_window.cpp9
-rw-r--r--src/core/stdmsg/src/msgs.h1
-rw-r--r--src/mir_app/src/chat.h1
-rw-r--r--src/mir_app/src/chat_manager.cpp15
-rw-r--r--src/mir_app/src/mir_app.def2
-rw-r--r--src/mir_app/src/mir_app64.def2
-rw-r--r--src/mir_app/src/srmm_base.cpp47
17 files changed, 43 insertions, 86 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index d4856bc774..042eda91e6 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -284,7 +284,6 @@ struct CHAT_MANAGER
int (*UM_CompareItem)(const USERINFO *u1, const USERINFO *u2);
USERINFO* (*UM_AddUser)(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, uint16_t wStatus);
USERINFO* (*UM_FindUser)(SESSION_INFO *si, const wchar_t *pszUID);
- USERINFO* (*UM_FindUserFromIndex)(SESSION_INFO *si, int index);
USERINFO* (*UM_GiveStatus)(SESSION_INFO *si, const wchar_t *pszUID, uint16_t status);
USERINFO* (*UM_SetContactStatus)(SESSION_INFO *si, const wchar_t *pszUID, uint16_t status);
USERINFO* (*UM_TakeStatus)(SESSION_INFO *si, const wchar_t *pszUID, uint16_t status);
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h
index 283e9f69b7..6fe11774e2 100644
--- a/include/m_srmm_int.h
+++ b/include/m_srmm_int.h
@@ -294,6 +294,7 @@ public:
void ClearLog();
void RedrawLog();
void ShowColorChooser(int iCtrlId);
+ void UpdateNickList(void);
virtual void AddLog(const LOGINFO &lin);
virtual void CloseTab() {}
@@ -305,7 +306,6 @@ public:
virtual void SetStatusText(const wchar_t *, HICON) {}
virtual void ShowFilterMenu() {}
virtual void UpdateFilterButton();
- virtual void UpdateNickList() {}
virtual void UpdateOptions();
virtual void UpdateStatusBar() {}
virtual void UpdateTitle() PURE;
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index ab50fd28ce..db0b17d5af 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index f275ed81a5..063c6c6e23 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index ba50c46a25..4188ef3b2c 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -870,15 +870,6 @@ LRESULT CMsgDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
break;
case WM_KEYDOWN:
- if (wParam == VK_RETURN) {
- int index = m_nickList.SendMsg(LB_GETCURSEL, 0, 0);
- if (index != LB_ERR) {
- USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, index);
- Chat_DoEventHook(m_si, GC_USER_PRIVMESS, ui, nullptr, 0);
- }
- break;
- }
-
if (wParam == VK_ESCAPE || wParam == VK_UP || wParam == VK_DOWN || wParam == VK_NEXT || wParam == VK_PRIOR || wParam == VK_TAB || wParam == VK_HOME || wParam == VK_END)
m_wszSearch[0] = 0;
break;
@@ -910,11 +901,11 @@ LRESULT CMsgDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
if (m_wszSearch[0]) {
// iterate over the (sorted) list of nicknames and search for the
// string we have
- int iItems = m_nickList.SendMsg(LB_GETCOUNT, 0, 0);
+ int iItems = m_nickList.GetCount();
for (int i = 0; i < iItems; i++) {
- if (USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, i)) {
+ if (auto *ui = (USERINFO*)m_nickList.GetItemData(i)) {
if (!wcsnicmp(ui->pszNick, m_wszSearch, mir_wstrlen(m_wszSearch))) {
- m_nickList.SendMsg(LB_SETCURSEL, i, 0);
+ m_nickList.SetCurSel(i);
InvalidateRect(m_nickList.GetHwnd(), nullptr, FALSE);
return 0;
}
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 36b036f77c..e2b200c13f 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -137,7 +137,6 @@ public:
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
void UpdateFilterButton() override;
- void UpdateNickList() override;
void UpdateOptions() override;
void UpdateStatusBar() override;
void UpdateTitle() override;
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index c0ed8bca78..c6d9b8589e 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -574,25 +574,6 @@ void CMsgDialog::UpdateFilterButton()
m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST2 : IDI_NICKLIST));
}
-void CMsgDialog::UpdateNickList()
-{
- m_nickList.SetDraw(false);
- m_nickList.ResetContent();
- for (auto &ui : m_si->getUserList()) {
- char szIndicator = SM_GetStatusIndicator(m_si, ui);
- if (szIndicator > '\0') {
- wchar_t ptszBuf[128];
- mir_snwprintf(ptszBuf, L"%c%s", szIndicator, ui->pszNick);
- m_nickList.AddString(ptszBuf);
- }
- else m_nickList.AddString(ui->pszNick);
- }
- m_nickList.SetDraw(true);
- InvalidateRect(m_nickList.GetHwnd(), nullptr, FALSE);
- UpdateWindow(m_nickList.GetHwnd());
- UpdateTitle();
-}
-
void CMsgDialog::UpdateOptions()
{
GetAvatar();
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index e4979c0b79..a93a455a2a 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -993,7 +993,7 @@ void CMsgDialog::onDblClick_List(CCtrlListBox *pList)
ScreenToClient(pList->GetHwnd(), &hti.pt);
int item = LOWORD(pList->SendMsg(LB_ITEMFROMPOINT, 0, MAKELPARAM(hti.pt.x, hti.pt.y)));
- USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, item);
+ auto *ui = (USERINFO *)pList->GetItemData(item);
if (ui == nullptr)
return;
@@ -2017,7 +2017,7 @@ LRESULT CMsgDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam)
// string we have
int i, iItems = m_nickList.SendMsg(LB_GETCOUNT, 0, 0);
for (i = 0; i < iItems; i++) {
- if (USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, i)) {
+ if (auto *ui = (USERINFO *)m_nickList.GetItemData(i)) {
if (!wcsnicmp(ui->pszNick, m_wszSearch, mir_wstrlen(m_wszSearch))) {
m_nickList.SendMsg(LB_SETSEL, FALSE, -1);
m_nickList.SendMsg(LB_SETSEL, TRUE, i);
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index cabaad93fc..4b7e2e23ea 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -2573,15 +2573,6 @@ void CMsgDialog::UpdateFilterButton()
m_btnFilter.SendMsg(BUTTONSETOVERLAYICON, (LPARAM)(m_bFilterEnabled ? PluginConfig.g_iconOverlayDisabled : PluginConfig.g_iconOverlayEnabled), 0);
}
-void CMsgDialog::UpdateNickList()
-{
- int i = m_nickList.SendMsg(LB_GETTOPINDEX, 0, 0);
- m_nickList.SendMsg(LB_SETCOUNT, m_si->getUserList().getCount(), 0);
- m_nickList.SendMsg(LB_SETTOPINDEX, i, 0);
- UpdateTitle();
- m_hTabIcon = m_hTabStatusIcon;
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
void CMsgDialog::UpdateOptions()
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index b0104e83b6..9d8c96b839 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -602,7 +602,6 @@ public:
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
void UpdateFilterButton() override;
- void UpdateNickList() override;
void UpdateOptions() override;
void UpdateStatusBar() override;
void UpdateTitle() override;
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index c78e3d1d0e..5513da517d 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -50,15 +50,6 @@ void CMsgDialog::UpdateFilterButton()
m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST : IDI_NICKLIST2, FALSE));
}
-void CMsgDialog::UpdateNickList()
-{
- int i = m_nickList.SendMsg(LB_GETTOPINDEX, 0, 0);
- m_nickList.SendMsg(LB_SETCOUNT, m_si->getUserList().getCount(), 0);
- m_nickList.SendMsg(LB_SETTOPINDEX, i, 0);
-
- UpdateTitle();
-}
-
void CMsgDialog::UpdateOptions()
{
UpdateFilterButton();
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h
index edad576c2e..79140be1b0 100644
--- a/src/core/stdmsg/src/msgs.h
+++ b/src/core/stdmsg/src/msgs.h
@@ -146,7 +146,6 @@ public:
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
void UpdateFilterButton() override;
- void UpdateNickList() override;
void UpdateOptions() override;
void UpdateStatusBar() override;
void UpdateTitle() override;
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index 1c50e3ac4a..d1082c802e 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -87,7 +87,6 @@ STATUSINFO* TM_AddStatus(STATUSINFO **ppStatusList, const wchar_t *pszStatus,
uint16_t TM_StringToWord(STATUSINFO *pStatusList, const wchar_t *pszStatus);
USERINFO* UM_AddUser(SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszNick, uint16_t wStatus);
-USERINFO* UM_FindUserFromIndex(SESSION_INFO *si, int index);
BOOL UM_RemoveAll(SESSION_INFO *si);
BOOL UM_SetStatusEx(SESSION_INFO *si, const wchar_t* pszText, int flags);
void UM_SortKeys(SESSION_INFO *si);
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index f8ceb299cf..0474d942bb 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -651,20 +651,6 @@ static int UM_CompareItem(const USERINFO *u1, const USERINFO *u2)
return mir_wstrcmpi(u1->pszNick, u2->pszNick);
}
-USERINFO* UM_FindUserFromIndex(SESSION_INFO *si, int index)
-{
- if (!si)
- return nullptr;
-
- int i = 0;
- for (auto &ui : si->getUserList()) {
- if (i == index)
- return ui;
- i++;
- }
- return nullptr;
-}
-
static USERINFO* UM_GiveStatus(SESSION_INFO *si, const wchar_t *pszUID, uint16_t status)
{
USERINFO *ui = UM_FindUser(si, pszUID);
@@ -794,7 +780,6 @@ static void ResetApi()
g_chatApi.UM_AddUser = ::UM_AddUser;
g_chatApi.UM_CompareItem = ::UM_CompareItem;
g_chatApi.UM_FindUser = ::UM_FindUser;
- g_chatApi.UM_FindUserFromIndex = ::UM_FindUserFromIndex;
g_chatApi.UM_GiveStatus = ::UM_GiveStatus;
g_chatApi.UM_SetContactStatus = ::UM_SetContactStatus;
g_chatApi.UM_TakeStatus = ::UM_TakeStatus;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 0f02928081..161aad88ce 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -327,7 +327,7 @@ Chat_UpdateOptions @418 NONAME
?ShowFilterMenu@CSrmmBaseDialog@@UAEXXZ @422 NONAME
?OnInitDialog@CSrmmBaseDialog@@MAE_NXZ @423 NONAME
?AddLog@CSrmmBaseDialog@@UAEXABULOGINFO@@@Z @425 NONAME
-?UpdateNickList@CSrmmBaseDialog@@UAEXXZ @428 NONAME
+?UpdateNickList@CSrmmBaseDialog@@QAEXXZ @426 NONAME
?onClick_BIU@CSrmmBaseDialog@@IAEXPAVCCtrlButton@@@Z @430 NONAME
?onClick_BkColor@CSrmmBaseDialog@@IAEXPAVCCtrlButton@@@Z @431 NONAME
?onClick_Color@CSrmmBaseDialog@@IAEXPAVCCtrlButton@@@Z @432 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 9fe2e92c6a..55a7147c2c 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -327,7 +327,7 @@ Chat_UpdateOptions @418 NONAME
?ShowFilterMenu@CSrmmBaseDialog@@UEAAXXZ @422 NONAME
?OnInitDialog@CSrmmBaseDialog@@MEAA_NXZ @423 NONAME
?AddLog@CSrmmBaseDialog@@UEAAXAEBULOGINFO@@@Z @425 NONAME
-?UpdateNickList@CSrmmBaseDialog@@UEAAXXZ @428 NONAME
+?UpdateNickList@CSrmmBaseDialog@@QEAAXXZ @426 NONAME
?onClick_BIU@CSrmmBaseDialog@@IEAAXPEAVCCtrlButton@@@Z @430 NONAME
?onClick_BkColor@CSrmmBaseDialog@@IEAAXPEAVCCtrlButton@@@Z @431 NONAME
?onClick_Color@CSrmmBaseDialog@@IEAAXPEAVCCtrlButton@@@Z @432 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 99eea7065d..e2a0912349 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -239,7 +239,7 @@ LRESULT CSrmmBaseDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
// process mouse - hovering for the nickname list.fires events so the protocol can
// show the userinfo - tooltip.
-static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *parentdat)
+static void ProcessNickListHovering(const CCtrlListBox &listBox, int hoveredItem, SESSION_INFO *parentdat)
{
static int currentHovered = -1;
static HWND hwndToolTip = nullptr;
@@ -250,6 +250,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *pa
currentHovered = hoveredItem;
+ MWindow hwnd = listBox.GetHwnd();
if (oldParent != hwnd && hwndToolTip) {
SendMessage(hwndToolTip, TTM_DELTOOL, 0, 0);
DestroyWindow(hwndToolTip);
@@ -281,9 +282,7 @@ static void ProcessNickListHovering(HWND hwnd, int hoveredItem, SESSION_INFO *pa
ti.rect = clientRect;
CMStringW wszBuf;
-
- USERINFO *ui1 = g_chatApi.UM_FindUserFromIndex(parentdat, currentHovered);
- if (ui1) {
+ if (auto *ui1 = (USERINFO *)listBox.GetItemData(currentHovered)) {
if (ProtoServiceExists(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) {
wchar_t *p = (wchar_t*)CallProtoService(parentdat->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)parentdat->ptszID, (LPARAM)ui1->pszUID);
if (p != nullptr) {
@@ -323,8 +322,7 @@ static void CALLBACK ChatTimerProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD)
return;
}
- USERINFO *ui1 = g_chatApi.UM_FindUserFromIndex(si, si->currentHovered);
- if (ui1) {
+ if (auto *ui1 = (USERINFO *)SendMessage(hwnd, LB_GETITEMDATA, 0, 0)) {
CMStringW wszBuf;
if (ProtoServiceExists(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT)) {
wchar_t *p = (wchar_t*)CallProtoService(si->pszModule, MS_GC_PROTO_GETTOOLTIPTEXT, (WPARAM)si->ptszID, (LPARAM)ui1->pszUID);
@@ -406,7 +404,7 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam
if (nItemUnderMouse != -1)
SetTimer(m_nickList.GetHwnd(), (UINT_PTR)m_si, 450, ChatTimerProc);
}
- else ProcessNickListHovering(m_nickList.GetHwnd(), (int)nItemUnderMouse, m_si);
+ else ProcessNickListHovering(m_nickList, (int)nItemUnderMouse, m_si);
}
else {
if (bTooltipExists) {
@@ -416,7 +414,7 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam
m_si->bHasToolTip = false;
}
}
- else ProcessNickListHovering(m_nickList.GetHwnd(), -1, nullptr);
+ else ProcessNickListHovering(m_nickList, -1, nullptr);
}
}
break;
@@ -466,7 +464,7 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam
if (HIWORD(item) != 0) // clicked outside the client area
break;
- if (USERINFO *ui = g_chatApi.UM_FindUserFromIndex(m_si, item)) {
+ if (auto *ui = (USERINFO *)m_nickList.GetItemData(item)) {
if (pt.x == -1 && pt.y == -1)
pt.y += height - 4;
ClientToScreen(m_nickList.GetHwnd(), &pt);
@@ -476,6 +474,15 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam
}
}
break;
+
+ case WM_KEYDOWN:
+ if (wParam == VK_RETURN) {
+ int index = m_nickList.GetCurSel();
+ if (index != LB_ERR)
+ if (auto *ui = (USERINFO *)m_nickList.GetItemData(index))
+ Chat_DoEventHook(m_si, GC_USER_PRIVMESS, ui, nullptr, 0);
+ }
+ break;
}
return mir_callNextSubclass(m_nickList.GetHwnd(), stubNicklistProc, msg, wParam, lParam);
@@ -557,8 +564,7 @@ INT_PTR CSrmmBaseDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT *)lParam;
if (dis->CtlID == IDC_SRMM_NICKLIST) {
- USERINFO *ui = UM_FindUserFromIndex(m_si, dis->itemID);
- if (ui != nullptr)
+ if (auto *ui = (USERINFO *)m_nickList.GetItemData(dis->itemID))
DrawNickList(ui, dis);
return TRUE;
}
@@ -669,6 +675,23 @@ void CSrmmBaseDialog::UpdateFilterButton()
m_btnFilter.SendMsg(BUTTONADDTOOLTIP, (WPARAM)(m_bFilterEnabled ? TranslateT("Disable the event filter (Ctrl+F)") : TranslateT("Enable the event filter (Ctrl+F)")), BATF_UNICODE);
}
+void CSrmmBaseDialog::UpdateNickList()
+{
+ int idx = m_nickList.SendMsg(LB_GETTOPINDEX, 0, 0);
+
+ m_nickList.SetDraw(false);
+ m_nickList.ResetContent();
+ for (auto &ui : m_si->getUserList())
+ m_nickList.AddString(ui->pszNick, LPARAM(ui));
+
+ m_nickList.SendMsg(LB_SETTOPINDEX, idx, 0);
+ m_nickList.SetDraw(true);
+ InvalidateRect(m_nickList.GetHwnd(), nullptr, FALSE);
+ UpdateWindow(m_nickList.GetHwnd());
+
+ UpdateTitle();
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
void CSrmmBaseDialog::onClick_Color(CCtrlButton *pButton)
@@ -761,7 +784,7 @@ void CSrmmBaseDialog::onDblClick_List(CCtrlListBox *pList)
ScreenToClient(pList->GetHwnd(), &hti.pt);
int item = LOWORD(pList->SendMsg(LB_ITEMFROMPOINT, 0, MAKELPARAM(hti.pt.x, hti.pt.y)));
- USERINFO *ui = UM_FindUserFromIndex(m_si, item);
+ auto *ui = (USERINFO *)m_nickList.GetItemData(item);
if (ui == nullptr)
return;