summaryrefslogtreecommitdiff
path: root/plugins/CountryFlags/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-21 14:34:07 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-21 14:34:07 +0300
commitc9b740a178828eae5cc4be7ab054e5f26d3a27e7 (patch)
treee15ce76cb41feb3375a76c95d861294b899bfe48 /plugins/CountryFlags/src
parent6024e32d70da7a7c703de51e30b6c6407df8a745 (diff)
MessageWindowEventData: useless structure removed
Diffstat (limited to 'plugins/CountryFlags/src')
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index 54e32b3c75..e3a8918d12 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -96,22 +96,23 @@ static void __fastcall SetStatusIcon(MCONTACT hContact, int countryNumber)
Srmm_SetIconFlags(hContact, MODULENAME, 0, MBF_HIDDEN);
}
-static int MsgWndEvent(WPARAM, LPARAM lParam)
+static int MsgWndEvent(WPARAM uType, LPARAM lParam)
{
- MessageWindowEventData *msgwe = (MessageWindowEventData*)lParam;
- switch (msgwe->uType) {
+ auto *pDlg = (CSrmmBaseDialog *)lParam;
+
+ switch (uType) {
case MSG_WINDOW_EVT_OPENING:
case MSG_WINDOW_EVT_CLOSE:
if (bShowStatusIcon) {
- int countryNumber = ServiceDetectContactOriginCountry((WPARAM)msgwe->hContact, 0);
- if (msgwe->uType == MSG_WINDOW_EVT_OPENING && countryNumber != 0xFFFF)
- SetStatusIcon(msgwe->hContact, countryNumber);
+ int countryNumber = ServiceDetectContactOriginCountry(pDlg->m_hContact, 0);
+ if (uType == MSG_WINDOW_EVT_OPENING && countryNumber != 0xFFFF)
+ SetStatusIcon(pDlg->m_hContact, countryNumber);
else
- Srmm_SetIconFlags(msgwe->hContact, MODULENAME, 0, MBF_HIDDEN);
+ Srmm_SetIconFlags(pDlg->m_hContact, MODULENAME, 0, MBF_HIDDEN);
}
// ensure it is hidden, RemoveStatusIcons() only enums currently opened ones
else
- Srmm_SetIconFlags(msgwe->hContact, MODULENAME, 0, MBF_HIDDEN);
+ Srmm_SetIconFlags(pDlg->m_hContact, MODULENAME, 0, MBF_HIDDEN);
}
return 0;
}