From 1e49d6b2cb3812d8e80051cbb3d44891e6532825 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 28 Mar 2017 14:55:06 +0300 Subject: funny, but without cbSize we have no need in MessageWindowInputData at all --- plugins/CountryFlags/src/extraimg.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'plugins/CountryFlags/src') diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 0683405bb6..9cf69d9fed 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -135,20 +135,18 @@ static int MsgWndEvent(WPARAM, LPARAM lParam) void CALLBACK UpdateStatusIcons(LPARAM) { - MessageWindowInputData msgwi = { sizeof(msgwi) }; - msgwi.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; - msgwi.hContact = db_find_first(); - while (msgwi.hContact != NULL) { + MCONTACT hContact = db_find_first(); + while (hContact != NULL) { /* is a message window opened for this contact? */ MessageWindowData msgw; /* output */ - if (!CallService(MS_MSG_GETWINDOWDATA,(WPARAM)&msgwi,(LPARAM)&msgw) && msgw.uState & MSG_WINDOW_STATE_EXISTS) { + if (!CallService(MS_MSG_GETWINDOWDATA, hContact, (LPARAM)&msgw) && msgw.uState & MSG_WINDOW_STATE_EXISTS) { if (bShowStatusIcon) { - int countryNumber = ServiceDetectContactOriginCountry((WPARAM)msgwi.hContact, 0); - SetStatusIcon(msgwi.hContact, countryNumber); + int countryNumber = ServiceDetectContactOriginCountry(hContact, 0); + SetStatusIcon(hContact, countryNumber); } - else UnsetStatusIcon(msgwi.hContact); + else UnsetStatusIcon(hContact); } - msgwi.hContact = db_find_next(msgw.hContact); + hContact = db_find_next(hContact); } } -- cgit v1.2.3