From f9c9f7a27456f98ac84f27add1c2aea5bd99a35c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:42:33 +0000 Subject: more HCONTACT git-svn-id: http://svn.miranda-ng.org/main/trunk@8079 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AvatarHistory/src/popup.cpp | 2 +- plugins/BasicHistory/src/EventList.cpp | 12 +++++----- plugins/BasicHistory/src/EventList.h | 2 +- plugins/BasicHistory/src/HistoryWindow.cpp | 38 +++++++++++++++--------------- plugins/BasicHistory/src/HistoryWindow.h | 6 ++--- plugins/BasicHistory/src/Options.cpp | 10 ++++---- plugins/BasicHistory/src/Scheduler.cpp | 4 ++-- plugins/BasicHistory/src/SearchContext.h | 2 +- plugins/BasicHistory/src/Searcher.h | 2 +- plugins/BuddyPounce/src/dialog.cpp | 2 +- plugins/FingerprintNG/src/fingerprint.cpp | 4 ++-- plugins/MirFox/src/MirandaUtils.cpp | 3 +-- plugins/MirFox/src/MirfoxData.cpp | 4 ++-- plugins/MirFox/src/MirfoxData.h | 4 ++-- plugins/New_GPG/src/init.cpp | 2 +- plugins/New_GPG/src/main.h | 2 +- plugins/New_GPG/src/messages.cpp | 2 -- plugins/New_GPG/src/metacontacts.cpp | 2 +- plugins/New_GPG/src/options.cpp | 3 --- plugins/New_GPG/src/utilities.cpp | 2 +- plugins/NewsAggregator/Src/Services.cpp | 2 +- plugins/Weather/src/weather_mwin.cpp | 4 ++-- plugins/WebView/src/webview.cpp | 18 +++++++------- plugins/WebView/src/webview_alerts.cpp | 8 +++---- plugins/YahooGroups/src/utils.cpp | 10 ++++---- plugins/YahooGroups/src/utils.h | 12 +++++----- plugins/wbOSD/src/events.cpp | 4 ++-- 27 files changed, 80 insertions(+), 86 deletions(-) (limited to 'plugins') diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp index 34a39ec6c7..ed36550961 100644 --- a/plugins/AvatarHistory/src/popup.cpp +++ b/plugins/AvatarHistory/src/popup.cpp @@ -70,7 +70,7 @@ void ShowTestPopup(HCONTACT hContact,const TCHAR *title, const TCHAR *descriptio void ShowPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description) { - ShowPopupEx(hContact, title, description, hContact, POPUP_TYPE_NORMAL, &opts); + ShowPopupEx(hContact, title, description, (void*)hContact, POPUP_TYPE_NORMAL, &opts); } void ShowDebugPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description) diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 044b32e3e5..e354353c89 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -237,7 +237,7 @@ void EventList::RefreshEventList() std::vector messages; EnterCriticalSection(&criticalSection); - std::map::iterator it = contactFileMap.find(hContact); + std::map::iterator it = contactFileMap.find(hContact); if (it != contactFileMap.end()) { ExportManager imp(hWnd, hContact, 1); imp.SetAutoImport(it->second.file); @@ -307,7 +307,7 @@ bool EventList::SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInt std::vector messages; EnterCriticalSection(&criticalSection); - std::map::iterator it = contactFileMap.find(hContact); + std::map::iterator it = contactFileMap.find(hContact); if (it != contactFileMap.end()) { ExportManager imp(hWnd, hContact, 1); imp.SetAutoImport(it->second.file); @@ -640,7 +640,7 @@ void EventList::RebuildGroup(int selected) } CRITICAL_SECTION EventList::criticalSection; -std::map EventList::contactFileMap; +std::map EventList::contactFileMap; std::wstring EventList::contactFileDir; void EventList::AddImporter(HCONTACT hContact, IImport::ImportType type, const std::wstring& file) @@ -677,7 +677,7 @@ int EventList::GetContactMessageNumber(HCONTACT hContact) { int count = db_event_count(hContact); EnterCriticalSection(&criticalSection); - std::map::iterator it = contactFileMap.find(hContact); + std::map::iterator it = contactFileMap.find(hContact); if (it != contactFileMap.end()) ++count; @@ -689,7 +689,7 @@ bool EventList::IsImportedHistory(HCONTACT hContact) { bool count = false; EnterCriticalSection(&criticalSection); - std::map::iterator it = contactFileMap.find(hContact); + std::map::iterator it = contactFileMap.find(hContact); if (it != contactFileMap.end()) count = true; @@ -700,7 +700,7 @@ bool EventList::IsImportedHistory(HCONTACT hContact) void EventList::DeleteImporter(HCONTACT hContact) { EnterCriticalSection(&criticalSection); - std::map::iterator it = contactFileMap.find(hContact); + std::map::iterator it = contactFileMap.find(hContact); if (it != contactFileMap.end()) { DeleteFile(it->second.file.c_str()); contactFileMap.erase(it); diff --git a/plugins/BasicHistory/src/EventList.h b/plugins/BasicHistory/src/EventList.h index 6a3327760c..35d675e4d4 100644 --- a/plugins/BasicHistory/src/EventList.h +++ b/plugins/BasicHistory/src/EventList.h @@ -72,7 +72,7 @@ private: std::wstring file; }; - static std::map contactFileMap; + static std::map contactFileMap; static std::wstring contactFileDir; bool CanShowHistory(DBEVENTINFO* dbei); diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 766b8805d6..7d95ac81e7 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -112,23 +112,23 @@ HistoryWindow::~HistoryWindow() DeleteObject(bkFindBrush); } -std::map HistoryWindow::windows; +std::map HistoryWindow::windows; std::vector HistoryWindow::freeWindows; void HistoryWindow::Deinit() { bool destroyed = true; - std::vector keys; - for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) + std::vector keys; + for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) { if (!it->second->isDestroyed) { keys.push_back(it->first); } } - for (std::vector::iterator it = keys.begin(); it != keys.end(); ++it) + for (std::vector::iterator it = keys.begin(); it != keys.end(); ++it) { - std::map::iterator it1 = windows.find(*it); + std::map::iterator it1 = windows.find(*it); if (it1 != windows.end()) { DestroyWindow(it1->second->hWnd); @@ -160,7 +160,7 @@ void HistoryWindow::Deinit() if (destroyed) { - for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) + for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) { delete it->second; } @@ -186,7 +186,7 @@ void HistoryWindow::Open(HCONTACT hContact) } else { - std::map::iterator it = windows.find(hContact); + std::map::iterator it = windows.find(hContact); if (it != windows.end()) { it->second->Focus(); @@ -201,7 +201,7 @@ void HistoryWindow::Open(HCONTACT hContact) void HistoryWindow::Close(HCONTACT hContact) { - std::map::iterator it = windows.find(hContact); + std::map::iterator it = windows.find(hContact); if (it != windows.end()) { if (it->second->isDestroyed) @@ -223,7 +223,7 @@ void HistoryWindow::Close(HistoryWindow* historyWindow) DestroyWindow(historyWindow->hWnd); return; } - std::map::iterator it = windows.find(historyWindow->hContact); + std::map::iterator it = windows.find(historyWindow->hContact); if (it != windows.end() && it->second == historyWindow) { delete it->second; @@ -247,7 +247,7 @@ void HistoryWindow::RebuildEvents(HCONTACT hContact) { if (hContact != NULL) { - std::map::iterator it = windows.find(hContact); + std::map::iterator it = windows.find(hContact); if (it != windows.end() && !it->second->isDestroyed) { SendMessage(it->second->hWnd,DM_HREBUILD,0,0); @@ -265,7 +265,7 @@ void HistoryWindow::RebuildEvents(HCONTACT hContact) void HistoryWindow::ChangeToFreeWindow(HistoryWindow* historyWindow) { - std::map::iterator it = windows.find(historyWindow->hContact); + std::map::iterator it = windows.find(historyWindow->hContact); if (it != windows.end() && it->second == historyWindow) { windows.erase(it); @@ -294,7 +294,7 @@ void HistoryWindow::Focus() int HistoryWindow::FontsChanged(WPARAM wParam, LPARAM lParam) { - for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) + for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) { if (!it->second->isDestroyed) { @@ -345,7 +345,7 @@ void OptionsGroupChanged() void HistoryWindow::OptionsGroupChanged() { - for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) + for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) { if (!it->second->isDestroyed) { @@ -371,7 +371,7 @@ void OptionsMainChanged() void HistoryWindow::OptionsMainChanged() { - for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) + for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) { if (!it->second->isDestroyed) { @@ -406,7 +406,7 @@ void OptionsSearchingChanged() void HistoryWindow::OptionsSearchingChanged() { - for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) + for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) { if (!it->second->isDestroyed) { @@ -435,7 +435,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM) if (!count) return FALSE; - for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) + for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) { if (!it->second->isDestroyed) { @@ -495,7 +495,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM) bool HistoryWindow::IsInList(HWND hWnd) { - for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) + for (std::map::iterator it = windows.begin(); it != windows.end(); ++it) if (!it->second->isDestroyed) if (it->second->hWnd == hWnd) return true; @@ -1643,7 +1643,7 @@ void HistoryWindow::ReloadContacts() cii.cbSize = sizeof(cii); cii.flags = CLCIIF_GROUPFONT | CLCIIF_BELOWCONTACTS; cii.pszText = TranslateT("System"); - hSystem = (HANDLE) SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii); + hSystem = (HCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii); } } else @@ -2333,7 +2333,7 @@ HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder) return hContact; } -void HistoryWindow::SelectContact(HANDLE _hContact) +void HistoryWindow::SelectContact(HCONTACT _hContact) { if (hContact != _hContact) { HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS); diff --git a/plugins/BasicHistory/src/HistoryWindow.h b/plugins/BasicHistory/src/HistoryWindow.h index 4bebe0e738..339866edf4 100644 --- a/plugins/BasicHistory/src/HistoryWindow.h +++ b/plugins/BasicHistory/src/HistoryWindow.h @@ -49,7 +49,7 @@ private: void ReloadMainOptions(); void DoImport(IImport::ImportType type); - static std::map windows; + static std::map windows; static std::vector freeWindows; bool isDestroyed; LONG splitterY; @@ -67,7 +67,7 @@ private: HIMAGELIST himlSmall, himlNone; HBRUSH bkBrush; HBRUSH bkFindBrush; - HANDLE hSystem; + HCONTACT hSystem; HWND splitterXhWnd, splitterYhWnd; bool isStartSelect; protected: @@ -90,6 +90,6 @@ public: // SearchContext interface virtual void SelectEventGroup(int sel); virtual HCONTACT GetNextContact(HCONTACT hContact, int adder); - virtual void SelectContact(HANDLE _hContact); + virtual void SelectContact(HCONTACT _hContact); }; diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index bd563ed046..f61be22121 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -1568,7 +1568,7 @@ void ResetListOptions(HWND hwnd) SendMessage(hwnd, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT)); } -void RebuildList(HWND hwnd, HANDLE hSystem, TaskOptions* to) +void RebuildList(HWND hwnd, HCONTACT hSystem, TaskOptions* to) { HANDLE hItem; if (to->isSystem && hSystem) @@ -1581,11 +1581,11 @@ void RebuildList(HWND hwnd, HANDLE hSystem, TaskOptions* to) } } -void SaveList(HWND hwnd, HANDLE hSystem, TaskOptions* to) +void SaveList(HWND hwnd, HCONTACT hSystem, TaskOptions* to) { to->contacts.clear(); if (hSystem) - to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM) hSystem, 0) != 0; + to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM)hSystem, 0) != 0; for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { HANDLE hItem = (HANDLE) SendMessage(hwnd, CLM_FINDCONTACT, (WPARAM) hContact, 0); @@ -1602,7 +1602,7 @@ bool IsValidTask(TaskOptions& to, std::list* top = NULL, std::wstri INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - static HANDLE hSystem; + static HCONTACT hSystem; switch(msg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); @@ -1738,7 +1738,7 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, cii.cbSize = sizeof(cii); cii.flags = CLCIIF_GROUPFONT | CLCIIF_CHECKBOX | CLCIIF_BELOWCONTACTS; cii.pszText = TranslateT("System"); - hSystem = (HANDLE) SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii); + hSystem = (HCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii); SendMessage(contactList, CLM_AUTOREBUILD, 0, 0); ResetListOptions(contactList); RebuildList(contactList, hSystem, to); diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index 9f52474d35..dcd9dd5593 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -410,8 +410,8 @@ bool DoTask(TaskOptions& to) } if (contactList.size() > 0) { - HANDLE* contacts = new HANDLE[contactList.size() + 1]; - contacts[0] = (HANDLE)contactList.size(); + HCONTACT *contacts = new HCONTACT[contactList.size() + 1]; + contacts[0] = (HCONTACT)contactList.size(); int i = 1; for (std::list::iterator it = contactList.begin(); it != contactList.end(); ++it) contacts[i++] = *it; diff --git a/plugins/BasicHistory/src/SearchContext.h b/plugins/BasicHistory/src/SearchContext.h index dd16d95d79..4c9e6f04dc 100644 --- a/plugins/BasicHistory/src/SearchContext.h +++ b/plugins/BasicHistory/src/SearchContext.h @@ -30,7 +30,7 @@ public: virtual void SelectEventGroup(int sel) = 0; virtual HCONTACT GetNextContact(HCONTACT hContact, int adder) = 0; - virtual void SelectContact(HANDLE _hContact) = 0; + virtual void SelectContact(HCONTACT _hContact) = 0; struct MessageData { diff --git a/plugins/BasicHistory/src/Searcher.h b/plugins/BasicHistory/src/Searcher.h index 274f738082..e8ce263f11 100644 --- a/plugins/BasicHistory/src/Searcher.h +++ b/plugins/BasicHistory/src/Searcher.h @@ -26,7 +26,7 @@ private: int lastFindSelection; int startFindPos; int startFindSel; - HANDLE startFindContact; + HCONTACT startFindContact; bool isFindSelChanged; bool isFindContactChanged; bool findBack, matchCase, matchWholeWords, onlyIn, onlyOut, onlyGroup, allUsers, searchForInLG, searchForInMes; diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index d47444d3bd..3307f81901 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -10,7 +10,7 @@ void populateSettingsList(HWND hwnd2List) SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Confirmation Window")); } -void populateContacts(HANDLE BPhContact,HWND hwnd2CB) +void populateContacts(HCONTACT BPhContact, HWND hwnd2CB) { for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { char *szProto = GetContactProto(hContact); diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index cf778443a1..82addeed47 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -167,7 +167,7 @@ int __fastcall ApplyFingerprintImage(HCONTACT hContact, LPTSTR szMirVer) ExtraIcon_SetIcon(hExtraIcon, hContact, hImage); - if (arMonitoredWindows.getIndex(hContact) != -1) + if (arMonitoredWindows.getIndex((HANDLE)hContact) != -1) SetSrmmIcon(hContact, szMirVer); return 0; } @@ -905,7 +905,7 @@ static int OnSrmmWindowEvent(WPARAM wParam, LPARAM lParam) if (szProto != NULL) ptszMirVer = db_get_tsa(event->hContact, szProto, "MirVer"); SetSrmmIcon(event->hContact, ptszMirVer); - arMonitoredWindows.insert(event->hContact); + arMonitoredWindows.insert((HANDLE)event->hContact); } else if (event->uType == MSG_WINDOW_EVT_CLOSE) arMonitoredWindows.remove(event->hContact); diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp index 2fefc5b8ec..f3491471c7 100644 --- a/plugins/MirFox/src/MirandaUtils.cpp +++ b/plugins/MirFox/src/MirandaUtils.cpp @@ -213,8 +213,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_ } - - MirandaContact* mirandaContact = args->mirfoxDataPtr->getMirandaContactPtrByHandle(args->targetHandle); + MirandaContact* mirandaContact = args->mirfoxDataPtr->getMirandaContactPtrByHandle((HCONTACT)args->targetHandle); const wchar_t* contactNameW = NULL; TCHAR* tszAccountName = NULL; if (mirandaContact){ diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp index ddb6ebdc8e..0f82d638f8 100644 --- a/plugins/MirFox/src/MirfoxData.cpp +++ b/plugins/MirFox/src/MirfoxData.cpp @@ -49,7 +49,7 @@ void MirfoxData::clearMirandaContacts(){ } int -MirfoxData::updateMirandaContactState(HANDLE contactHandle, MFENUM_MIRANDACONTACT_STATE & contactState) +MirfoxData::updateMirandaContactState(HCONTACT contactHandle, MFENUM_MIRANDACONTACT_STATE & contactState) { boost::ptr_list* mirandaContactsPtr = getMirandaContacts(); @@ -65,7 +65,7 @@ MirfoxData::updateMirandaContactState(HANDLE contactHandle, MFENUM_MIRANDACONTAC } MirandaContact* -MirfoxData::getMirandaContactPtrByHandle(HANDLE contactHandle){ +MirfoxData::getMirandaContactPtrByHandle(HCONTACT contactHandle){ MFLogger* logger = MFLogger::getInstance(); diff --git a/plugins/MirFox/src/MirfoxData.h b/plugins/MirFox/src/MirfoxData.h index fe98ff31b4..8fe5729107 100644 --- a/plugins/MirFox/src/MirfoxData.h +++ b/plugins/MirFox/src/MirfoxData.h @@ -134,10 +134,10 @@ public: //update MirandaContact's state by id //return 0 - ok, - int updateMirandaContactState(HANDLE contactHandle, MFENUM_MIRANDACONTACT_STATE & contactState); + int updateMirandaContactState(HCONTACT contactHandle, MFENUM_MIRANDACONTACT_STATE & contactState); //return MirandaContact* by HANDLE - MirandaContact* getMirandaContactPtrByHandle(HANDLE contactHandle); + MirandaContact* getMirandaContactPtrByHandle(HCONTACT contactHandle); diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index b0a2232cce..fd21bdaf2f 100644 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -31,7 +31,7 @@ XML_API xi = {0}; int hLangpack = 0; logtofile debuglog; bool gpg_valid = false, gpg_keyexist = false; -std::map hcontact_data; +std::map hcontact_data; PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), diff --git a/plugins/New_GPG/src/main.h b/plugins/New_GPG/src/main.h index 353dee0aae..36a7bafb0f 100644 --- a/plugins/New_GPG/src/main.h +++ b/plugins/New_GPG/src/main.h @@ -22,7 +22,7 @@ struct contact_data string key_in_prescense; }; -extern std::map hcontact_data; +extern std::map hcontact_data; extern bool bAutoExchange; extern RECT key_from_keyserver_rect, firstrun_rect, new_key_rect, key_gen_rect, load_key_rect, import_key_rect, key_password_rect, load_existing_key_rect; diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index b9deb63655..514f7ae2c8 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -485,8 +485,6 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) } db_set_b(ccs->hContact, szGPGModuleName, "GPGEncryption", 1); db_set_b(ccs->hContact, szGPGModuleName, "bAlwatsTrust", 1); - void setSrmmIcon(HANDLE); - void setClistIcon(HANDLE); setSrmmIcon(ccs->hContact); setClistIcon(ccs->hContact); if(metaIsSubcontact(ccs->hContact)) diff --git a/plugins/New_GPG/src/metacontacts.cpp b/plugins/New_GPG/src/metacontacts.cpp index dcf7667f4f..27c6963213 100644 --- a/plugins/New_GPG/src/metacontacts.cpp +++ b/plugins/New_GPG/src/metacontacts.cpp @@ -32,7 +32,7 @@ bool metaIsProtoMetaContacts(HCONTACT hContact) bool metaIsDefaultSubContact(HCONTACT hContact) { if(bMetaContacts) - return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0)==hContact; + return (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0)==hContact; return false; } diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index 75279c7e96..3f43a4e9fd 100755 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -738,7 +738,6 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam msg += (char*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hcnt, 0); SetWindowTextA(hwndDlg, msg.c_str()); } - bool isContactSecured(HANDLE); if(!hcnt) { EnableWindow(GetDlgItem(hwndDlg, IDC_SELECT_EXISTING), 0); @@ -1182,8 +1181,6 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam key_buf.clear(); if(IsDlgButtonChecked(hwndDlg, IDC_ENABLE_ENCRYPTION)) { - void setSrmmIcon(HANDLE); - void setClistIcon(HANDLE); if(hContact) { if(metaIsProtoMetaContacts(hContact)) diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index d1122dca94..1170542944 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -1754,7 +1754,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l) string output; DWORD exitcode; { - HANDLE hcnt = hContact; + HCONTACT hcnt = hContact; ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); path = ptmp; mir_free(ptmp); diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index ee03c41900..8f508afdc0 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -145,7 +145,7 @@ static void __cdecl AckThreadProc(void *param) INT_PTR NewsAggrGetInfo(WPARAM wParam, LPARAM lParam) { CCSDATA *ccs = (CCSDATA *)lParam; - mir_forkthread(AckThreadProc, ccs->hContact); + mir_forkthread(AckThreadProc, (void*)ccs->hContact); return 0; } diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 8444644f7f..ccf23266cb 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -95,7 +95,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara GetWindowRect(hwnd, &ti.rcItem); ti.cbSize = sizeof(ti); - ti.hItem = data->hContact; + ti.hItem = (HANDLE)data->hContact; ti.ptCursor = pt; ti.isTreeFocused = 1; CallService(MS_TOOLTIP_SHOWTIP, 0, (LPARAM)&ti); @@ -256,7 +256,7 @@ static void addWindow(HCONTACT hContact) db_free(&dbv); HWND hWnd = CreateWindow( _T("WeatherFrame"), _T(""), WS_CHILD | WS_VISIBLE, - 0, 0, 10, 10, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL, hInst, hContact); + 0, 0, 10, 10, (HWND)CallService(MS_CLUI_GETHWND, 0, 0), NULL, hInst, (void*)hContact); WindowList_Add(hMwinWindowList, hWnd, hContact); CLISTFrame Frame = {0}; diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index c1e00d6532..a176e7b81a 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -129,7 +129,7 @@ void StartUpdate(void *dummy) Sleep(((db_get_dw(NULL, MODULENAME, START_DELAY_KEY, 0)) * SECOND)); for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) - GetData(hContact); + GetData((void*)hContact); StartUpDelay = 0; } @@ -139,7 +139,7 @@ void ContactLoop(void *dummy) { if (StartUpDelay == 0) { for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) { - GetData(hContact); + GetData((void*)hContact); Sleep(10); // avoid 100% CPU } } @@ -212,11 +212,11 @@ int Doubleclick(WPARAM wParam, LPARAM lParam) ShowWindow(hwndDlg, SW_SHOW); SetActiveWindow(hwndDlg); - if ( db_get_b(NULL, MODULENAME, UPDATE_ON_OPEN_KEY, 0)) { - if ( db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0)) - mir_forkthread(ReadFromFile, hContact); + if (db_get_b(NULL, MODULENAME, UPDATE_ON_OPEN_KEY, 0)) { + if (db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0)) + mir_forkthread(ReadFromFile, (void*)hContact); else - mir_forkthread(GetData, hContact); + mir_forkthread(GetData, (void*)hContact); db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE); } } @@ -395,9 +395,9 @@ INT_PTR DataWndMenuCommand(WPARAM wParam, LPARAM lParam) if ( db_get_b(NULL, MODULENAME, UPDATE_ON_OPEN_KEY, 0)) { if ( db_get_b(hContact, MODULENAME, ENABLE_ALERTS_KEY, 0)) - mir_forkthread(ReadFromFile, hContact); + mir_forkthread(ReadFromFile, (void*)hContact); else - mir_forkthread(GetData, hContact); + mir_forkthread(GetData, (void*)hContact); db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE); } @@ -467,7 +467,7 @@ INT_PTR WebsiteMenuCommand(WPARAM wParam, LPARAM lParam) /*****************************************************************************/ int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact) { - mir_forkthread(GetData, singlecontact); + mir_forkthread(GetData, (void*)singlecontact); return 0; } diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index 0ab3287d87..5a3bca1cb4 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -37,7 +37,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) // open data window if ( db_get_b(NULL, MODULENAME, LCLK_WINDOW_KEY, 0)) { NotifyEventHooks(hHookDisplayDataAlert, (int) hContact, 0); - mir_forkthread(GetData, hContact); + mir_forkthread(GetData, (void*)hContact); PUDeletePopup(hWnd); } // open url @@ -58,7 +58,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) // open datA window if ( db_get_b(NULL, MODULENAME, RCLK_WINDOW_KEY, 0)) { NotifyEventHooks(hHookDisplayDataAlert, (int) hContact, 0); - mir_forkthread(GetData, hContact); + mir_forkthread(GetData, (void*)hContact); PUDeletePopup(hWnd); } // open url @@ -81,9 +81,9 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } /*****************************************************************************/ -int WDisplayDataAlert(void *hContact) +int WDisplayDataAlert(HCONTACT hContact) { - NotifyEventHooks(hHookDisplayDataAlert, (int) hContact, 0); + NotifyEventHooks(hHookDisplayDataAlert, (WPARAM)hContact, 0); return 0; } diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp index 4274f8c38a..93b84691c8 100644 --- a/plugins/YahooGroups/src/utils.cpp +++ b/plugins/YahooGroups/src/utils.cpp @@ -314,7 +314,7 @@ TCHAR *GetContactID(HCONTACT hContact, char *szProto) } } -HANDLE GetContactFromID(TCHAR *szID, char *szProto) +HCONTACT GetContactFromID(TCHAR *szID, char *szProto) { TCHAR *szHandle; TCHAR dispName[1024]; @@ -330,12 +330,12 @@ HANDLE GetContactFromID(TCHAR *szID, char *szProto) _tcsncpy(dispName, tmp, SIZEOF(dispName)); if ((szHandle) && ((_tcsicmp(szHandle, szID) == 0) || (_tcsicmp(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0))) - { found = 1; - } + if (szHandle) { free(szHandle); } - if (found) return hContact; + if (found) + return hContact; } return NULL; @@ -343,7 +343,7 @@ HANDLE GetContactFromID(TCHAR *szID, char *szProto) #pragma warning (default: 4312) #pragma warning (disable: 4312) -HANDLE GetContactFromID(TCHAR *szID, wchar_t *szProto) +HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto) { char protocol[1024]; WideCharToMultiByte(CP_ACP, 0, szProto, -1, protocol, sizeof(protocol), NULL, NULL); diff --git a/plugins/YahooGroups/src/utils.h b/plugins/YahooGroups/src/utils.h index c3dc480dfa..9e07609dc6 100644 --- a/plugins/YahooGroups/src/utils.h +++ b/plugins/YahooGroups/src/utils.h @@ -49,12 +49,12 @@ int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, int size); int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, int count); -TCHAR *GetContactName(HCONTACT hContact, char *szProto); -TCHAR *GetContactID(HCONTACT hContact); -TCHAR *GetContactID(HCONTACT hContact, char *szProto); -HANDLE GetContactFromID(TCHAR *szID, char *szProto); -HANDLE GetContactFromID(TCHAR *szID, wchar_t *szProto); -void GetContactProtocol(HCONTACT hContact, char *szProto, int size); +TCHAR *GetContactName(HCONTACT hContact, char *szProto); +TCHAR *GetContactID(HCONTACT hContact); +TCHAR *GetContactID(HCONTACT hContact, char *szProto); +HCONTACT GetContactFromID(TCHAR *szID, char *szProto); +HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto); +void GetContactProtocol(HCONTACT hContact, char *szProto, int size); int MyPUShowMessage(char *lpzText, BYTE kind); diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index 10efe9572e..647891b5f7 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -23,7 +23,7 @@ void showmsgwnd(unsigned int param) CallService(MS_MSG_SENDMESSAGET, (WPARAM)param, 0); } -LRESULT ShowOSD(TCHAR *str, int timeout, COLORREF color, HANDLE user) +LRESULT ShowOSD(TCHAR *str, int timeout, COLORREF color, HCONTACT user) { logmsg("ShowOSD"); @@ -196,7 +196,7 @@ int HookedNewEvent(WPARAM wParam, LPARAM lParam) TCHAR buffer[512]; mir_sntprintf(buffer, SIZEOF(buffer), buf, c1, c2); - ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_msg", DEFAULT_CLRMSG), (HANDLE)wParam); + ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_msg", DEFAULT_CLRMSG), (HCONTACT)wParam); mir_free( c1 ); mir_free( c2 ); -- cgit v1.2.3