summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 14:42:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 14:42:51 +0000
commit33953cc6a0fab6a91af293c6838f8a46dd7922da (patch)
tree2dbbe718ad42545bde6c9f7672387827c530550a /plugins/TabSRMM
parente190a7fde521bd6af9ea485cc730f854aaf38e11 (diff)
HCONTACT, part 3
git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/chat/chat.h2
-rw-r--r--plugins/TabSRMM/src/chat/manager.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp2
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp14
-rw-r--r--plugins/TabSRMM/src/container.cpp2
-rw-r--r--plugins/TabSRMM/src/functions.h2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp5
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp32
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp6
-rw-r--r--plugins/TabSRMM/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/nen.h2
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp14
-rw-r--r--plugins/TabSRMM/src/sendlater.h22
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp2
-rw-r--r--plugins/TabSRMM/src/sidebar.h2
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp2
16 files changed, 53 insertions, 60 deletions
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h
index 9192f6960f..1e1e8caa16 100644
--- a/plugins/TabSRMM/src/chat/chat.h
+++ b/plugins/TabSRMM/src/chat/chat.h
@@ -151,7 +151,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
// manager.c
SESSION_INFO* SM_FindSessionByHWND(HWND h);
-SESSION_INFO* SM_FindSessionByHCONTACT(HANDLE h);
+SESSION_INFO* SM_FindSessionByHCONTACT(HCONTACT h);
SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* currSession, SESSION_INFO* prevSession, const TCHAR* pszOriginal, const TCHAR* pszCurrent);
void SM_RemoveContainer(TContainerData *pContainer);
diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp
index 1a4f357acd..9aff83efd0 100644
--- a/plugins/TabSRMM/src/chat/manager.cpp
+++ b/plugins/TabSRMM/src/chat/manager.cpp
@@ -93,7 +93,7 @@ SESSION_INFO* SM_FindSessionByHWND(HWND hWnd)
return NULL;
}
-SESSION_INFO* SM_FindSessionByHCONTACT(HANDLE h)
+SESSION_INFO* SM_FindSessionByHCONTACT(HCONTACT h)
{
for (SESSION_INFO *si = pci->wndList; si; si = si->next)
if (si->hContact == h)
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 622b0b86ad..3c940648d4 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -3332,7 +3332,7 @@ LABEL_SHOWWINDOW:
case DM_QUERYHCONTACT:
if (lParam)
- *(HANDLE*)lParam = dat->hContact;
+ *(HCONTACT*)lParam = dat->hContact;
return 0;
case GC_CLOSEWINDOW:
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 63001f7931..a255657c65 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -622,15 +622,10 @@ HICON CContactCache::getIcon(int& iSize) const
int CContactCache::getMaxMessageLength()
{
- HANDLE hContact;
- const char* szProto;
-
- hContact = getActiveContact();
- szProto = getActiveProto();
-
+ HCONTACT hContact = getActiveContact();
+ LPCSTR szProto = getActiveProto();
if (szProto) {
-
- m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, reinterpret_cast<LPARAM>(hContact));
+ m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)hContact);
if (m_nMax) {
if (M.GetByte("autosplit", 0)) {
if (m_hwnd)
@@ -640,7 +635,8 @@ int CContactCache::getMaxMessageLength()
if (m_hwnd)
::SendDlgItemMessage(m_hwnd, IDC_MESSAGE, EM_EXLIMITTEXT, 0, (LPARAM)m_nMax);
}
- } else {
+ }
+ else {
if (m_hwnd)
::SendDlgItemMessage(m_hwnd, IDC_MESSAGE, EM_EXLIMITTEXT, 0, 20000);
m_nMax = 20000;
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index f7d48af5fe..61dd9940e6 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -1199,7 +1199,7 @@ panel_found:
else {
HWND hwnd = M.FindWindow((HCONTACT)wParam);
if (hwnd == 0) {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HANDLE)wParam);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)wParam);
if (si) {
SendMessage(si->hWnd, GC_UPDATETITLE, 0, 0);
return 0;
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index f111e98d0c..cfb6b5204e 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -68,7 +68,7 @@ void TSAPI LoadFavoritesAndRecent();
void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus,
WORD wStatus, HICON hIcon, BOOL mode, HMENU hMenu);
void TSAPI CreateTrayMenus(int mode);
-void TSAPI HandleMenuEntryFromhContact(int iSelection);
+void TSAPI HandleMenuEntryFromhContact(HCONTACT iSelection);
/*
* gneric msgwindow functions(creation, container management etc.)
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 98e87b970a..a6cb622037 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1010,7 +1010,7 @@ void TSAPI DM_LoadLocale(TWindowData *dat)
}
}
- mir_forkthread(LoadKLThread, dat->hContact);
+ mir_forkthread(LoadKLThread, (void*)dat->hContact);
}
LRESULT TSAPI DM_RecalcPictureSize(TWindowData *dat)
@@ -1768,7 +1768,6 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam)
TCHAR newcontactname[128];
DWORD dwOldIdle = dat->idle;
const char* szActProto = 0;
- HANDLE hActContact = 0;
HWND hwndDlg = dat->hwnd;
HWND hwndTab = GetParent(hwndDlg);
@@ -1790,7 +1789,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam)
if (dat->szProto) {
szActProto = dat->cache->getActiveProto();
- hActContact = dat->hContact;
+ HCONTACT hActContact = dat->hContact;
bool bHasName = (dat->cache->getUIN()[0] != 0);
dat->idle = dat->cache->getIdleTS();
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index d1918004c7..cd2cf9333a 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -93,13 +93,12 @@ static INT_PTR HotkeyProcessor(WPARAM wParam, LPARAM lParam)
return 0;
}
-void TSAPI HandleMenuEntryFromhContact(int iSelection)
+void TSAPI HandleMenuEntryFromhContact(HCONTACT hContact)
{
- HWND hWnd = M.FindWindow((HCONTACT)iSelection);
-
- if (iSelection == 0)
+ if (hContact == 0)
return;
+ HWND hWnd = M.FindWindow(hContact);
if (hWnd && IsWindow(hWnd)) {
TContainerData *pContainer = 0;
SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
@@ -108,11 +107,11 @@ void TSAPI HandleMenuEntryFromhContact(int iSelection)
pContainer->hwndSaved = 0;
SetForegroundWindow(pContainer->hwnd);
}
- else CallService(MS_MSG_SENDMESSAGE, (WPARAM)iSelection, 0);
+ else CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
return;
}
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HANDLE)iSelection);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT(hContact);
if (si != NULL) {
// session does exist, but no window is open for it
if (si->hWnd) {
@@ -128,7 +127,7 @@ void TSAPI HandleMenuEntryFromhContact(int iSelection)
}
}
- CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)iSelection, 0);
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0);
}
void TSAPI DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, DWORD dwIdle)
@@ -153,7 +152,6 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
TContainerData *p;
- int iSelection;
switch (msg) {
case WM_CREATE:
@@ -209,7 +207,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
DWORD idle = 0;
if (hWnd == NULL) {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HANDLE)dis->itemID);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)dis->itemID);
hWnd = si ? si->hWnd : 0;
}
@@ -244,8 +242,8 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (wParam == 100)
SetForegroundWindow(hwndDlg);
if (GetMenuItemCount(PluginConfig.g_hMenuTrayUnread) > 0) {
- iSelection = TrackPopupMenu(PluginConfig.g_hMenuTrayUnread, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
- HandleMenuEntryFromhContact(iSelection);
+ BOOL iSelection = TrackPopupMenu(PluginConfig.g_hMenuTrayUnread, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
+ HandleMenuEntryFromhContact((HCONTACT)iSelection);
}
else TrackPopupMenu(GetSubMenu(PluginConfig.g_hMenuContext, 8), TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
@@ -269,8 +267,8 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
do {
GetMenuItemInfoA(PluginConfig.g_hMenuTrayUnread, i, TRUE, &mii);
if (mii.dwItemData > 0) {
- uid = GetMenuItemID(PluginConfig.g_hMenuTrayUnread, i);
- HandleMenuEntryFromhContact(uid);
+ UINT uid = GetMenuItemID(PluginConfig.g_hMenuTrayUnread, i);
+ HandleMenuEntryFromhContact((HCONTACT)uid);
break;
}
}
@@ -312,7 +310,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
CheckMenuItem(submenu, ID_TRAYCONTEXT_DON, MF_BYCOMMAND | (nen_options.iNoAutoPopup ? MF_CHECKED : MF_UNCHECKED));
EnableMenuItem(submenu, ID_TRAYCONTEXT_HIDEALLMESSAGECONTAINERS, MF_BYCOMMAND | (nen_options.bTraySupport) ? MF_ENABLED : MF_GRAYED);
CheckMenuItem(submenu, ID_TRAYCONTEXT_SHOWTHETRAYICON, MF_BYCOMMAND | (nen_options.bTraySupport ? MF_CHECKED : MF_UNCHECKED));
- iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
+ BOOL iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
if (iSelection) {
MENUITEMINFO mii = {0};
@@ -320,7 +318,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
mii.fMask = MIIM_DATA | MIIM_ID;
GetMenuItemInfo(submenu, (UINT_PTR)iSelection, FALSE, &mii);
if (mii.dwItemData != 0) // this must be an itm of the fav or recent menu
- HandleMenuEntryFromhContact(iSelection);
+ HandleMenuEntryFromhContact((HCONTACT)iSelection);
else {
switch (iSelection) {
case ID_TRAYCONTEXT_SHOWTHETRAYICON:
@@ -374,7 +372,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
* if lParam == NULL, don't consider clist events, just open the message tab
*/
if (lParam == 0)
- HandleMenuEntryFromhContact((int)wParam);
+ HandleMenuEntryFromhContact((HCONTACT)wParam);
else {
CLISTEVENT *cle = (CLISTEVENT *)CallService(MS_CLIST_GETEVENT, wParam, 0);
if (cle) {
@@ -384,7 +382,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
}
// still, we got that message posted.. the event may be waiting in tabSRMMs tray...
- else HandleMenuEntryFromhContact((int)wParam);
+ else HandleMenuEntryFromhContact((HCONTACT)wParam);
}
break;
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 7662b3703b..9cc6c056b2 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -2547,7 +2547,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case HM_DBEVENTADDED:
if (!dat)
return 0;
- if ((HANDLE)wParam != dat->hContact)
+ if ((HCONTACT)wParam != dat->hContact)
return 0;
if (dat->hContact == NULL)
return 0;
@@ -2693,7 +2693,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_QUERYHCONTACT:
{
- HANDLE *phContact = (HANDLE*) lParam;
+ HCONTACT *phContact = (HCONTACT*)lParam;
if (phContact)
*phContact = dat->hContact;
}
@@ -3084,7 +3084,7 @@ quote_from_last:
case IDC_ADD:
{
ADDCONTACTSTRUCT acs = {0};
- acs.handle = dat->hContact;
+ acs.hContact = dat->hContact;
acs.handleType = HANDLE_CONTACT;
acs.szProto = 0;
CallService(MS_ADDCONTACT_SHOW, (WPARAM)hwndDlg, (LPARAM)&acs);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 9185fea23e..974da99469 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -150,7 +150,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
return 1;
}
else {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HANDLE)wParam);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)wParam);
if (si == NULL || si->hWnd == 0 || (pContainer = si->pContainer) == NULL || pContainer->hwndActive != si->hWnd)
return 1;
}
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h
index 812369f357..f92f3308e9 100644
--- a/plugins/TabSRMM/src/nen.h
+++ b/plugins/TabSRMM/src/nen.h
@@ -143,7 +143,7 @@ struct EVENT_DATAT
struct PLUGIN_DATAT
{
- HANDLE hContact;
+ HCONTACT hContact;
UINT eventType;
NEN_OPTIONS *pluginOptions;
POPUPDATAT *pud;
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index 81631416d7..a7e2748315 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -491,7 +491,7 @@ void CSendLater::addContact(const HCONTACT hContact)
return;
if (m_sendLaterContactList.getCount() == 0) {
- m_sendLaterContactList.insert(hContact);
+ m_sendLaterContactList.insert((HANDLE)hContact);
m_last_sendlater_processed = 0; // force processing at next tick
return;
}
@@ -500,10 +500,10 @@ void CSendLater::addContact(const HCONTACT hContact)
* this list should not have duplicate entries
*/
- if (m_sendLaterContactList.find(hContact))
+ if (m_sendLaterContactList.find((HANDLE)hContact))
return;
- m_sendLaterContactList.insert(hContact);
+ m_sendLaterContactList.insert((HANDLE)hContact);
m_last_sendlater_processed = 0; // force processing at next tick
}
@@ -565,7 +565,7 @@ LRESULT CSendLater::qMgrAddFilter(const HCONTACT hContact, const TCHAR* tszNick)
lr = ::SendMessage(m_hwndFilter, CB_FINDSTRING, 0, reinterpret_cast<LPARAM>(tszNick));
if (lr == CB_ERR) {
lr = ::SendMessage(m_hwndFilter, CB_INSERTSTRING, -1, reinterpret_cast<LPARAM>(tszNick));
- ::SendMessage(m_hwndFilter, CB_SETITEMDATA, lr, reinterpret_cast<LPARAM>(hContact));
+ ::SendMessage(m_hwndFilter, CB_SETITEMDATA, lr, (LPARAM)hContact);
if (hContact == m_hFilter)
m_sel = lr;
}
@@ -773,7 +773,7 @@ INT_PTR CALLBACK CSendLater::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
TranslateDialogDefault(hwnd);
m_hwndList = ::GetDlgItem(m_hwndDlg, IDC_QMGR_LIST);
m_hwndFilter = ::GetDlgItem(m_hwndDlg, IDC_QMGR_FILTER);
- m_hFilter = reinterpret_cast<HANDLE>(db_get_dw(0, SRMSGMOD_T, "qmgrFilterContact", 0));
+ m_hFilter = (HCONTACT)(db_get_dw(0, SRMSGMOD_T, "qmgrFilterContact", 0));
::SetWindowLongPtr(m_hwndList, GWL_STYLE, ::GetWindowLongPtr(m_hwndList, GWL_STYLE) | LVS_SHOWSELALWAYS);
::SendMessage(m_hwndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_LABELTIP|LVS_EX_DOUBLEBUFFER);
@@ -832,7 +832,7 @@ INT_PTR CALLBACK CSendLater::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (HIWORD(wParam) == CBN_SELCHANGE && reinterpret_cast<HWND>(lParam) == m_hwndFilter) {
LRESULT lr = ::SendMessage(m_hwndFilter, CB_GETCURSEL, 0, 0);
if (lr != CB_ERR) {
- m_hFilter = reinterpret_cast<HANDLE>(::SendMessage(m_hwndFilter, CB_GETITEMDATA, lr, 0));
+ m_hFilter = (HCONTACT)::SendMessage(m_hwndFilter, CB_GETITEMDATA, lr, 0);
qMgrFillList();
}
break;
@@ -923,7 +923,7 @@ INT_PTR CALLBACK CSendLater::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case WM_NCDESTROY:
m_hwndDlg = 0;
- db_set_dw(0, SRMSGMOD_T, "qmgrFilterContact", reinterpret_cast<DWORD>(m_hFilter));
+ db_set_dw(0, SRMSGMOD_T, "qmgrFilterContact", DWORD(m_hFilter));
break;
}
return FALSE;
diff --git a/plugins/TabSRMM/src/sendlater.h b/plugins/TabSRMM/src/sendlater.h
index 9c49b3fc00..102701c5db 100644
--- a/plugins/TabSRMM/src/sendlater.h
+++ b/plugins/TabSRMM/src/sendlater.h
@@ -132,17 +132,17 @@ private:
LIST<void> m_sendLaterContactList;
LIST<CSendLaterJob> m_sendLaterJobList;
- bool m_fAvail;
- bool m_fIsInteractive;
- bool m_fErrorPopups;
- bool m_fSuccessPopups;
- time_t m_last_sendlater_processed;
- int m_currJob;
-
- HWND m_hwndDlg;
- HWND m_hwndList, m_hwndFilter;
- HANDLE m_hFilter; // contact handle to filter the qmgr list (0 = no filter, show all)
- LRESULT m_sel; // index of the combo box entry corresponding to the contact filter;
+ bool m_fAvail;
+ bool m_fIsInteractive;
+ bool m_fErrorPopups;
+ bool m_fSuccessPopups;
+ time_t m_last_sendlater_processed;
+ int m_currJob;
+
+ HWND m_hwndDlg;
+ HWND m_hwndList, m_hwndFilter;
+ HCONTACT m_hFilter; // contact handle to filter the qmgr list (0 = no filter, show all)
+ LRESULT m_sel; // index of the combo box entry corresponding to the contact filter;
};
extern CSendLater* sendLater;
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index 68ae9c218f..3be0d53a5b 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -75,7 +75,7 @@ TSideBarLayout CSideBar::m_layouts[CSideBar::NR_LAYOUTS] = {
CSideBarButton::CSideBarButton(const TWindowData *dat, CSideBar *sideBar)
{
m_dat = dat;
- m_id = reinterpret_cast<UINT>(dat->hContact); // set the control id
+ m_id = UINT(dat->hContact); // set the control id
m_sideBar = sideBar;
_create();
}
diff --git a/plugins/TabSRMM/src/sidebar.h b/plugins/TabSRMM/src/sidebar.h
index 6150b2526b..74704ea82a 100644
--- a/plugins/TabSRMM/src/sidebar.h
+++ b/plugins/TabSRMM/src/sidebar.h
@@ -74,7 +74,7 @@ public:
const bool isTopAligned() const { return(m_isTopAligned); }
const HWND getHwnd() const { return(m_hwnd); }
const UINT getID() const { return(m_id); }
- const HANDLE getContactHandle() const { return(m_dat->hContact); }
+ const HCONTACT getContactHandle() const { return(m_dat->hContact); }
const TWindowData* getDat() const { return(m_dat); }
const TSideBarLayout* getLayout() const { return(m_sideBarLayout); }
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index 0bbe718678..5db14bfa39 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -1325,7 +1325,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
if (dat) {
tabdat->fTipActive = TRUE;
ti.isGroup = 0;
- ti.hItem = dat->hContact;
+ ti.hItem = (HANDLE)dat->hContact;
ti.isTreeFocused = 0;
CallService("mToolTip/ShowTip", 0, (LPARAM)&ti);
}