summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/buttonbar.h4
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp10
-rw-r--r--plugins/TabSRMM/src/chat/chat.h6
-rw-r--r--plugins/TabSRMM/src/chat/manager.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/services.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp2
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp10
-rw-r--r--plugins/TabSRMM/src/contactcache.h12
-rw-r--r--plugins/TabSRMM/src/container.cpp36
-rw-r--r--plugins/TabSRMM/src/controls.cpp2
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp12
-rw-r--r--plugins/TabSRMM/src/functions.h24
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp14
-rw-r--r--plugins/TabSRMM/src/globals.cpp16
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp24
-rw-r--r--plugins/TabSRMM/src/infopanel.cpp2
-rw-r--r--plugins/TabSRMM/src/infopanel.h4
-rw-r--r--plugins/TabSRMM/src/mim.cpp16
-rw-r--r--plugins/TabSRMM/src/mim.h8
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp6
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp6
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.h4
-rw-r--r--plugins/TabSRMM/src/msglog.cpp4
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp4
-rw-r--r--plugins/TabSRMM/src/msgs.cpp30
-rw-r--r--plugins/TabSRMM/src/msgs.h8
-rw-r--r--plugins/TabSRMM/src/nen.h4
-rw-r--r--plugins/TabSRMM/src/sendlater.cpp16
-rw-r--r--plugins/TabSRMM/src/sendlater.h12
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp14
-rw-r--r--plugins/TabSRMM/src/sendqueue.h4
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp2
-rw-r--r--plugins/TabSRMM/src/sidebar.h4
-rw-r--r--plugins/TabSRMM/src/srmm.cpp2
-rw-r--r--plugins/TabSRMM/src/templates.cpp2
-rw-r--r--plugins/TabSRMM/src/templates.h6
-rw-r--r--plugins/TabSRMM/src/trayicon.cpp10
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp4
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp12
-rw-r--r--plugins/TabSRMM/src/utils.cpp10
-rw-r--r--plugins/TabSRMM/src/utils.h6
42 files changed, 189 insertions, 189 deletions
diff --git a/plugins/TabSRMM/src/buttonbar.h b/plugins/TabSRMM/src/buttonbar.h
index 9e0fd7a16d..ec5a1c70e6 100644
--- a/plugins/TabSRMM/src/buttonbar.h
+++ b/plugins/TabSRMM/src/buttonbar.h
@@ -34,9 +34,9 @@ static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam);
static INT_PTR CB_AddButton(WPARAM wParam, LPARAM lParam);
static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam);
static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam);
-static void CB_GetButtonSettings(HCONTACT hContact,CustomButtonData *cbd);
+static void CB_GetButtonSettings(MCONTACT hContact,CustomButtonData *cbd);
-void CB_WriteButtonSettings(HCONTACT hContact,CustomButtonData *cbd);
+void CB_WriteButtonSettings(MCONTACT hContact,CustomButtonData *cbd);
int sstSortButtons(const void * vmtbi1, const void * vmtbi2);
void CB_DeInitCustomButtons();
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index 1cba4cbbcd..e3f277319e 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -101,7 +101,7 @@ static int DBRemoveEnumProc(const char *szSetting, LPARAM lParam)
return 0;
}
-static int Hlp_RemoveDatabaseSettings(HCONTACT hContact, char *szModule, char *szPrefix)
+static int Hlp_RemoveDatabaseSettings(MCONTACT hContact, char *szModule, char *szPrefix)
{
RemoveSettings rs;
int i, count;
@@ -350,7 +350,7 @@ static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam)
if (!realbutton)
return 1;
- HWND hwndDlg = M.FindWindow((HCONTACT)wParam);
+ HWND hwndDlg = M.FindWindow((MCONTACT)wParam);
if(!hwndDlg)
return 1;
HWND hwndBtn = GetDlgItem(hwndDlg, tempCID);
@@ -385,7 +385,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam)
if (!realbutton)
return 1;
- HWND hwndDlg = M.FindWindow((HCONTACT)wParam);
+ HWND hwndDlg = M.FindWindow((MCONTACT)wParam);
if(!hwndDlg)
return 1;
@@ -856,7 +856,7 @@ void TSAPI BB_CustomButtonClick(TWindowData *dat, DWORD idFrom, HWND hwndFrom, B
}
-void CB_GetButtonSettings(HCONTACT hContact, CustomButtonData *cbd)
+void CB_GetButtonSettings(MCONTACT hContact, CustomButtonData *cbd)
{
DBVARIANT dbv = {0};
char SettingName[1024] = {'\0'};
@@ -884,7 +884,7 @@ void CB_GetButtonSettings(HCONTACT hContact, CustomButtonData *cbd)
}
}
-void CB_WriteButtonSettings(HCONTACT hContact, CustomButtonData *cbd)
+void CB_WriteButtonSettings(MCONTACT hContact, CustomButtonData *cbd)
{
char SettingName[1024] = {'\0'};
char SettingParameter[1024] = {'\0'};
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h
index 1e1e8caa16..3ea4cdc8b4 100644
--- a/plugins/TabSRMM/src/chat/chat.h
+++ b/plugins/TabSRMM/src/chat/chat.h
@@ -103,7 +103,7 @@ struct TMUCSettings : public GlobalLogSettingsBase
struct FLASH_PARAMS
{
- HCONTACT hContact;
+ MCONTACT hContact;
const char* sound;
int iEvent;
HICON hNotifyIcon;
@@ -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(HCONTACT h);
+SESSION_INFO* SM_FindSessionByHCONTACT(MCONTACT 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);
@@ -173,7 +173,7 @@ void DestroyGCMenu(HMENU *hMenu, int iIndex);
void Chat_SetFilters(SESSION_INFO *si);
void TSAPI DoFlashAndSoundWorker(FLASH_PARAMS* p);
BOOL DoPopup(SESSION_INFO *si, GCEVENT* gce);
-int ShowPopup(HCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...);
+int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...);
BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce);
// message.c
diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp
index 9aff83efd0..500e5f394d 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(HCONTACT h)
+SESSION_INFO* SM_FindSessionByHCONTACT(MCONTACT h)
{
for (SESSION_INFO *si = pci->wndList; si; si = si->next)
if (si->hContact == h)
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp
index 5f44fa352c..70f6a16088 100644
--- a/plugins/TabSRMM/src/chat/services.cpp
+++ b/plugins/TabSRMM/src/chat/services.cpp
@@ -35,7 +35,7 @@
HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup)
{
- HCONTACT hContact = si->hContact;
+ MCONTACT hContact = si->hContact;
if (M.FindWindow(hContact) != 0)
return 0;
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index e082f985a0..beaed8af21 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -102,7 +102,7 @@ BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce)
return TRUE;
}
-int ShowPopup(HCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...)
+int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...)
{
POPUPDATAT pd = { 0 };
va_list marker;
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 3c940648d4..3c8e9420f2 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)
- *(HCONTACT*)lParam = dat->hContact;
+ *(MCONTACT*)lParam = dat->hContact;
return 0;
case GC_CLOSEWINDOW:
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index a255657c65..31f20b99a7 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -37,7 +37,7 @@
static OBJLIST<CContactCache> arContacts(50, HandleKeySortT);
-CContactCache::CContactCache(const HCONTACT hContact)
+CContactCache::CContactCache(const MCONTACT hContact)
{
m_hContact = hContact;
m_wOldStatus = m_wStatus = m_wMetaStatus = ID_STATUS_OFFLINE;
@@ -156,7 +156,7 @@ bool CContactCache::updateStatus()
void CContactCache::updateMeta(bool fForce)
{
if (m_Valid) {
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)m_hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)m_hContact, 0);
if (hSubContact && (hSubContact != m_hSubContact || fForce)) {
m_hSubContact = hSubContact;
m_szMetaProto = GetContactProto(m_hSubContact);
@@ -442,7 +442,7 @@ void CContactCache::deletedHandler()
::SendMessage(m_hwnd, WM_CLOSE, 1, 2);
releaseAlloced();
- m_hContact = (HCONTACT)-1;
+ m_hContact = (MCONTACT)-1;
}
/**
@@ -512,7 +512,7 @@ void CContactCache::updateStatusMsg(const char *szKey)
* @return CContactCache* pointer to the cache entry for this contact
*/
-CContactCache* CContactCache::getContactCache(HCONTACT hContact)
+CContactCache* CContactCache::getContactCache(MCONTACT hContact)
{
CContactCache *cc = arContacts.find((CContactCache*)&hContact);
if (cc == NULL) {
@@ -622,7 +622,7 @@ HICON CContactCache::getIcon(int& iSize) const
int CContactCache::getMaxMessageLength()
{
- HCONTACT hContact = getActiveContact();
+ MCONTACT hContact = getActiveContact();
LPCSTR szProto = getActiveProto();
if (szProto) {
m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)hContact);
diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h
index ec1f8e4bb0..46212cd706 100644
--- a/plugins/TabSRMM/src/contactcache.h
+++ b/plugins/TabSRMM/src/contactcache.h
@@ -65,7 +65,7 @@ struct TSessionStats {
struct CContactCache : public MZeroedObject
{
CContactCache() {}
- CContactCache(const HCONTACT hContact);
+ CContactCache(const MCONTACT hContact);
~CContactCache()
{
releaseAlloced();
@@ -77,8 +77,8 @@ struct CContactCache : public MZeroedObject
const WORD getActiveStatus() const { return(m_isMeta ? m_wMetaStatus : m_wStatus); }
const WORD getOldStatus() const { return(m_wOldStatus); }
const TCHAR* getNick() const { return(m_szNick); }
- const HCONTACT getContact() const { return(m_hContact); }
- const HCONTACT getActiveContact() const { return(m_isMeta ? (m_hSubContact ? m_hSubContact : m_hContact) : m_hContact); }
+ const MCONTACT getContact() const { return(m_hContact); }
+ const MCONTACT getActiveContact() const { return(m_isMeta ? (m_hSubContact ? m_hSubContact : m_hContact) : m_hContact); }
const DWORD getIdleTS() const { return(m_idleTS); }
const char* getProto() const { return(m_szProto); }
const TCHAR* getProtoT() const { return(m_tszProto); }
@@ -128,7 +128,7 @@ struct CContactCache : public MZeroedObject
void saveHistory(WPARAM wParam, LPARAM lParam);
void inputHistoryEvent(WPARAM wParam);
- static CContactCache* getContactCache(HCONTACT hContact);
+ static CContactCache* getContactCache(MCONTACT hContact);
static void cacheUpdateMetaChanged();
private:
@@ -137,8 +137,8 @@ private:
void allocHistory();
void releaseAlloced();
- HCONTACT m_hContact;
- HCONTACT m_hSubContact;
+ MCONTACT m_hContact;
+ MCONTACT m_hSubContact;
WORD m_wStatus, m_wMetaStatus;
WORD m_wOldStatus;
char* m_szProto, *m_szMetaProto;
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 61dd9940e6..f51d760d92 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -39,7 +39,7 @@ TContainerData *pLastActiveContainer = NULL;
static bool fForceOverlayIcons = false;
-static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, HCONTACT hContact)
+static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCONTACT hContact)
{
if (item->dwFlags & BUTTON_PASSHCONTACTW || item->dwFlags & BUTTON_PASSHCONTACTL || item->dwFlags & BUTTON_ISCONTACTDBACTION) {
if (hContact == 0)
@@ -135,7 +135,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer)
* pointer and for removing the struct from the linked list.
*/
-TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, HCONTACT hContactFrom)
+TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hContactFrom)
{
if (CMimAPI::m_shutDown)
return NULL;
@@ -873,7 +873,7 @@ panel_found:
}
else if (((LPNMHDR)lParam)->code == NM_RCLICK) {
POINT pt;
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
HMENU hMenu;
GetCursorPos(&pt);
@@ -1013,7 +1013,7 @@ panel_found:
bool fProcessMainMenu = pContainer->MenuBar->isMainMenu();
pContainer->MenuBar->Cancel();
- HCONTACT hContact;
+ MCONTACT hContact;
TWindowData *dat = (TWindowData*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
DWORD dwOldFlags = pContainer->dwFlags;
ButtonItem *pItem = pContainer->buttonItems;
@@ -1175,7 +1175,7 @@ panel_found:
case DM_UPDATETITLE:
{
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
const TCHAR *szNewTitle = NULL;
TWindowData *dat = NULL;
@@ -1197,15 +1197,15 @@ panel_found:
dat = (TWindowData*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
}
else {
- HWND hwnd = M.FindWindow((HCONTACT)wParam);
+ HWND hwnd = M.FindWindow((MCONTACT)wParam);
if (hwnd == 0) {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)wParam);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)wParam);
if (si) {
SendMessage(si->hWnd, GC_UPDATETITLE, 0, 0);
return 0;
}
}
- hContact = (HCONTACT)wParam;
+ hContact = (MCONTACT)wParam;
if (hwnd && hContact)
dat = (TWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
@@ -1392,7 +1392,7 @@ panel_found:
SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (BYTE)trans, (pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
if (pContainer->dwFlags & CNT_NEED_UPDATETITLE) {
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
if (pContainer->hwndActive) {
SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
@@ -1550,7 +1550,7 @@ panel_found:
{
DWORD ws, wsold, ex = 0, exold = 0;
HMENU hSysmenu = GetSystemMenu(hwndDlg, FALSE);
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
int i=0;
UINT sBarHeight;
bool bAero = M.isAero();
@@ -1897,7 +1897,7 @@ panel_found:
item.mask = TCIF_PARAM;
TabCtrl_GetItem(hwndTab, TabCtrl_GetCurSel(hwndTab), &item);
- HCONTACT hContact;
+ MCONTACT hContact;
SendMessage((HWND)item.lParam, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
db_set_b(hContact, SRMSGMOD_T, "splitmax", (BYTE)((wp.showCmd == SW_SHOWMAXIMIZED) ? 1 : 0));
@@ -1934,7 +1934,7 @@ panel_found:
pContainer->dwFlags &= ~(CNT_DEFERREDCONFIGURE | CNT_CREATE_MINIMIZED | CNT_DEFERREDSIZEREQUEST | CNT_CREATE_CLONED);
for (int i=0; i < TabCtrl_GetItemCount(hwndTab); i++) {
if (TabCtrl_GetItem(hwndTab, i, &item)) {
- HCONTACT hContact;
+ MCONTACT hContact;
SendMessage((HWND)item.lParam, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
char szCName[40];
@@ -2215,7 +2215,7 @@ void TSAPI AdjustTabClientRect(TContainerData *pContainer, RECT *rc)
* if none is assigned, return the name of the default container
*/
-int TSAPI GetContainerNameForContact(HCONTACT hContact, TCHAR *szName, int iNameLen)
+int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iNameLen)
{
// single window mode using cloned (temporary) containers
if (M.GetByte("singlewinmode", 0)) {
@@ -2255,7 +2255,7 @@ void TSAPI DeleteContainer(int iIndex)
db_set_ts(NULL, CONTAINER_KEY, szIndex, _T("**mir_free**"));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!lstrcmp(tszValue, tszContainerName))
db_unset(hContact, SRMSGMOD_T, CONTAINER_SUBKEY);
@@ -2289,7 +2289,7 @@ void TSAPI RenameContainer(int iIndex, const TCHAR *szNew)
db_set_ts(NULL, CONTAINER_KEY, szIndex, szNew);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!lstrcmp(tszValue, tszContainerName))
db_set_ts(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew);
@@ -2347,7 +2347,7 @@ HMENU TSAPI BuildMCProtocolMenu(HWND hwndDlg)
int iNumProtos = (int)CallService(MS_MC_GETNUMCONTACTS, (WPARAM)dat->hContact, 0);
int iDefaultProtoByNum = (int)CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM)dat->hContact, 0);
- HCONTACT hContactMostOnline = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->hContact, 0);
+ MCONTACT hContactMostOnline = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->hContact, 0);
char *szProtoMostOnline = GetContactProto(hContactMostOnline);
int isForced = M.GetDword(dat->hContact, "tabSRMM_forced", -1);
@@ -2364,8 +2364,8 @@ HMENU TSAPI BuildMCProtocolMenu(HWND hwndDlg)
mir_snprintf(szTemp, sizeof(szTemp), "Handle%d", i);
TCHAR *nick = NULL, *szStatusText = NULL;
- HCONTACT hContact;
- if ((hContact = (HCONTACT)db_get_dw(dat->hContact, PluginConfig.szMetaName, szTemp, 0)) != 0) {
+ MCONTACT hContact;
+ if ((hContact = (MCONTACT)db_get_dw(dat->hContact, PluginConfig.szMetaName, szTemp, 0)) != 0) {
nick = pcli->pfnGetContactDisplayName(hContact, 0);
mir_snprintf(szTemp, sizeof(szTemp), "Status%d", i);
WORD wStatus = (WORD)db_get_w(dat->hContact, PluginConfig.szMetaName, szTemp, 0);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp
index ffbb3e24bb..c7ee0e98d6 100644
--- a/plugins/TabSRMM/src/controls.cpp
+++ b/plugins/TabSRMM/src/controls.cpp
@@ -398,7 +398,7 @@ void CMenuBar::invoke(const int id)
TWindowData *dat = (TWindowData*)GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
- HCONTACT hContact = dat ? dat->hContact : 0;
+ MCONTACT hContact = dat ? dat->hContact : 0;
if (index == 3 && hContact != 0) {
hMenu = reinterpret_cast<HMENU>(::CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0));
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 740e3d5f7b..43aa9d02d8 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -44,7 +44,7 @@ static LIST<PLUGIN_DATAT> arPopupList(10, HandleKeySortT);
BOOL bWmNotify = TRUE;
-static PLUGIN_DATAT* PU_GetByContact(const HCONTACT hContact)
+static PLUGIN_DATAT* PU_GetByContact(const MCONTACT hContact)
{
return arPopupList.find((PLUGIN_DATAT*)&hContact);
}
@@ -559,7 +559,7 @@ static TCHAR* GetPreviewT(WORD eventType, DBEVENTINFO* dbe)
}
}
-static int PopupUpdateT(HCONTACT hContact, HANDLE hEvent)
+static int PopupUpdateT(MCONTACT hContact, HANDLE hEvent)
{
PLUGIN_DATAT *pdata = const_cast<PLUGIN_DATAT *>(PU_GetByContact(hContact));
if (!pdata)
@@ -630,7 +630,7 @@ static int PopupUpdateT(HCONTACT hContact, HANDLE hEvent)
return 0;
}
-static int PopupShowT(NEN_OPTIONS *pluginOptions, HCONTACT hContact, HANDLE hEvent, UINT eventType, HWND hContainer)
+static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, HANDLE hEvent, UINT eventType, HWND hContainer)
{
//there has to be a maximum number of popups shown at the same time
if (arPopupList.getCount() >= MAX_POPUPS)
@@ -759,7 +759,7 @@ void TSAPI UpdateTrayMenuState(TWindowData *dat, BOOL bForced)
* if we want tray support, add the contact to the list of unread sessions in the tray menu
*/
-int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, HCONTACT hContact, DWORD fromEvent)
+int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, MCONTACT hContact, DWORD fromEvent)
{
if (!PluginConfig.g_hMenuTrayUnread || hContact == 0 || szProto == NULL)
return 0;
@@ -823,7 +823,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro
return 0;
}
-int tabSRMM_ShowPopup(HCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat)
+int tabSRMM_ShowPopup(MCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat)
{
if (nen_options.iDisable) // no popups at all. Period
return 0;
@@ -883,7 +883,7 @@ passed:
* remove all popups for hContact, but only if the mask matches the current "mode"
*/
-void TSAPI DeletePopupsForContact(HCONTACT hContact, DWORD dwMask)
+void TSAPI DeletePopupsForContact(MCONTACT hContact, DWORD dwMask)
{
if (!(dwMask & nen_options.dwRemoveMask) || nen_options.iDisable || !PluginConfig.g_PopupAvail)
return;
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index cfb6b5204e..28ad139f09 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -53,9 +53,9 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
int TSAPI NEN_ReadOptions(NEN_OPTIONS *options);
int TSAPI NEN_WriteOptions(NEN_OPTIONS *options);
-int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, HCONTACT hContact, DWORD fromEvent);
+int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, MCONTACT hContact, DWORD fromEvent);
int TSAPI PopupPreview(NEN_OPTIONS *pluginOptions);
-void TSAPI DeletePopupsForContact(HCONTACT hContact, DWORD dwMask);
+void TSAPI DeletePopupsForContact(MCONTACT hContact, DWORD dwMask);
/*
* tray stuff
@@ -65,24 +65,24 @@ void TSAPI CreateSystrayIcon(int create);
void TSAPI FlashTrayIcon(HICON hIcon);
void TSAPI UpdateTrayMenuState(TWindowData *dat, BOOL bForced);
void TSAPI LoadFavoritesAndRecent();
-void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus,
+void TSAPI AddContactToFavorites(MCONTACT 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(HCONTACT iSelection);
+void TSAPI HandleMenuEntryFromhContact(MCONTACT iSelection);
/*
* gneric msgwindow functions(creation, container management etc.)
*/
-BOOL TSAPI IsUtfSendAvailable(HCONTACT hContact);
-HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, HCONTACT hContact, int isSend,
+BOOL TSAPI IsUtfSendAvailable(MCONTACT hContact);
+HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend,
const char *pszInitialText, BOOL bActivateTAb, BOOL bPopupContainer, BOOL bWantPopup, HANDLE hdbEvent);
int TSAPI ActivateTabFromHWND(HWND hwndTab, HWND hwnd);
void TSAPI FlashContainer(TContainerData *pContainer, int iMode, int iNum);
void TSAPI CreateImageList(BOOL bInitial);
-TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName, HCONTACT hContact);
-TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, HCONTACT hContactFrom);
+TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName, MCONTACT hContact);
+TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hContactFrom);
TContainerData* TSAPI FindContainerByName(const TCHAR *name);
int TSAPI GetTabIndexFromHWND(HWND hwndTab, HWND hwnd);
@@ -100,7 +100,7 @@ TContainerData* TSAPI RemoveContainerFromList(TContainerData *pContainer);
void TSAPI CloseAllContainers();
void TSAPI DeleteContainer(int iIndex);
void TSAPI RenameContainer(int iIndex, const TCHAR *newName);
-int TSAPI GetContainerNameForContact(HCONTACT hContact, TCHAR *szName, int iNameLen);
+int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iNameLen);
HMENU TSAPI BuildContainerMenu();
void TSAPI BuildCodePageList();
void TSAPI PreTranslateDates();
@@ -108,7 +108,7 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT
void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WPARAM wParam, LPARAM lParam, BYTE iType = 0);
void TSAPI GetDefaultContainerTitleFormat();
void TSAPI SetAeroMargins(TContainerData *pContainer);
-int TABSRMM_FireEvent(HCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType);
+int TABSRMM_FireEvent(MCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType);
INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam);
@@ -154,7 +154,7 @@ int TSAPI UnloadTSButtonModule();
* debugging support
*/
-int _DebugPopup(HCONTACT hContact, const TCHAR *fmt, ...);
+int _DebugPopup(MCONTACT hContact, const TCHAR *fmt, ...);
int _DebugMessage(HWND hwndDlg, TWindowData *dat, const char *fmt, ...);
// themes
@@ -175,7 +175,7 @@ int TSAPI LoadLocalFlags(HWND hwnd, TWindowData *dat);
int TN_ModuleInit();
int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam);
int TN_ModuleDeInit();
-void TN_TypingMessage(HCONTACT hContact, int iMode);
+void TN_TypingMessage(MCONTACT hContact, int iMode);
// hotkeys
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index a6cb622037..cebd17df30 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -306,7 +306,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer,
case IDC_SMILEYBTN:
if (dat->doSmileys && PluginConfig.g_SmileyAddAvail) {
- HCONTACT hContact = dat->cache->getActiveContact();
+ MCONTACT hContact = dat->cache->getActiveContact();
if (CheckValidSmileyPack(dat->cache->getActiveProto(), hContact) != 0) {
SMADD_SHOWSEL3 smaddInfo = {0};
@@ -875,7 +875,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat)
void TSAPI DM_SetDBButtonStates(HWND hwndChild, TWindowData *dat)
{
ButtonItem *buttonItem = dat->pContainer->buttonItems;
- HCONTACT hContact = dat->hContact, hFinalContact = 0;
+ MCONTACT hContact = dat->hContact, hFinalContact = 0;
char *szModule, *szSetting;
HWND hwndContainer = dat->pContainer->hwnd;
@@ -978,7 +978,7 @@ void TSAPI DM_ScrollToBottom(TWindowData *dat, WPARAM wParam, LPARAM lParam)
static void LoadKLThread(LPVOID _param)
{
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)_param, SRMSGMOD_T, "locale", &dbv)) {
+ if (!db_get_ts((MCONTACT)_param, SRMSGMOD_T, "locale", &dbv)) {
HKL hkl = LoadKeyboardLayout(dbv.ptszVal, 0);
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SETLOCALE, (WPARAM)_param, (LPARAM)hkl);
db_free(&dbv);
@@ -1278,7 +1278,7 @@ void TSAPI DM_NotifyTyping(TWindowData *dat, int mode)
DWORD protoCaps;
DWORD typeCaps;
const char *szProto = 0;
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
if (!dat || !dat->hContact)
return;
@@ -1626,7 +1626,7 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM wParam, LPARAM lParam)
SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
}
}
- tabSRMM_ShowPopup((HCONTACT)wParam, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, hwndDlg, dat->cache->getActiveProto(), dat);
+ tabSRMM_ShowPopup((MCONTACT)wParam, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, hwndDlg, dat->cache->getActiveProto(), dat);
if (IsWindowVisible(m_pContainer->hwnd))
m_pContainer->fHidden = false;
}
@@ -1789,7 +1789,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam)
if (dat->szProto) {
szActProto = dat->cache->getActiveProto();
- HCONTACT hActContact = dat->hContact;
+ MCONTACT hActContact = dat->hContact;
bool bHasName = (dat->cache->getUIN()[0] != 0);
dat->idle = dat->cache->getIdleTS();
@@ -1895,7 +1895,7 @@ static HANDLE hHookIconPressedEvt;
static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
M.BroadcastMessage(DM_STATUSICONCHANGE, 0, 0);
else {
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 219036be27..15e32170e8 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -402,11 +402,11 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam)
CContactCache* c = 0;
bool fChanged = false, fNickChanged = false, fExtendedStatusChange = false;
- hwnd = M.FindWindow((HCONTACT)wParam);
+ hwnd = M.FindWindow((MCONTACT)wParam);
if (hwnd == 0 && wParam != 0) { // we are not interested in this event if there is no open message window/tab
if (!strcmp(setting, "Status") || !strcmp(setting, "MyHandle") || !strcmp(setting, "Nick") || !strcmp(cws->szModule, SRMSGMOD_T)) {
- c = CContactCache::getContactCache((HCONTACT)wParam);
+ c = CContactCache::getContactCache((MCONTACT)wParam);
if (c) {
fChanged = c->updateStatus();
if (strcmp(setting, "Status"))
@@ -424,7 +424,7 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam)
}
if (wParam) {
- c = CContactCache::getContactCache((HCONTACT)wParam);
+ c = CContactCache::getContactCache((MCONTACT)wParam);
if (c) {
szProto = c->getProto();
if (!strcmp(cws->szModule, SRMSGMOD_T)) { // catch own relevant settings
@@ -500,7 +500,7 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam)
int CGlobals::DBContactDeleted(WPARAM wParam, LPARAM lParam)
{
if (wParam) {
- CContactCache *c = CContactCache::getContactCache((HCONTACT)wParam);
+ CContactCache *c = CContactCache::getContactCache((MCONTACT)wParam);
if (c)
c->deletedHandler();
}
@@ -515,7 +515,7 @@ int CGlobals::DBContactDeleted(WPARAM wParam, LPARAM lParam)
int CGlobals::MetaContactEvent(WPARAM wParam, LPARAM lParam)
{
if (wParam) {
- CContactCache *c = CContactCache::getContactCache((HCONTACT)wParam);
+ CContactCache *c = CContactCache::getContactCache((MCONTACT)wParam);
if (c) {
c->updateMeta(true);
if (c->getHwnd()) {
@@ -532,7 +532,7 @@ int CGlobals::PreshutdownSendRecv(WPARAM wParam, LPARAM lParam)
::TN_ModuleDeInit();
::CloseAllContainers();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
db_set_dw(hContact, SRMSGMOD_T, "messagecount", 0);
::SI_DeinitStatusIcons();
@@ -582,7 +582,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
cle.pszService = "SRMsg/ReadMessage";
cle.flags = CLEF_TCHAR;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, "SendLater", "count", 0))
sendLater->addContact(hContact);
@@ -616,7 +616,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c)
if (dat == NULL || !c->isValid())
return;
- HCONTACT hContact = c->getContact();
+ MCONTACT hContact = c->getContact();
if (!PluginConfig.m_LogStatusChanges && !M.GetByte(hContact, "logstatuschanges", 0))
return;
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index cd2cf9333a..ff4a710b64 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -93,7 +93,7 @@ static INT_PTR HotkeyProcessor(WPARAM wParam, LPARAM lParam)
return 0;
}
-void TSAPI HandleMenuEntryFromhContact(HCONTACT hContact)
+void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact)
{
if (hContact == 0)
return;
@@ -203,11 +203,11 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
return TRUE;
}
else if (dis->CtlType == ODT_MENU) {
- HWND hWnd = M.FindWindow((HCONTACT)dis->itemID);
+ HWND hWnd = M.FindWindow((MCONTACT)dis->itemID);
DWORD idle = 0;
if (hWnd == NULL) {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)dis->itemID);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)dis->itemID);
hWnd = si ? si->hWnd : 0;
}
@@ -243,7 +243,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SetForegroundWindow(hwndDlg);
if (GetMenuItemCount(PluginConfig.g_hMenuTrayUnread) > 0) {
BOOL iSelection = TrackPopupMenu(PluginConfig.g_hMenuTrayUnread, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
- HandleMenuEntryFromhContact((HCONTACT)iSelection);
+ HandleMenuEntryFromhContact((MCONTACT)iSelection);
}
else TrackPopupMenu(GetSubMenu(PluginConfig.g_hMenuContext, 8), TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
@@ -268,7 +268,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
GetMenuItemInfoA(PluginConfig.g_hMenuTrayUnread, i, TRUE, &mii);
if (mii.dwItemData > 0) {
UINT uid = GetMenuItemID(PluginConfig.g_hMenuTrayUnread, i);
- HandleMenuEntryFromhContact((HCONTACT)uid);
+ HandleMenuEntryFromhContact((MCONTACT)uid);
break;
}
}
@@ -318,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((HCONTACT)iSelection);
+ HandleMenuEntryFromhContact((MCONTACT)iSelection);
else {
switch (iSelection) {
case ID_TRAYCONTEXT_SHOWTHETRAYICON:
@@ -372,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((HCONTACT)wParam);
+ HandleMenuEntryFromhContact((MCONTACT)wParam);
else {
CLISTEVENT *cle = (CLISTEVENT *)CallService(MS_CLIST_GETEVENT, wParam, 0);
if (cle) {
@@ -382,13 +382,13 @@ 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((HCONTACT)wParam);
+ else HandleMenuEntryFromhContact((MCONTACT)wParam);
}
break;
case DM_DOCREATETAB:
{
- HWND hWnd = M.FindWindow((HCONTACT)lParam);
+ HWND hWnd = M.FindWindow((MCONTACT)lParam);
if (hWnd && IsWindow(hWnd)) {
TContainerData *pContainer = 0;
SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
@@ -399,7 +399,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
else
SendMessage(hWnd, WM_CLOSE, 0, 1);
- CreateNewTabForContact((TContainerData*)wParam, (HCONTACT)lParam, 0, NULL, TRUE, TRUE, FALSE, 0);
+ CreateNewTabForContact((TContainerData*)wParam, (MCONTACT)lParam, 0, NULL, TRUE, TRUE, FALSE, 0);
}
}
}
@@ -441,13 +441,13 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
*/
case DM_REMOVECLISTEVENT:
CallService(MS_CLIST_REMOVEEVENT, wParam, lParam);
- db_event_markRead((HCONTACT)wParam, (HANDLE)lParam);
+ db_event_markRead((MCONTACT)wParam, (HANDLE)lParam);
return 0;
case DM_SETLOCALE:
{
HKL hkl = (HKL)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hWnd = M.FindWindow(hContact);
if (hWnd) {
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp
index 90a8c07f74..691b5ff067 100644
--- a/plugins/TabSRMM/src/infopanel.cpp
+++ b/plugins/TabSRMM/src/infopanel.cpp
@@ -1364,7 +1364,7 @@ void CInfoPanel::dismissConfig(bool fForced)
* @param panel CInfoPanel* the panel which owns it
*/
-CTip::CTip(const HWND hwndParent, const HCONTACT hContact, const TCHAR *pszText, const CInfoPanel* panel)
+CTip::CTip(const HWND hwndParent, const MCONTACT hContact, const TCHAR *pszText, const CInfoPanel* panel)
{
m_hwnd = ::CreateWindowEx(WS_EX_TOOLWINDOW, _T("RichEditTipClass"), _T(""), (M.isAero() ? WS_THICKFRAME : WS_BORDER) | WS_POPUPWINDOW | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 40, 40, 0, 0, g_hInst, this);
diff --git a/plugins/TabSRMM/src/infopanel.h b/plugins/TabSRMM/src/infopanel.h
index 0e2c962706..3bb8835d38 100644
--- a/plugins/TabSRMM/src/infopanel.h
+++ b/plugins/TabSRMM/src/infopanel.h
@@ -74,7 +74,7 @@ public:
LEFT_BAR_WIDTH = 20
};
- CTip (const HWND hwndParent, const HCONTACT hContact, const TCHAR *pszText = 0, const CInfoPanel *panel = 0);
+ CTip (const HWND hwndParent, const MCONTACT hContact, const TCHAR *pszText = 0, const CInfoPanel *panel = 0);
~CTip()
{
mir_free(m_pszText);
@@ -92,7 +92,7 @@ private:
HWND m_hwnd; // our window handle
HWND m_hRich; // handle of the rich edit child
HWND m_hwndParent; // parent window (used for position calculations and to send notifications)
- HCONTACT m_hContact; // contact handle
+ MCONTACT m_hContact; // contact handle
char *m_pszText; // the richedit text
SIZE m_szRich; // size of the richedit control (height auto-calculated to make it fit the text)
RECT m_rcRich; // adjusted rectangle for the richedit control (client coordinates)
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 69a97a7a5f..7c81027490 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -164,12 +164,12 @@ void CMimAPI::BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam)
WindowList_BroadcastAsync(m_hMessageWindowList, msg, wParam, lParam);
}
-HWND CMimAPI::FindWindow(HCONTACT h) const
+HWND CMimAPI::FindWindow(MCONTACT h) const
{
return WindowList_Find(m_hMessageWindowList, h);
}
-INT_PTR CMimAPI::AddWindow(HWND hWnd, HCONTACT h)
+INT_PTR CMimAPI::AddWindow(HWND hWnd, MCONTACT h)
{
return WindowList_Add(m_hMessageWindowList, hWnd, h);
}
@@ -335,7 +335,7 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam)
int issplit = 1, foundWin = 0, preTyping = 0;
BOOL fShowOnClist = TRUE;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
if ((hwnd = M.FindWindow(hContact)) && M.GetByte(SRMSGMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING))
preTyping = SendMessage(hwnd, DM_TYPING, 0, lParam);
@@ -407,7 +407,7 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam)
}
if (fShowOnClist) {
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
@@ -468,7 +468,7 @@ int CMimAPI::ProtoAck(WPARAM wParam, LPARAM lParam)
int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return NULL;
@@ -497,7 +497,7 @@ int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
int CMimAPI::DispatchNewEvent(WPARAM wParam, LPARAM lParam)
{
if (wParam) {
- HWND h = M.FindWindow((HCONTACT)wParam);
+ HWND h = M.FindWindow((MCONTACT)wParam);
if (h)
PostMessage(h, HM_DBEVENTADDED, wParam, lParam); // was SENDMESSAGE !!! XXX
}
@@ -522,7 +522,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam)
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hwnd = M.FindWindow(hContact);
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
@@ -614,7 +614,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam)
else {
char *szProto = GetContactProto(hContact);
if (PluginConfig.g_MetaContactsAvail && szProto && !strcmp(szProto, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0))) {
- HCONTACT hSubconttact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
+ MCONTACT hSubconttact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
szProto = GetContactProto(hSubconttact);
}
if (szProto) {
diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h
index 51f70830db..c548d07c4f 100644
--- a/plugins/TabSRMM/src/mim.h
+++ b/plugins/TabSRMM/src/mim.h
@@ -107,14 +107,14 @@ public:
{ return db_get_dw(0, szModule, szSetting, uDefault); }
static DWORD __forceinline GetDword(const char *szSetting, DWORD uDefault)
{ return db_get_dw(0, SRMSGMOD_T, szSetting, uDefault); }
- static DWORD __forceinline GetDword(const HCONTACT hContact, const char *szSetting, DWORD uDefault)
+ static DWORD __forceinline GetDword(const MCONTACT hContact, const char *szSetting, DWORD uDefault)
{ return db_get_dw(hContact, SRMSGMOD_T, szSetting, uDefault); }
static int __forceinline GetByte(const char *szSetting, int uDefault)
{ return db_get_b(0, SRMSGMOD_T, szSetting, uDefault); }
static int __forceinline GetByte(const char *szModule, const char *szSetting, int uDefault)
{ return db_get_b(0, szModule, szSetting, uDefault); }
- static int __forceinline GetByte(const HCONTACT hContact, const char *szSetting, int uDefault)
+ static int __forceinline GetByte(const MCONTACT hContact, const char *szSetting, int uDefault)
{ return db_get_b(hContact, SRMSGMOD_T, szSetting, uDefault); }
static bool __forceinline GetBool(const char *szModule, const char *szSetting, bool uDefault)
@@ -182,9 +182,9 @@ public:
void BroadcastMessage(UINT msg, WPARAM wParam, LPARAM lParam);
void BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam);
- INT_PTR AddWindow(HWND hWnd, HCONTACT h);
+ INT_PTR AddWindow(HWND hWnd, MCONTACT h);
INT_PTR RemoveWindow(HWND hWnd);
- HWND FindWindow(HCONTACT h) const;
+ HWND FindWindow(MCONTACT h) const;
static LPCTSTR StriStr(const TCHAR *szString, const TCHAR *szSearchFor);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 9cc6c056b2..4789769410 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -71,7 +71,7 @@ static void _clrMsgFilter(LPARAM lParam)
m->wParam = 0;
}
-BOOL TSAPI IsUtfSendAvailable(HCONTACT hContact)
+BOOL TSAPI IsUtfSendAvailable(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -2547,7 +2547,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case HM_DBEVENTADDED:
if (!dat)
return 0;
- if ((HCONTACT)wParam != dat->hContact)
+ if ((MCONTACT)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:
{
- HCONTACT *phContact = (HCONTACT*)lParam;
+ MCONTACT *phContact = (MCONTACT*)lParam;
if (phContact)
*phContact = dat->hContact;
}
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 9a7f0217bc..63dd0cddd6 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -711,7 +711,7 @@ int TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat)
* checks, if there is a valid smileypack installed for the given protocol
*/
-int TSAPI CheckValidSmileyPack(const char *szProto, HCONTACT hContact)
+int TSAPI CheckValidSmileyPack(const char *szProto, MCONTACT hContact)
{
SMADD_INFO2 smainfo = {0};
@@ -894,7 +894,7 @@ void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, HANDLE hEvent, DBEVENTIN
if ((GetForegroundWindow() != dat->pContainer->hwnd || dat->pContainer->hwndActive != hwndDlg) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !(dat->dwFlagsEx & MWF_SHOW_FLASHCLIST)) {
ZeroMemory(&cle, sizeof(cle));
cle.cbSize = sizeof(cle);
- cle.hContact = (HCONTACT)dat->hContact;
+ cle.hContact = (MCONTACT)dat->hContact;
cle.hDbEvent = hEvent;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
@@ -1214,7 +1214,7 @@ void TSAPI GetMYUIN(TWindowData *dat)
static int g_IEViewAvail = -1;
static int g_HPPAvail = -1;
-UINT TSAPI GetIEViewMode(HWND hwndDlg, HCONTACT hContact)
+UINT TSAPI GetIEViewMode(HWND hwndDlg, MCONTACT hContact)
{
int iWantIEView = 0, iWantHPP = 0;
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h
index 6e85f994ab..54ceba788b 100644
--- a/plugins/TabSRMM/src/msgdlgutils.h
+++ b/plugins/TabSRMM/src/msgdlgutils.h
@@ -40,7 +40,7 @@ int TSAPI MsgWindowUpdateMenu (TWindowData *dat, HMENU submenu, int menuID);
int TSAPI MsgWindowMenuHandler (TWindowData *dat, int selection, int menuId);
int TSAPI GetAvatarVisibility (HWND hwndDlg, TWindowData *dat);
void TSAPI UpdateStatusBar (const TWindowData *dat);
-int TSAPI CheckValidSmileyPack (const char *szProto, HCONTACT hContact);
+int TSAPI CheckValidSmileyPack (const char *szProto, MCONTACT hContact);
TCHAR* TSAPI QuoteText (const TCHAR *text, int charsPerLine, int removeExistingQuotes);
void TSAPI UpdateReadChars (const TWindowData *dat);
void TSAPI ShowPicture (TWindowData *dat, BOOL showNewPic);
@@ -52,7 +52,7 @@ BOOL TSAPI DoRtfToTags (TCHAR * pszText, const TWindowData *dat);
void TSAPI GetMYUIN (TWindowData *dat);
void TSAPI SetMessageLog (TWindowData *dat);
void TSAPI SwitchMessageLog (TWindowData *dat, int iMode);
-UINT TSAPI GetIEViewMode (HWND hwndDlg, HCONTACT hContact);
+UINT TSAPI GetIEViewMode (HWND hwndDlg, MCONTACT hContact);
void TSAPI FindFirstEvent (TWindowData *dat);
void TSAPI SaveSplitter (TWindowData *dat);
void TSAPI LoadSplitter (TWindowData *dat);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index d031bf322f..4458a32375 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -93,7 +93,7 @@ static HICON Logicons[NR_LOGICONS];
#define STREAMSTAGE_STOP 3
struct LogStreamData {
int stage;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent, hDbEventLast;
char *buffer;
int bufferOffset, bufferLen;
@@ -556,7 +556,7 @@ int DbEventIsForMsgWindow(DBEVENTINFO *dbei)
return et && ( et->flags & DETF_MSGWINDOW );
}
-static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HCONTACT hContact, HANDLE hDbEvent, int prefixParaBreak, LogStreamData *streamData)
+static char *Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, HANDLE hDbEvent, int prefixParaBreak, LogStreamData *streamData)
{
char *buffer, c;
TCHAR ci, cc;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 2d54a4702a..55a37b8cdd 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -847,7 +847,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
if (hItemUnknown && M.GetByte(SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && db_get_b(hContact, SRMSGMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -862,7 +862,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
if (hItemUnknown)
db_set_b(0, SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
db_set_b(hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 974da99469..e6b2fe0ea7 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -133,7 +133,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
{
TContainerData *pContainer;
- HWND hwnd = M.FindWindow((HCONTACT)wParam);
+ HWND hwnd = M.FindWindow((MCONTACT)wParam);
if (hwnd != NULL) {
TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (dat == NULL || (pContainer = dat->pContainer) == NULL)
@@ -150,7 +150,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
return 1;
}
else {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)wParam);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)wParam);
if (si == NULL || si->hWnd == 0 || (pContainer = si->pContainer) == NULL || pContainer->hwndActive != si->hWnd)
return 1;
}
@@ -166,7 +166,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
static INT_PTR SetUserPrefs(WPARAM wParam, LPARAM)
{
- HWND hWnd = WindowList_Find(PluginConfig.hUserPrefsWindowList, (HCONTACT)wParam);
+ HWND hWnd = WindowList_Find(PluginConfig.hUserPrefsWindowList, (MCONTACT)wParam);
if (hWnd) {
SetForegroundWindow(hWnd); // already open, bring it to front
return 0;
@@ -197,7 +197,7 @@ static INT_PTR GetMessageWindowFlags(WPARAM wParam, LPARAM lParam)
HWND hwndTarget = (HWND)lParam;
if (hwndTarget == 0)
- hwndTarget = M.FindWindow((HCONTACT)wParam);
+ hwndTarget = M.FindWindow((MCONTACT)wParam);
if (hwndTarget == 0)
return 0;
@@ -234,7 +234,7 @@ INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam)
TContainerData *pContainer = NULL;
if (wParam)
- hwnd = M.FindWindow((HCONTACT)wParam);
+ hwnd = M.FindWindow((MCONTACT)wParam);
else if (lParam)
hwnd = (HWND) lParam;
else
@@ -271,7 +271,7 @@ INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam)
static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam)
{
- HCONTACT hContact = ((CLISTEVENT *) lParam)->hContact;
+ MCONTACT hContact = ((CLISTEVENT *) lParam)->hContact;
HWND hwndExisting = M.FindWindow(hContact);
if (hwndExisting != 0)
@@ -296,7 +296,7 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam)
INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -315,7 +315,7 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
return 0;
}
- /* does the HCONTACT's protocol support IM messages? */
+ /* does the MCONTACT's protocol support IM messages? */
char *szProto = GetContactProto(hContact);
if (szProto) {
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
@@ -355,7 +355,7 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -371,7 +371,7 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
return 0;
}
- /* does the HCONTACT's protocol support IM messages? */
+ /* does the MCONTACT's protocol support IM messages? */
char *szProto = GetContactProto(hContact);
if (szProto) {
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
@@ -391,7 +391,7 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
SendMessage(hwnd, DM_ACTIVATEME, 0, 0); // ask the message window about its parent...
} else {
TCHAR szName[CONTAINER_NAMELEN + 1];
- GetContainerNameForContact((HCONTACT)wParam, szName, CONTAINER_NAMELEN);
+ GetContainerNameForContact((MCONTACT)wParam, szName, CONTAINER_NAMELEN);
TContainerData *pContainer = FindContainerByName(szName);
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, hContact);
@@ -465,7 +465,7 @@ int MyAvatarChanged(WPARAM wParam, LPARAM lParam)
int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
avatarCacheEntry *ace = (avatarCacheEntry *)lParam;
- HWND hwnd = M.FindWindow((HCONTACT)wParam);
+ HWND hwnd = M.FindWindow((MCONTACT)wParam);
if (wParam == 0) { // protocol picture has changed...
M.BroadcastMessage(DM_PROTOAVATARCHANGED, wParam, lParam);
@@ -660,7 +660,7 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild)
* bPopupContainer: restore container if it was minimized, otherwise flash it...
*/
-HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, HCONTACT hContact, int isSend, const char *pszInitialText, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup, HANDLE hdbEvent)
+HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend, const char *pszInitialText, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup, HANDLE hdbEvent)
{
TCHAR newcontactname[128], tabtitle[128];
int newItem;
@@ -832,7 +832,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, HCONTACT hContact,
* a new (cloned) one.
*/
-TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName, HCONTACT hContact)
+TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName, MCONTACT hContact)
{
int iMaxTabs = M.GetDword("maxtabs", 0);
if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !_tcsncmp(szName, _T("default"), 6)) {
@@ -880,7 +880,7 @@ void TSAPI CreateImageList(BOOL bInitial)
PluginConfig.g_IconTypingEvent = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
}
-int TABSRMM_FireEvent(HCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType)
+int TABSRMM_FireEvent(MCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType)
{
if (hContact == NULL || hwnd == NULL || !M.GetByte("_eventapi", 1))
return 0;
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 0412e44e76..27d245f8d2 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -194,7 +194,7 @@ struct TContainerData
LONG uChildMinHeight;
int tBorder;
int tBorder_outer_left, tBorder_outer_right, tBorder_outer_top, tBorder_outer_bottom;
- HCONTACT hContactFrom;
+ MCONTACT hContactFrom;
BOOL isCloned;
HWND hwndStatus;
int statusBarHeight;
@@ -243,7 +243,7 @@ struct TWindowData
HWND hwnd;
DWORD dwFlags;
DWORD dwFlagsEx;
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
TCHAR szMyNickname[130];
TCHAR szStatusBar[100];
@@ -417,7 +417,7 @@ struct TIconDescW
struct TNewWindowData
{
- HCONTACT hContact;
+ MCONTACT hContact;
int isWchar;
LPCSTR szInitialText;
int iTabID;
@@ -895,7 +895,7 @@ struct TABSRMM_SessionInfo {
typedef struct {
int cbSize;
- HCONTACT hContact;
+ MCONTACT hContact;
int uFlags; // should be same as input data unless 0, then it will be the actual type
HWND hwndWindow; //top level window for the contact or NULL if no window exists
int uState; // see window states
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h
index f92f3308e9..b9207f8fc8 100644
--- a/plugins/TabSRMM/src/nen.h
+++ b/plugins/TabSRMM/src/nen.h
@@ -43,7 +43,7 @@
#define MODULE "tabSRMM_NEN"
-int tabSRMM_ShowPopup(HCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat);
+int tabSRMM_ShowPopup(MCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat);
#define DEFAULT_COLBACK RGB(255,255,128)
#define DEFAULT_COLTEXT RGB(0,0,0)
@@ -143,7 +143,7 @@ struct EVENT_DATAT
struct PLUGIN_DATAT
{
- HCONTACT hContact;
+ MCONTACT hContact;
UINT eventType;
NEN_OPTIONS *pluginOptions;
POPUPDATAT *pud;
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp
index a7e2748315..38ab2fc16f 100644
--- a/plugins/TabSRMM/src/sendlater.cpp
+++ b/plugins/TabSRMM/src/sendlater.cpp
@@ -269,7 +269,7 @@ int _cdecl CSendLater::addStub(const char *szSetting, LPARAM lParam)
* addJob() will deal with possible duplicates
* @param hContact HANDLE: contact's handle
*/
-void CSendLater::processSingleContact(const HCONTACT hContact)
+void CSendLater::processSingleContact(const MCONTACT hContact)
{
int iCount = db_get_dw(hContact, "SendLater", "count", 0);
@@ -291,7 +291,7 @@ void CSendLater::processContacts()
{
if (m_fAvail && m_sendLaterContactList.getCount() != 0) {
for (int i=0; i < m_sendLaterContactList.getCount(); i++)
- processSingleContact((HCONTACT)m_sendLaterContactList[i]);
+ processSingleContact((MCONTACT)m_sendLaterContactList[i]);
m_sendLaterContactList.destroy();
}
@@ -310,7 +310,7 @@ void CSendLater::processContacts()
*/
int CSendLater::addJob(const char *szSetting, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
DBVARIANT dbv = {0};
char *szOrig_Utf = 0;
@@ -395,7 +395,7 @@ int CSendLater::addJob(const char *szSetting, LPARAM lParam)
*/
int CSendLater::sendIt(CSendLaterJob *job)
{
- HCONTACT hContact = job->hContact;
+ MCONTACT hContact = job->hContact;
time_t now = time(0);
DWORD dwFlags = 0;
DBVARIANT dbv = {0};
@@ -485,7 +485,7 @@ int CSendLater::sendIt(CSendLaterJob *job)
* and new jobs are created.
*/
-void CSendLater::addContact(const HCONTACT hContact)
+void CSendLater::addContact(const MCONTACT hContact)
{
if (!m_fAvail)
return;
@@ -558,7 +558,7 @@ void CSendLater::qMgrUpdate(bool fReEnable)
}
}
-LRESULT CSendLater::qMgrAddFilter(const HCONTACT hContact, const TCHAR* tszNick)
+LRESULT CSendLater::qMgrAddFilter(const MCONTACT hContact, const TCHAR* tszNick)
{
LRESULT 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 = (HCONTACT)(db_get_dw(0, SRMSGMOD_T, "qmgrFilterContact", 0));
+ m_hFilter = (MCONTACT)(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 = (HCONTACT)::SendMessage(m_hwndFilter, CB_GETITEMDATA, lr, 0);
+ m_hFilter = (MCONTACT)::SendMessage(m_hwndFilter, CB_GETITEMDATA, lr, 0);
qMgrFillList();
}
break;
diff --git a/plugins/TabSRMM/src/sendlater.h b/plugins/TabSRMM/src/sendlater.h
index 102701c5db..35b3ce6ac4 100644
--- a/plugins/TabSRMM/src/sendlater.h
+++ b/plugins/TabSRMM/src/sendlater.h
@@ -70,8 +70,8 @@ public:
~CSendLaterJob();
char szId[20]; // database key name (time stamp of original send)
- HCONTACT hContact; // original contact where the message has been assigned
- HCONTACT hTargetContact; // *real* contact (can be different for metacontacts, e.g).
+ MCONTACT hContact; // original contact where the message has been assigned
+ MCONTACT hTargetContact; // *real* contact (can be different for metacontacts, e.g).
HANDLE hProcess; // returned from the protocols sending service. needed to find it in the ACK handler
time_t created; // job was created at this time (important to kill jobs, that are too old)
time_t lastSent; // time at which the delivery was initiated. used to handle timeouts
@@ -110,7 +110,7 @@ public:
bool processCurrentJob();
void processContacts();
int addJob(const char *szSetting, LPARAM lParam);
- void addContact(const HCONTACT hContact);
+ void addContact(const MCONTACT hContact);
HANDLE processAck(const ACKDATA *ack);
void invokeQueueMgrDlg();
@@ -118,7 +118,7 @@ public:
static INT_PTR svcQMgr(WPARAM wParam, LPARAM lParam);
private:
- void processSingleContact(const HCONTACT hContact);
+ void processSingleContact(const MCONTACT hContact);
int sendIt(CSendLaterJob *job);
INT_PTR CALLBACK DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -127,7 +127,7 @@ private:
void qMgrFillList(bool fClear = true);
void qMgrSetupColumns();
void qMgrSaveColumns();
- LRESULT qMgrAddFilter(const HCONTACT hContact, const TCHAR* tszNick);
+ LRESULT qMgrAddFilter(const MCONTACT hContact, const TCHAR* tszNick);
LIST<void> m_sendLaterContactList;
LIST<CSendLaterJob> m_sendLaterJobList;
@@ -141,7 +141,7 @@ private:
HWND m_hwndDlg;
HWND m_hwndList, m_hwndFilter;
- HCONTACT m_hFilter; // contact handle to filter the qmgr list (0 = no filter, show all)
+ MCONTACT 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;
};
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index 30b9d6a183..4d90ae3c42 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -127,7 +127,7 @@ entry_found:
#define SPLIT_WORD_CUTOFF 20
-static int SendChunkW(WCHAR *chunk, HCONTACT hContact, DWORD dwFlags)
+static int SendChunkW(WCHAR *chunk, MCONTACT hContact, DWORD dwFlags)
{
int wLen = lstrlenW(chunk);
DWORD memRequired = (wLen + 1) * sizeof(WCHAR);
@@ -142,7 +142,7 @@ static int SendChunkW(WCHAR *chunk, HCONTACT hContact, DWORD dwFlags)
return CallContactService(hContact, PSS_MESSAGE, dwFlags, (LPARAM)pBuf);
}
-static int SendChunkA(char *chunk, HCONTACT hContact, char *szSvc, DWORD dwFlags)
+static int SendChunkA(char *chunk, MCONTACT hContact, char *szSvc, DWORD dwFlags)
{
return(CallContactService(hContact, szSvc, dwFlags, (LPARAM)chunk));
}
@@ -154,7 +154,7 @@ static void DoSplitSendW(LPVOID param)
WCHAR *wszSaved, savedChar;
int iCur = 0, iSavedCur = 0, i;
BOOL fSplitting = TRUE;
- HCONTACT hContact = job->hOwner;
+ MCONTACT hContact = job->hOwner;
DWORD dwFlags = job->dwFlags;
int chunkSize = job->chunkSize / 2;
char *szProto = GetContactProto(hContact);
@@ -229,7 +229,7 @@ static void DoSplitSendA(LPVOID param)
char *szBegin, *szTemp, *szSaved, savedChar;
int iLen, iCur = 0, iSavedCur = 0, i;
BOOL fSplitting = TRUE;
- HCONTACT hContact = job->hOwner;
+ MCONTACT hContact = job->hOwner;
DWORD dwFlags = job->dwFlags;
int chunkSize = job->chunkSize;
@@ -322,7 +322,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry)
int iSendLength = getSendLength(iEntry, dat->sendMode);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
CContactCache *c = CContactCache::getContactCache(hContact);
@@ -339,7 +339,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry)
return 0;
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
doSendLater(iEntry, 0, hContact, false);
@@ -804,7 +804,7 @@ LRESULT SendQueue::WarnPendingJobs(unsigned int uNrMessages)
*
* @return the index on success, -1 on failure
*/
-int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, HCONTACT hContact, bool fIsSendLater)
+int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, bool fIsSendLater)
{
bool fAvail = sendLater->isAvail();
diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h
index 38ee818db2..2cccff76f7 100644
--- a/plugins/TabSRMM/src/sendqueue.h
+++ b/plugins/TabSRMM/src/sendqueue.h
@@ -44,7 +44,7 @@ struct SendJob
char *szSendBuffer;
int iSendLength; // length of message in utf-8 octets (used to check maxlen)
int sendCount;
- HCONTACT hOwner;
+ MCONTACT hOwner;
HWND hwndOwner;
unsigned iStatus;
TCHAR szErrorMsg[128];
@@ -92,7 +92,7 @@ public:
void recallFailed(const TWindowData *dat, int iEntry) const;
void showErrorControls(TWindowData *dat, const int showCmd) const;
int ackMessage(TWindowData *dat, WPARAM wParam, LPARAM lParam);
- int doSendLater(int iIndex, TWindowData *dat, HCONTACT hContact = 0, bool fIsSendLater = true);
+ int doSendLater(int iIndex, TWindowData *dat, MCONTACT hContact = 0, bool fIsSendLater = true);
/*
* static members
*/
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp
index 3be0d53a5b..2855d35281 100644
--- a/plugins/TabSRMM/src/sidebar.cpp
+++ b/plugins/TabSRMM/src/sidebar.cpp
@@ -840,7 +840,7 @@ CSideBarButton* CSideBar::findSession(const TWindowData *dat)
* @return CSideBarButtonItem*: pointer to the found item. Zero, if none was found
*/
-CSideBarButton* CSideBar::findSession(const HCONTACT hContact)
+CSideBarButton* CSideBar::findSession(const MCONTACT hContact)
{
if (hContact == NULL)
return NULL;
diff --git a/plugins/TabSRMM/src/sidebar.h b/plugins/TabSRMM/src/sidebar.h
index 74704ea82a..53f69f43eb 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 HCONTACT getContactHandle() const { return(m_dat->hContact); }
+ const MCONTACT getContactHandle() const { return(m_dat->hContact); }
const TWindowData* getDat() const { return(m_dat); }
const TSideBarLayout* getLayout() const { return(m_sideBarLayout); }
@@ -194,7 +194,7 @@ private:
void removeAll();
void Invalidate();
CSideBarButton* findSession(const TWindowData *dat);
- CSideBarButton* findSession(const HCONTACT hContact);
+ CSideBarButton* findSession(const MCONTACT hContact);
LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index 292c70872e..76ce8aeaa0 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -178,7 +178,7 @@ int _DebugTraceA(const char *fmt, ...)
* popup plugin.
*/
-int _DebugPopup(HCONTACT hContact, const TCHAR *fmt, ...)
+int _DebugPopup(MCONTACT hContact, const TCHAR *fmt, ...)
{
va_list va;
TCHAR debug[1024];
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index 8c900a51d6..b32f300735 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -81,7 +81,7 @@ static int helpActive = 0;
* templates
*/
-static void LoadTemplatesFrom(TTemplateSet *tSet, HCONTACT hContact, int rtl)
+static void LoadTemplatesFrom(TTemplateSet *tSet, MCONTACT hContact, int rtl)
{
DBVARIANT dbv = {0};
int i;
diff --git a/plugins/TabSRMM/src/templates.h b/plugins/TabSRMM/src/templates.h
index 505411aadc..3c73aa2966 100644
--- a/plugins/TabSRMM/src/templates.h
+++ b/plugins/TabSRMM/src/templates.h
@@ -31,18 +31,18 @@ struct TemplateEditorInfo
int inEdit; // template currently in editor
BOOL updateInfo[TMPL_ERRMSG + 1]; // item states...
HWND hwndParent;
- HCONTACT hContact;
+ MCONTACT hContact;
};
struct TemplateEditorNew
{
- HCONTACT hContact;
+ MCONTACT hContact;
BOOL rtl;
HWND hwndParent;
};
BOOL CALLBACK DlgProcTemplateEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static void LoadTemplatesFrom(TTemplateSet *tSet, HCONTACT hContact, int rtl);
+static void LoadTemplatesFrom(TTemplateSet *tSet, MCONTACT hContact, int rtl);
void LoadDefaultTemplates();
#define DM_UPDATETEMPLATEPREVIEW (WM_USER + 50)
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp
index b636ae54e6..c495de5f87 100644
--- a/plugins/TabSRMM/src/trayicon.cpp
+++ b/plugins/TabSRMM/src/trayicon.cpp
@@ -231,7 +231,7 @@ void TSAPI FlashTrayIcon(HICON hIcon)
* is deleted, if necessary.
*/
-void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus, WORD wStatus, HICON hIcon, BOOL mode, HMENU hMenu)
+void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus, WORD wStatus, HICON hIcon, BOOL mode, HMENU hMenu)
{
MENUITEMINFO mii = {0};
TCHAR szMenuEntry[80];
@@ -248,7 +248,7 @@ void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, con
szProto = GetContactProto(hContact);
if (szProto) {
if (wStatus == 0)
- wStatus = db_get_w((HCONTACT)hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ wStatus = db_get_w((MCONTACT)hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (szStatus == NULL)
szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
}
@@ -273,7 +273,7 @@ void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, con
UINT uid = GetMenuItemID(hMenu, 0);
if (uid) {
DeleteMenu(hMenu, (UINT_PTR)0, MF_BYPOSITION);
- db_set_dw((HCONTACT)uid, SRMSGMOD_T, "isRecent", 0);
+ db_set_dw((MCONTACT)uid, SRMSGMOD_T, "isRecent", 0);
}
}
addnew:
@@ -324,7 +324,7 @@ void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, con
typedef struct _recentEntry {
DWORD dwTimestamp;
- HCONTACT hContact;
+ MCONTACT hContact;
} RCENTRY;
void TSAPI LoadFavoritesAndRecent()
@@ -336,7 +336,7 @@ void TSAPI LoadFavoritesAndRecent()
if (recentEntries == NULL)
return;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (M.GetByte(hContact, "isFavorite", 0))
AddContactToFavorites(hContact, NULL, NULL, NULL, 0, 0, 1, PluginConfig.g_hMenuFavorites);
if ((dwRecent = M.GetDword(hContact, "isRecent", 0)) != 0 && iIndex < nen_options.wMaxRecent) {
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 937482a3ff..33b12efd28 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -89,7 +89,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM
return DefWindowProc(hWnd, message, wParam, lParam);
}
-void TN_TypingMessage(HCONTACT hContact, int iMode)
+void TN_TypingMessage(MCONTACT hContact, int iMode)
{
// hidden & ignored contacts check
if (db_get_b(hContact, "CList", "Hidden", 0) || (db_get_dw(hContact, "Ignore", "Mask1",0) & 1)) // 9 - online notification
@@ -363,7 +363,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
ppd.lchIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
- ppd.lchContact = (HCONTACT)wParam;
+ ppd.lchContact = (MCONTACT)wParam;
ppd.PluginWindowProc = NULL;
ppd.PluginData = NULL;
PUAddPopupT(&ppd);
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index ac362d93f1..5c3389748d 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -57,13 +57,13 @@ static int have_ieview = 0, have_hpp = 0;
static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG: {
DWORD sCodePage;
int i;
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
DWORD maxhist = M.GetDword(hContact, "maxhist", 0);
BYTE bIEView = M.GetByte(hContact, "ieview", 0);
BYTE bHPP = M.GetByte(hContact, "hpplog", 0);
@@ -362,10 +362,10 @@ int TSAPI LoadLocalFlags(HWND hwnd, TWindowData *dat)
*/
static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact);
SendMessage(hwndDlg, WM_COMMAND, WM_USER + 200, 0);
@@ -457,14 +457,14 @@ static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARA
*/
INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
TCITEM tci;
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact);
WindowList_Add(PluginConfig.hUserPrefsWindowList, hwndDlg, hContact);
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp
index 2d6d5c7f5e..f3e8030417 100644
--- a/plugins/TabSRMM/src/utils.cpp
+++ b/plugins/TabSRMM/src/utils.cpp
@@ -617,7 +617,7 @@ int Utils::RTFColorToIndex(int iCol)
*/
INT_PTR CALLBACK Utils::PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)PUGetPluginData(hWnd);
+ MCONTACT hContact = (MCONTACT)PUGetPluginData(hWnd);
switch (message) {
case WM_COMMAND:
@@ -642,7 +642,7 @@ INT_PTR CALLBACK Utils::PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam
* @param cs TContainerSettings* target structure
* @return 0 on success, 1 failure (blob does not exist OR is not a valid private setting structure
*/
-int Utils::ReadContainerSettingsFromDB(const HCONTACT hContact, TContainerSettings *cs, const char *szKey)
+int Utils::ReadContainerSettingsFromDB(const MCONTACT hContact, TContainerSettings *cs, const char *szKey)
{
CopyMemory(cs, &PluginConfig.globalContainerSettings, sizeof(TContainerSettings));
@@ -664,7 +664,7 @@ int Utils::ReadContainerSettingsFromDB(const HCONTACT hContact, TContainerSettin
return 1;
}
-int Utils::WriteContainerSettingsToDB(const HCONTACT hContact, TContainerSettings *cs, const char *szKey)
+int Utils::WriteContainerSettingsToDB(const MCONTACT hContact, TContainerSettings *cs, const char *szKey)
{
::db_set_blob(hContact, SRMSGMOD_T, szKey ? szKey : CNT_KEYNAME, cs, sizeof(TContainerSettings));
return 0;
@@ -823,7 +823,7 @@ HICON Utils::iconFromAvatar(const TWindowData *dat)
return hIcon;
}
-AVATARCACHEENTRY* Utils::loadAvatarFromAVS(const HCONTACT hContact)
+AVATARCACHEENTRY* Utils::loadAvatarFromAVS(const MCONTACT hContact)
{
if (!ServiceExists(MS_AV_GETAVATARBITMAP))
return 0;
@@ -1336,7 +1336,7 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
if (!(m_dwFlags & MB_YESNO || m_dwFlags & MB_YESNOCANCEL))
::ShowWindow(hwnd, SW_SHOWNORMAL);
- WindowList_Add(hWindowList, hwnd, (HCONTACT)hwnd);
+ WindowList_Add(hWindowList, hwnd, (MCONTACT)hwnd);
}
return TRUE;
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h
index 7e3b56b310..d2edbc9f6e 100644
--- a/plugins/TabSRMM/src/utils.h
+++ b/plugins/TabSRMM/src/utils.h
@@ -76,8 +76,8 @@ public:
static void TSAPI RTF_ColorAdd (const TCHAR *tszColname, size_t length);
static void TSAPI CreateColorMap (TCHAR *Text);
static int TSAPI RTFColorToIndex (int iCol);
- static int TSAPI ReadContainerSettingsFromDB (const HCONTACT hContact, TContainerSettings *cs, const char *szKey = 0);
- static int TSAPI WriteContainerSettingsToDB (const HCONTACT hContact, TContainerSettings *cs, const char *szKey = 0);
+ static int TSAPI ReadContainerSettingsFromDB (const MCONTACT hContact, TContainerSettings *cs, const char *szKey = 0);
+ static int TSAPI WriteContainerSettingsToDB (const MCONTACT hContact, TContainerSettings *cs, const char *szKey = 0);
static void TSAPI SettingsToContainer (TContainerData *pContainer);
static void TSAPI ContainerToSettings (TContainerData *pContainer);
static void TSAPI ReadPrivateContainerSettings (TContainerData *pContainer, bool fForce = false);
@@ -97,7 +97,7 @@ public:
const TCHAR *tszFilename, bool fForceOverwrite);
static void TSAPI scaleAvatarHeightLimited (const HBITMAP hBm, double& dNewWidth, double& dNewHeight, const LONG maxHeight);
- static AVATARCACHEENTRY* TSAPI loadAvatarFromAVS (const HCONTACT hContact);
+ static AVATARCACHEENTRY* TSAPI loadAvatarFromAVS (const MCONTACT hContact);
static void TSAPI sanitizeFilename (wchar_t *tszFilename);
static void TSAPI ensureTralingBackslash (wchar_t *szPathname);