summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/miranda.h6
-rw-r--r--src/core/stdauth/auth.cpp2
-rw-r--r--src/core/stdauth/authdialogs.cpp14
-rw-r--r--src/core/stdaway/awaymsg.cpp14
-rw-r--r--src/core/stdchat/src/window.cpp2
-rw-r--r--src/core/stdclist/src/clistopts.cpp4
-rw-r--r--src/core/stdemail/email.cpp12
-rw-r--r--src/core/stdfile/file.cpp22
-rw-r--r--src/core/stdfile/file.h8
-rw-r--r--src/core/stdfile/filerecvdlg.cpp2
-rw-r--r--src/core/stdmsg/src/cmdlist.cpp4
-rw-r--r--src/core/stdmsg/src/cmdlist.h6
-rw-r--r--src/core/stdmsg/src/globals.cpp4
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp10
-rw-r--r--src/core/stdmsg/src/msglog.cpp4
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp36
-rw-r--r--src/core/stdmsg/src/msgs.h6
-rw-r--r--src/core/stdmsg/src/msgtimedout.cpp2
-rw-r--r--src/core/stdmsg/src/statusicon.cpp8
-rw-r--r--src/core/stdmsg/src/statusicon.h6
-rw-r--r--src/core/stduihist/history.cpp10
-rw-r--r--src/core/stdurl/url.cpp12
-rw-r--r--src/core/stdurl/url.h4
-rw-r--r--src/core/stdurl/urldialogs.cpp4
-rw-r--r--src/core/stduserinfo/contactinfo.cpp4
-rw-r--r--src/core/stduserinfo/stdinfo.cpp26
-rw-r--r--src/core/stduserinfo/userinfo.cpp8
-rw-r--r--src/core/stduseronline/useronline.cpp14
29 files changed, 129 insertions, 129 deletions
diff --git a/src/core/miranda.h b/src/core/miranda.h
index 4af88c8984..29ef7d8509 100644
--- a/src/core/miranda.h
+++ b/src/core/miranda.h
@@ -130,7 +130,7 @@ extern const int statusModeList[ MAX_STATUS_COUNT ];
extern const int skinIconStatusList[ MAX_STATUS_COUNT ];
extern const int skinIconStatusFlags[ MAX_STATUS_COUNT ];
-int TryProcessDoubleClick(HCONTACT hContact);
+int TryProcessDoubleClick(MCONTACT hContact);
void KillModuleMenus(int hLangpack);
@@ -144,7 +144,7 @@ void KillModuleMenus(int hLangpack);
extern LIST<PROTOACCOUNT> accounts;
PROTOACCOUNT* __fastcall Proto_GetAccount(const char* accName);
-PROTOACCOUNT* __fastcall Proto_GetAccount(HCONTACT hContact);
+PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact);
PROTOCOLDESCRIPTOR* __fastcall Proto_IsProtocolLoaded(const char* szProtoName);
bool __fastcall Proto_IsAccountEnabled(PROTOACCOUNT* pa);
@@ -162,7 +162,7 @@ void OpenAccountOptions(PROTOACCOUNT* pa);
void LoadDbAccounts(void);
void WriteDbAccounts(void);
-INT_PTR CallProtoServiceInt(HCONTACT hContact, const char* szModule, const char* szService, WPARAM wParam, LPARAM lParam);
+INT_PTR CallProtoServiceInt(MCONTACT hContact, const char* szModule, const char* szService, WPARAM wParam, LPARAM lParam);
/**** utils.cpp ************************************************************************/
diff --git a/src/core/stdauth/auth.cpp b/src/core/stdauth/auth.cpp
index 14f5723124..d55a16898d 100644
--- a/src/core/stdauth/auth.cpp
+++ b/src/core/stdauth/auth.cpp
@@ -57,7 +57,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam)
dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
db_event_get(hDbEvent, &dbei);
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
CLISTEVENT cli = {0};
cli.cbSize = sizeof(cli);
diff --git a/src/core/stdauth/authdialogs.cpp b/src/core/stdauth/authdialogs.cpp
index d66941dd31..27a5c64107 100644
--- a/src/core/stdauth/authdialogs.cpp
+++ b/src/core/stdauth/authdialogs.cpp
@@ -45,7 +45,7 @@ INT_PTR CALLBACK DlgProcAdded(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
db_event_get(hDbEvent, &dbei);
DWORD uin = *(PDWORD)dbei.pBlob;
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
char* nick = (char*)dbei.pBlob + sizeof(DWORD)*2;
char* first = nick + strlen(nick) + 1;
char* last = first + strlen(first) + 1;
@@ -96,7 +96,7 @@ INT_PTR CALLBACK DlgProcAdded(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA, (LONG_PTR)hContact);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || !db_get_b(hContact, "CList", "NotOnList", 0))
+ if (hContact == INVALID_CONTACT_ID || !db_get_b(hContact, "CList", "NotOnList", 0))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
}
return TRUE;
@@ -111,14 +111,14 @@ INT_PTR CALLBACK DlgProcAdded(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
acs.szProto = "";
CallService(MS_ADDCONTACT_SHOW, (WPARAM)hwndDlg, (LPARAM)&acs);
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
- if ((hContact == (HCONTACT)INVALID_HANDLE_VALUE) || !db_get_b(hContact, "CList", "NotOnList", 0))
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
+ if ((hContact == INVALID_CONTACT_ID) || !db_get_b(hContact, "CList", "NotOnList", 0))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
break;
}
case IDC_DETAILS:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
break;
}
@@ -168,7 +168,7 @@ INT_PTR CALLBACK DlgProcAuthReq(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
db_event_get(hDbEvent, &dbei);
DWORD uin = *(PDWORD)dbei.pBlob;
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
char *nick = (char*)dbei.pBlob + sizeof(DWORD)*2;
char *first = nick + strlen(nick) + 1;
char *last = first + strlen(first) + 1;
@@ -214,7 +214,7 @@ INT_PTR CALLBACK DlgProcAuthReq(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SetDlgItemText(hwndDlg, IDC_HEADERBAR, hdr);
SetDlgItemText(hwndDlg, IDC_REASON, reasonT);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || !db_get_b(hContact, "CList", "NotOnList", 0))
+ if (hContact == INVALID_CONTACT_ID || !db_get_b(hContact, "CList", "NotOnList", 0))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
SendDlgItemMessage(hwndDlg, IDC_DENYREASON, EM_LIMITTEXT, 255, 0);
diff --git a/src/core/stdaway/awaymsg.cpp b/src/core/stdaway/awaymsg.cpp
index cc8427ec72..c7df74e5a8 100644
--- a/src/core/stdaway/awaymsg.cpp
+++ b/src/core/stdaway/awaymsg.cpp
@@ -30,7 +30,7 @@ static HGENMENU hAwayMsgMenuItem;
static HANDLE hWindowList;
struct AwayMsgDlgData {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hSeq;
HANDLE hAwayMsgEvent;
};
@@ -46,7 +46,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
dat->hAwayMsgEvent = HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG);
dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
@@ -77,7 +77,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
ack.result = ACKRESULT_SUCCESS;
SendMessage(hwndDlg, HM_AWAYMSG, 0, (LPARAM)&ack);
}
- Utils_RestoreWindowPosition(hwndDlg, (HCONTACT)lParam, "SRAway", "AwayMsgDlg");
+ Utils_RestoreWindowPosition(hwndDlg, (MCONTACT)lParam, "SRAway", "AwayMsgDlg");
return TRUE;
case HM_AWAYMSG:
@@ -123,7 +123,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM)
{
HWND hwnd;
- if (hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam)) {
+ if (hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam)) {
SetForegroundWindow(hwnd);
SetFocus(hwnd);
}
@@ -134,15 +134,15 @@ static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM)
static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM)
{
TCHAR str[128];
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_HIDDEN | CMIF_TCHAR;
if (szProto != NULL) {
- int chatRoom = szProto ? db_get_b((HCONTACT)wParam, szProto, "ChatRoom", 0) : 0;
+ int chatRoom = szProto ? db_get_b((MCONTACT)wParam, szProto, "ChatRoom", 0) : 0;
if ( !chatRoom) {
- int status = db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ int status = db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
mir_sntprintf(str, SIZEOF(str), TranslateT("Re&ad %s message"), pcli->pfnGetStatusModeDescription(status, 0));
mi.ptszName = str;
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGRECV) {
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp
index 05145007f2..b07d8ffcc7 100644
--- a/src/core/stdchat/src/window.cpp
+++ b/src/core/stdchat/src/window.cpp
@@ -1074,7 +1074,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
return mir_callNextSubclass(hwnd, NicklistSubclassProc, msg, wParam, lParam);
}
-static int RestoreWindowPosition(HWND hwnd, HCONTACT hContact, char * szModule, char * szNamePrefix, UINT showCmd)
+static int RestoreWindowPosition(HWND hwnd, MCONTACT hContact, char * szModule, char * szNamePrefix, UINT showCmd)
{
WINDOWPLACEMENT wp;
wp.length = sizeof(wp);
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp
index 6dc2d88deb..ee90165e6c 100644
--- a/src/core/stdclist/src/clistopts.cpp
+++ b/src/core/stdclist/src/clistopts.cpp
@@ -28,7 +28,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
switch (msg) {
case WM_USER + 1:
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *) lParam;
if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL &&
lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg))
@@ -222,7 +222,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
pcli->pfnTrayIconIconsChanged();
pcli->pfnLoadContactTree(); /* this won't do job properly since it only really works when changes happen */
- pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)INVALID_HANDLE_VALUE); /* force reshuffle */
+ pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID); /* force reshuffle */
return TRUE;
}
break;
diff --git a/src/core/stdemail/email.cpp b/src/core/stdemail/email.cpp
index 537f40e7df..9c8f1eeafe 100644
--- a/src/core/stdemail/email.cpp
+++ b/src/core/stdemail/email.cpp
@@ -35,9 +35,9 @@ void SendEmailThread(void *szUrl)
static INT_PTR SendEMailCommand(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
- char *szProto = GetContactProto((HCONTACT)wParam);
- if (szProto == NULL || db_get_s((HCONTACT)wParam, szProto, "e-mail", &dbv)) {
- if (db_get_s((HCONTACT)wParam, "UserInfo", "Mye-mail0", &dbv)) {
+ char *szProto = GetContactProto((MCONTACT)wParam);
+ if (szProto == NULL || db_get_s((MCONTACT)wParam, szProto, "e-mail", &dbv)) {
+ if (db_get_s((MCONTACT)wParam, "UserInfo", "Mye-mail0", &dbv)) {
MessageBox((HWND)lParam, TranslateT("User has not registered an e-mail address"), TranslateT("Send e-mail"), MB_OK);
return 1;
}
@@ -54,9 +54,9 @@ static int EMailPreBuildMenu(WPARAM wParam, LPARAM)
{
bool bEnabled = true;
DBVARIANT dbv = { 0 };
- char *szProto = GetContactProto((HCONTACT)wParam);
- if (szProto == NULL || db_get_s((HCONTACT)wParam, szProto, "e-mail", &dbv))
- if (db_get_s((HCONTACT)wParam, "UserInfo", "Mye-mail0", &dbv))
+ char *szProto = GetContactProto((MCONTACT)wParam);
+ if (szProto == NULL || db_get_s((MCONTACT)wParam, szProto, "e-mail", &dbv))
+ if (db_get_s((MCONTACT)wParam, "UserInfo", "Mye-mail0", &dbv))
bEnabled = false;
Menu_ShowItem(hEMailMenuItem, bEnabled);
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp
index 7cf600a641..9bc353b73d 100644
--- a/src/core/stdfile/file.cpp
+++ b/src/core/stdfile/file.cpp
@@ -30,7 +30,7 @@ int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHAR
static HGENMENU hSRFileMenuItem;
-TCHAR *GetContactID(HCONTACT hContact)
+TCHAR *GetContactID(MCONTACT hContact)
{
TCHAR *theValue = {0};
char *szProto = GetContactProto(hContact);
@@ -62,7 +62,7 @@ TCHAR *GetContactID(HCONTACT hContact)
static INT_PTR SendFileCommand(WPARAM wParam, LPARAM)
{
struct FileSendData fsd;
- fsd.hContact = (HCONTACT)wParam;
+ fsd.hContact = (MCONTACT)wParam;
fsd.ppFiles = NULL;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
@@ -71,7 +71,7 @@ static INT_PTR SendFileCommand(WPARAM wParam, LPARAM)
static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam)
{
FileSendData fsd;
- fsd.hContact = (HCONTACT)wParam;
+ fsd.hContact = (MCONTACT)wParam;
char** ppFiles = (char**)lParam;
int count = 0;
@@ -92,7 +92,7 @@ static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam)
static INT_PTR SendSpecificFilesT(WPARAM wParam, LPARAM lParam)
{
FileSendData fsd;
- fsd.hContact = (HCONTACT)wParam;
+ fsd.hContact = (MCONTACT)wParam;
fsd.ppFiles = (const TCHAR**)lParam;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
@@ -101,7 +101,7 @@ static INT_PTR SendSpecificFilesT(WPARAM wParam, LPARAM lParam)
static INT_PTR GetReceivedFilesFolder(WPARAM wParam, LPARAM lParam)
{
TCHAR buf[MAX_PATH];
- GetContactReceivedFilesDir((HCONTACT)wParam, buf, MAX_PATH, TRUE);
+ GetContactReceivedFilesDir((MCONTACT)wParam, buf, MAX_PATH, TRUE);
char* dir = mir_t2a(buf);
lstrcpynA((char*)lParam, dir, MAX_PATH);
mir_free(dir);
@@ -114,7 +114,7 @@ static INT_PTR RecvFileCommand(WPARAM, LPARAM lParam)
return 0;
}
-void PushFileEvent(HCONTACT hContact, HANDLE hdbe, LPARAM lParam)
+void PushFileEvent(MCONTACT hContact, HANDLE hdbe, LPARAM lParam)
{
CLISTEVENT cle = {0};
cle.cbSize = sizeof(cle);
@@ -148,7 +148,7 @@ static int FileEventAdded(WPARAM wParam, LPARAM lParam)
if (dbei.flags & (DBEF_SENT|DBEF_READ) || dbei.eventType != EVENTTYPE_FILE || dwSignature == 0)
return 0;
- PushFileEvent((HCONTACT)wParam, (HANDLE)lParam, 0);
+ PushFileEvent((MCONTACT)wParam, (HANDLE)lParam, 0);
return 0;
}
@@ -288,7 +288,7 @@ void UpdateProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANS
static void RemoveUnreadFileEvents(void)
{
- 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 hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -303,12 +303,12 @@ static void RemoveUnreadFileEvents(void)
static int SRFilePreBuildMenu(WPARAM wParam, LPARAM)
{
bool bEnabled = false;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto != NULL) {
if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
bEnabled = true;
- else if (db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ else if (db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
bEnabled = true;
}
}
@@ -339,7 +339,7 @@ INT_PTR FtMgrShowCommand(WPARAM, LPARAM)
INT_PTR openContRecDir(WPARAM wparam, LPARAM)
{
TCHAR szContRecDir[MAX_PATH];
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
GetContactReceivedFilesDir(hContact, szContRecDir, SIZEOF(szContRecDir), TRUE);
ShellExecute(0, _T("open"), szContRecDir, 0, 0, SW_SHOW);
return 0;
diff --git a/src/core/stdfile/file.h b/src/core/stdfile/file.h
index aa390a774a..2c21d5987f 100644
--- a/src/core/stdfile/file.h
+++ b/src/core/stdfile/file.h
@@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define M_PRESHUTDOWN (WM_USER+201)
struct FileSendData {
- HCONTACT hContact;
+ MCONTACT hContact;
const TCHAR **ppFiles;
};
@@ -46,7 +46,7 @@ struct FileSendData {
struct FileDlgData {
HWND hwndTransfer;
HANDLE fs;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent;
HANDLE hNotifyEvent;
TCHAR **files;
@@ -85,7 +85,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void RemoveInvalidFilenameChars(TCHAR *tszString);
void RemoveInvalidPathChars(TCHAR *tszString);
-void GetContactReceivedFilesDir(HCONTACT hContact, TCHAR *szDir, int cchDir, BOOL substVars);
+void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOOL substVars);
void GetReceivedFilesDir(TCHAR *szDir, int cchDir);
int BrowseForFolder(HWND hwnd, TCHAR *szPath);
//fileexistsdlg.c
@@ -113,4 +113,4 @@ HWND FtMgr_AddTransfer(struct FileDlgData *dat);
void FreeFileDlgData(FileDlgData* dat);
-TCHAR *GetContactID(HCONTACT hContact);
+TCHAR *GetContactID(MCONTACT hContact);
diff --git a/src/core/stdfile/filerecvdlg.cpp b/src/core/stdfile/filerecvdlg.cpp
index b98aa94ea6..f2f19d5ded 100644
--- a/src/core/stdfile/filerecvdlg.cpp
+++ b/src/core/stdfile/filerecvdlg.cpp
@@ -131,7 +131,7 @@ static void patchDir(TCHAR *str, size_t strSize)
lstrcpy(str+len, _T("\\"));
}
-void GetContactReceivedFilesDir(HCONTACT hContact, TCHAR *szDir, int cchDir, BOOL patchVars)
+void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOOL patchVars)
{
DBVARIANT dbv;
TCHAR szTemp[MAX_PATH];
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp
index 90be69418b..b4a326a5b3 100644
--- a/src/core/stdmsg/src/cmdlist.cpp
+++ b/src/core/stdmsg/src/cmdlist.cpp
@@ -89,7 +89,7 @@ static VOID CALLBACK MsgTimer(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTi
MessageFailureProcess(tmlst[i], LPGEN("The message send timed out."));
}
-void msgQueue_add(HCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent)
+void msgQueue_add(MCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent)
{
TMsgQueue *item = (TMsgQueue*)mir_alloc(sizeof(TMsgQueue));
item->hContact = hContact;
@@ -106,7 +106,7 @@ void msgQueue_add(HCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent
}
-void msgQueue_processack(HCONTACT hContact, int id, BOOL success, const char* szErr)
+void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char* szErr)
{
int i;
TMsgQueue* item = NULL;
diff --git a/src/core/stdmsg/src/cmdlist.h b/src/core/stdmsg/src/cmdlist.h
index c82cf41666..66d273617c 100644
--- a/src/core/stdmsg/src/cmdlist.h
+++ b/src/core/stdmsg/src/cmdlist.h
@@ -38,15 +38,15 @@ __inline TCHAR* tcmdlist_getitem(SortedList *list, int ind)
typedef struct _TMsgQueue
{
int id;
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR* szMsg;
HANDLE hDbEvent;
unsigned ts;
}
TMsgQueue;
-void msgQueue_add(HCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent);
-void msgQueue_processack(HCONTACT hContact, int id, BOOL success, const char* szErr);
+void msgQueue_add(MCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent);
+void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char* szErr);
void msgQueue_init(void);
void msgQueue_destroy(void);
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp
index 15d5bc126a..71af89163b 100644
--- a/src/core/stdmsg/src/globals.cpp
+++ b/src/core/stdmsg/src/globals.cpp
@@ -121,7 +121,7 @@ void ReloadGlobals()
static int dbaddedevent(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (h)
@@ -144,7 +144,7 @@ static int ackevent(WPARAM wParam, LPARAM lParam)
int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (h) SendMessage(h, HM_AVATARACK, wParam, lParam);
return 0;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 1861bf13af..23a16cc783 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -41,7 +41,7 @@ static const UINT infoLineControls[] = { IDC_PROTOCOL, IDC_NAME };
static const UINT buttonLineControls[] = { IDC_ADD, IDC_USERMENU, IDC_DETAILS, IDC_HISTORY };
static const UINT sendControls[] = { IDC_MESSAGE };
-static void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type)
+static void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type)
{
if (hContact == NULL || hwnd == NULL)
return;
@@ -58,7 +58,7 @@ static void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type)
NotifyEventHooks(hHookWinEvt, 0, (LPARAM)&mwe);
}
-static BOOL IsUtfSendAvailable(HCONTACT hContact)
+static BOOL IsUtfSendAvailable(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if ( szProto == NULL )
@@ -80,7 +80,7 @@ static int RTL_Detect(const TCHAR *ptszText)
return 0;
}
-HANDLE SendMessageDirect(const TCHAR *szMsg, HCONTACT hContact, char *szProto)
+HANDLE SendMessageDirect(const TCHAR *szMsg, MCONTACT hContact, char *szProto)
{
if (hContact == NULL)
return NULL;
@@ -1308,7 +1308,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
break;
case HM_DBEVENTADDED:
- if ((HCONTACT)wParam == dat->hContact) {
+ if ((MCONTACT)wParam == dat->hContact) {
HANDLE hDbEvent = (HANDLE)lParam;
if (dat->hDbEventFirst == NULL)
dat->hDbEventFirst = hDbEvent;
@@ -1751,7 +1751,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (hFont != NULL && hFont != (HFONT)SendDlgItemMessage(hwndDlg, IDOK, WM_GETFONT, 0, 0))
DeleteObject(hFont);
- HCONTACT hContact;
+ MCONTACT hContact;
if (db_get_b(NULL, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT))
hContact = dat->hContact;
else
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index 4775242489..1aedcf4640 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -37,7 +37,7 @@ static int logIconBmpSize[ SIZEOF(pLogIconBmpBits) ];
struct LogStreamData
{
int stage;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent, hDbEventLast;
char *buffer;
int bufferOffset, bufferLen;
@@ -263,7 +263,7 @@ int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat)
}
//mir_free() the return value
-static char *CreateRTFFromDbEvent(SrmmWindowData *dat, HCONTACT hContact, HANDLE hDbEvent, struct LogStreamData *streamData)
+static char *CreateRTFFromDbEvent(SrmmWindowData *dat, MCONTACT hContact, HANDLE hDbEvent, struct LogStreamData *streamData)
{
char *buffer;
int bufferAlloced, bufferEnd;
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 511de0a1f1..21728424bb 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -449,7 +449,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
if (hItemUnknown && db_get_b(NULL, SRMMMOD, 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, SRMMMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM) hItem, 1);
@@ -464,7 +464,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
if (hItemUnknown)
db_set_b(NULL, SRMMMOD, 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, SRMMMOD, SRMSGSET_TYPING, (BYTE) (SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM) hItem, 0) ? 1 : 0));
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 256790d429..c448ec70f5 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -59,7 +59,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM) 1);
/* does a window for the contact exist? */
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd) {
if (!db_get_b(NULL, SRMMMOD, SRMSGSET_DONOTSTEALFOCUS, SRMSGDEFSET_DONOTSTEALFOCUS)) {
ShowWindow(hwnd, SW_RESTORE);
@@ -78,10 +78,10 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
/* new message */
SkinPlaySound("AlertMsg");
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto && (g_dat.openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0)))) {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = (HCONTACT)wParam;
+ newData.hContact = (MCONTACT)wParam;
newData.noActivate = db_get_b(NULL, SRMMMOD, SRMSGSET_DONOTSTEALFOCUS, SRMSGDEFSET_DONOTSTEALFOCUS);
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), NULL, DlgProcMessage, (LPARAM)&newData);
return 0;
@@ -89,21 +89,21 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
TCHAR toolTip[256], *contactName;
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)lParam;
cle.flags = CLEF_TCHAR;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- contactName = pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0);
+ contactName = pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0);
mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), contactName);
cle.ptszTooltip = toolTip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
return 0;
}
-INT_PTR SendMessageCmd(HCONTACT hContact, char* msg, int isWchar)
+INT_PTR SendMessageCmd(MCONTACT hContact, char* msg, int isWchar)
{
- /* does the HCONTACT's protocol support IM messages? */
+ /* does the MCONTACT's protocol support IM messages? */
char *szProto = GetContactProto(hContact);
if (!szProto || (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
return 1;
@@ -135,12 +135,12 @@ INT_PTR SendMessageCmd(HCONTACT hContact, char* msg, int isWchar)
static INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
{
- return SendMessageCmd((HCONTACT)wParam, (char*)lParam, TRUE);
+ return SendMessageCmd((MCONTACT)wParam, (char*)lParam, TRUE);
}
static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
{
- return SendMessageCmd((HCONTACT)wParam, (char*)lParam, FALSE);
+ return SendMessageCmd((MCONTACT)wParam, (char*)lParam, FALSE);
}
static INT_PTR ReadMessageCommand(WPARAM wParam, LPARAM lParam)
@@ -159,12 +159,12 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
SkinPlaySound((lParam) ? "TNStart" : "TNStop");
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd)
SendMessage(hwnd, DM_TYPING, 0, lParam);
else if (lParam && (g_dat.flags & SMF_SHOWTYPINGTRAY)) {
TCHAR szTip[256];
- mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0));
+ mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0));
if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags&SMF_SHOWTYPINGCLIST)) {
MIRANDASYSTRAYNOTIFY tn = { sizeof(tn) };
@@ -177,7 +177,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
}
else {
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = LoadSkinnedIcon( SKINICON_OTHER_TYPING );
@@ -194,7 +194,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (cws->szModule == NULL) return 0;
@@ -204,7 +204,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
if (cws->szSetting && !strcmp(cws->szSetting, "Timezone"))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_NEWTIMEZONE, (WPARAM) cws, 0);
else {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto && !strcmp(cws->szModule, szProto))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM) cws, 0);
}
@@ -215,7 +215,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
static int ContactDeleted(WPARAM wParam, LPARAM lParam)
{
HWND hwnd;
- if (hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam))
+ if (hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam))
SendMessage(hwnd, WM_CLOSE, 0, 0);
return 0;
@@ -235,7 +235,7 @@ static void RestoreUnreadMessageAlerts(void)
DBEVENTINFO dbei = { sizeof(dbei) };
- 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 hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
autoPopup = 0;
@@ -315,7 +315,7 @@ static int IconsChanged(WPARAM, LPARAM)
static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
bool bEnabled = false;
char *szProto = GetContactProto(hContact);
@@ -346,7 +346,7 @@ static INT_PTR GetWindowClass(WPARAM wParam, LPARAM lParam)
static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
{
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd == NULL)
return 1;
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h
index 29cbf7520e..c2f4d36e63 100644
--- a/src/core/stdmsg/src/msgs.h
+++ b/src/core/stdmsg/src/msgs.h
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct NewMessageWindowLParam
{
- HCONTACT hContact;
+ MCONTACT hContact;
const char *szInitialText;
int isWchar;
int noActivate;
@@ -35,7 +35,7 @@ struct NewMessageWindowLParam
struct SrmmWindowData
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEventFirst, hDbEventLast;
HBRUSH hBkgBrush;
int splitterPos, originalSplitterPos;
@@ -117,7 +117,7 @@ INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
int DbEventIsForMsgWindow(DBEVENTINFO *dbei);
int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat);
void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend);
-HANDLE SendMessageDirect(const TCHAR *szMsg, HCONTACT hContact, char *szProto);
+HANDLE SendMessageDirect(const TCHAR *szMsg, MCONTACT hContact, char *szProto);
void LoadMsgLogIcons(void);
void FreeMsgLogIcons(void);
diff --git a/src/core/stdmsg/src/msgtimedout.cpp b/src/core/stdmsg/src/msgtimedout.cpp
index f8c8b82f49..b42875447f 100644
--- a/src/core/stdmsg/src/msgtimedout.cpp
+++ b/src/core/stdmsg/src/msgtimedout.cpp
@@ -28,7 +28,7 @@ typedef struct
TMsgQueue *item;
} ErrorDlgParam;
-INT_PTR SendMessageCmd(HCONTACT hContact, char* msg, int isWchar);
+INT_PTR SendMessageCmd(MCONTACT hContact, char* msg, int isWchar);
INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
diff --git a/src/core/stdmsg/src/statusicon.cpp b/src/core/stdmsg/src/statusicon.cpp
index 060f950aa0..e969085c22 100644
--- a/src/core/stdmsg/src/statusicon.cpp
+++ b/src/core/stdmsg/src/statusicon.cpp
@@ -26,7 +26,7 @@ HANDLE hHookIconPressedEvt;
static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
WindowList_Broadcast(g_dat.hMessageWindowList, DM_STATUSICONCHANGE, 0, 0);
else {
@@ -37,7 +37,7 @@ static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
return 0;
}
-void DrawStatusIcons(HCONTACT hContact, HDC hDC, RECT r, int gap)
+void DrawStatusIcons(MCONTACT hContact, HDC hDC, RECT r, int gap)
{
HICON hIcon;
int x = r.left;
@@ -55,7 +55,7 @@ void DrawStatusIcons(HCONTACT hContact, HDC hDC, RECT r, int gap)
}
}
-void CheckIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
+void CheckIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
{
int iconNum = (pt.x - r.left) / (GetSystemMetrics(SM_CXSMICON) + gap);
StatusIconData *sid = Srmm_GetNthIcon(hContact, iconNum);
@@ -88,7 +88,7 @@ int DeinitStatusIcons()
return 0;
}
-int GetStatusIconsCount(HCONTACT hContact)
+int GetStatusIconsCount(MCONTACT hContact)
{
int nIcon = 0;
while ( Srmm_GetNthIcon(hContact, nIcon) != NULL)
diff --git a/src/core/stdmsg/src/statusicon.h b/src/core/stdmsg/src/statusicon.h
index 2da94eab1a..8afbbfb0bb 100644
--- a/src/core/stdmsg/src/statusicon.h
+++ b/src/core/stdmsg/src/statusicon.h
@@ -7,8 +7,8 @@ extern int status_icon_list_size;
int InitStatusIcons();
int DeinitStatusIcons();
-int GetStatusIconsCount(HCONTACT hContact);
-void DrawStatusIcons(HCONTACT hContact, HDC hdc, RECT r, int gap);
-void CheckIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int flags);
+int GetStatusIconsCount(MCONTACT hContact);
+void DrawStatusIcons(MCONTACT hContact, HDC hdc, RECT r, int gap);
+void CheckIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int flags);
#endif
diff --git a/src/core/stduihist/history.cpp b/src/core/stduihist/history.cpp
index 0978f94731..6f88f3200d 100644
--- a/src/core/stduihist/history.cpp
+++ b/src/core/stduihist/history.cpp
@@ -135,7 +135,7 @@ static void GetObjectSummary(DBEVENTINFO *dbei, TCHAR* str, int cbStr)
}
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hwnd;
} THistoryThread;
@@ -201,12 +201,12 @@ static int HistoryDlgResizer(HWND, LPARAM, UTILRESIZECONTROL *urc)
static INT_PTR CALLBACK DlgProcHistory(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:
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
WindowList_Add(hWindowList, hwndDlg, hContact);
Utils_RestoreWindowPosition(hwndDlg, hContact, "History", "");
{
@@ -376,7 +376,7 @@ static INT_PTR CALLBACK DlgProcHistoryFind(HWND hwndDlg, UINT msg, WPARAM wParam
static INT_PTR UserHistoryCommand(WPARAM wParam, LPARAM)
{
- HWND hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam);
if (hwnd) {
SetForegroundWindow(hwnd);
SetFocus(hwnd);
@@ -388,7 +388,7 @@ static INT_PTR UserHistoryCommand(WPARAM wParam, LPARAM)
static int HistoryContactDelete(WPARAM wParam, LPARAM)
{
- HWND hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam);
if (hwnd != NULL)
DestroyWindow(hwnd);
return 0;
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp
index 12e7137c67..4fbd2bbf6c 100644
--- a/src/core/stdurl/url.cpp
+++ b/src/core/stdurl/url.cpp
@@ -49,11 +49,11 @@ static int UrlEventAdded(WPARAM wParam, LPARAM lParam)
SkinPlaySound("RecvUrl");
TCHAR szTooltip[256];
- mir_sntprintf(szTooltip, SIZEOF(szTooltip), TranslateT("URL from %s"), pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0));
+ mir_sntprintf(szTooltip, SIZEOF(szTooltip), TranslateT("URL from %s"), pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0));
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)lParam;
cle.hIcon = LoadSkinIcon(SKINICON_EVENT_URL);
cle.pszService = "SRUrl/ReadUrl";
@@ -75,7 +75,7 @@ static void RestoreUnreadUrlAlerts(void)
cle.pszService = "SRUrl/ReadUrl";
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)) {
HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -97,7 +97,7 @@ static void RestoreUnreadUrlAlerts(void)
static int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto)))
return 0;
@@ -108,7 +108,7 @@ static int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
static int SRUrlPreBuildMenu(WPARAM wParam, LPARAM)
{
bool bEnabled = false;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto != NULL)
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_URLSEND)
bEnabled = true;
@@ -147,7 +147,7 @@ static int SRUrlShutdown(WPARAM, LPARAM)
int UrlContactDeleted(WPARAM wParam, LPARAM)
{
- HWND h = WindowList_Find(hUrlWindowList, (HCONTACT)wParam);
+ HWND h = WindowList_Find(hUrlWindowList, (MCONTACT)wParam);
if (h)
SendMessage(h, WM_CLOSE, 0, 0);
diff --git a/src/core/stdurl/url.h b/src/core/stdurl/url.h
index 075f14ecbb..dd8b2eda0f 100644
--- a/src/core/stdurl/url.h
+++ b/src/core/stdurl/url.h
@@ -29,12 +29,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define DDEMESSAGETIMEOUT 1000
struct UrlRcvData {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent;
};
struct UrlSendData {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hSendId;
HANDLE hAckEvent;
char *sendBuffer;
diff --git a/src/core/stdurl/urldialogs.cpp b/src/core/stdurl/urldialogs.cpp
index 9a654fa9ff..c541825d9f 100644
--- a/src/core/stdurl/urldialogs.cpp
+++ b/src/core/stdurl/urldialogs.cpp
@@ -28,7 +28,7 @@ INT_PTR CALLBACK DlgProcUrlSend(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
extern HANDLE hUrlWindowList;
-static void sttUpdateTitle(HWND hwndDlg, HCONTACT hContact)
+static void sttUpdateTitle(HWND hwndDlg, MCONTACT hContact)
{
TCHAR newtitle[256], oldtitle[256];
TCHAR *szStatus, *contactName, *pszNewTitleStart = TranslateT("Send URL to");
@@ -467,7 +467,7 @@ INT_PTR CALLBACK DlgProcUrlSend(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_LIMITTEXT, 450, 0);
dat = (struct UrlSendData*)mir_alloc(sizeof(struct UrlSendData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
dat->hAckEvent = NULL;
dat->hSendId = NULL;
dat->sendBuffer = NULL;
diff --git a/src/core/stduserinfo/contactinfo.cpp b/src/core/stduserinfo/contactinfo.cpp
index fd38ad1758..59d9bc93c3 100644
--- a/src/core/stduserinfo/contactinfo.cpp
+++ b/src/core/stduserinfo/contactinfo.cpp
@@ -252,7 +252,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case M_REMAKELISTS:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -436,7 +436,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
NMLISTVIEW *nm = (NMLISTVIEW*)lParam;
LVITEM lvi;
TCHAR szEmail[256];
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
char *szIdTemplate = (nm->hdr.idFrom == IDC_PHONES) ? "MyPhone%d" : "Mye-mail%d";
LVHITTESTINFO hti;
diff --git a/src/core/stduserinfo/stdinfo.cpp b/src/core/stduserinfo/stdinfo.cpp
index ac02608694..4e65815d98 100644
--- a/src/core/stduserinfo/stdinfo.cpp
+++ b/src/core/stduserinfo/stdinfo.cpp
@@ -35,7 +35,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
#define SVS_SIGNED 6
#define SVS_TIMEZONE 7
-static int Proto_GetContactInfoSetting(HCONTACT hContact, const char *szProto, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType)
+static int Proto_GetContactInfoSetting(MCONTACT hContact, const char *szProto, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType)
{
DBCONTACTGETSETTING cgs = {szModule, szSetting, dbv};
dbv->type = (BYTE)nType;
@@ -64,7 +64,7 @@ static void Proto_FreeInfoVariant(DBVARIANT *dbv)
dbv->type = 0;
}
-static void SetValue(HWND hwndDlg, int idCtrl, HCONTACT hContact, char *szModule, char *szSetting, int special)
+static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule, char *szSetting, int special)
{
char str[80], *pstr = NULL;
TCHAR* ptstr = NULL;
@@ -194,7 +194,7 @@ static INT_PTR CALLBACK SummaryDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) {
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -244,13 +244,13 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
TranslateDialogDefault(hwndDlg);
SetTimer(hwndDlg, 1, 1000, NULL);
- tmi.prepareList((HCONTACT)lParam, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
+ tmi.prepareList((MCONTACT)lParam, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
SendMessage(hwndDlg, WM_TIMER, 0, 0);
break;
case WM_TIMER:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (hContact != NULL) {
TCHAR szTime[80];
if (tmi.printDateTimeByContact(hContact, _T("s"), szTime, SIZEOF(szTime), TZF_KNOWNONLY)) {
@@ -269,7 +269,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) {
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -297,7 +297,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
case IDC_TIMEZONESELECT:
if (HIWORD(wParam) == CBN_SELCHANGE) {
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
tmi.storeListResults(hContact, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
@@ -319,7 +319,7 @@ static INT_PTR CALLBACK WorkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) {
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL) break;
@@ -395,7 +395,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
int i;
char idstr[33];
DBVARIANT dbv, dbvText;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
@@ -522,7 +522,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
hFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hwndDlg, IDC_ABOUT, WM_SETFONT, (WPARAM) hFont, MAKELPARAM(TRUE, 0));
- if (!db_get_s((HCONTACT)lParam, "UserInfo", "MyNotes", &dbv)) {
+ if (!db_get_s((MCONTACT)lParam, "UserInfo", "MyNotes", &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_MYNOTES, dbv.pszVal);
db_free(&dbv);
}
@@ -535,7 +535,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
switch (((LPNMHDR)lParam)->code) {
case PSN_INFOCHANGED:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto != NULL)
@@ -545,7 +545,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
break;
case PSN_APPLY:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MYNOTES))) {
char text[2048];
GetDlgItemTextA(hwndDlg, IDC_MYNOTES, text, SIZEOF(text));
@@ -579,7 +579,7 @@ int DetailsInit(WPARAM wParam, LPARAM lParam)
if (lParam == NULL)
return 0;
- if (GetContactProto((HCONTACT)lParam) == 0)
+ if (GetContactProto((MCONTACT)lParam) == 0)
return 0;
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/src/core/stduserinfo/userinfo.cpp b/src/core/stduserinfo/userinfo.cpp
index d7312c0134..61248a0751 100644
--- a/src/core/stduserinfo/userinfo.cpp
+++ b/src/core/stduserinfo/userinfo.cpp
@@ -51,7 +51,7 @@ struct DetailsPageData
struct DetailsData
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hProtoAckEvent;
HINSTANCE hInstIcmp;
HFONT hBoldFont;
@@ -95,7 +95,7 @@ static int PageSortProc(OPTIONSDIALOGPAGE *item1, OPTIONSDIALOGPAGE *item2)
static INT_PTR ShowDetailsDialogCommand(WPARAM wParam, LPARAM)
{
HWND hwnd;
- if (hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam)) {
+ if (hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam)) {
SetForegroundWindow(hwnd);
SetFocus(hwnd);
return 0;
@@ -222,7 +222,7 @@ static void CreateDetailsPageWindow(HWND hwndDlg, DetailsData *dat, DetailsPageD
static int UserInfoContactDelete(WPARAM wParam, LPARAM)
{
- HWND hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam);
if (hwnd != NULL)
DestroyWindow(hwnd);
return 0;
@@ -245,7 +245,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP
PROPSHEETHEADER *psh = (PROPSHEETHEADER*)lParam;
dat = (DetailsData*)mir_calloc(sizeof(DetailsData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HCONTACT)psh->pszCaption;
+ dat->hContact = (MCONTACT)psh->pszCaption;
dat->hProtoAckEvent = HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_PROTOACK);
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
diff --git a/src/core/stduseronline/useronline.cpp b/src/core/stduseronline/useronline.cpp
index 90881b1e4b..188999dcfe 100644
--- a/src/core/stduseronline/useronline.cpp
+++ b/src/core/stduseronline/useronline.cpp
@@ -38,17 +38,17 @@ static int UserOnlineSettingChanged(WPARAM wParam, LPARAM lParam)
return 0;
int newStatus = cws->value.wVal;
- int oldStatus = db_get_w((HCONTACT)wParam, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
- db_set_w((HCONTACT)wParam, "UserOnline", "OldStatus", (WORD)newStatus);
+ int oldStatus = db_get_w((MCONTACT)wParam, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
+ db_set_w((MCONTACT)wParam, "UserOnline", "OldStatus", (WORD)newStatus);
if (CallService(MS_IGNORE_ISIGNORED, wParam, IGNOREEVENT_USERONLINE)) return 0;
- if (db_get_b((HCONTACT)wParam, "CList", "Hidden", 0)) return 0;
+ if (db_get_b((MCONTACT)wParam, "CList", "Hidden", 0)) return 0;
if (newStatus == ID_STATUS_OFFLINE && oldStatus != ID_STATUS_OFFLINE) {
// Remove the event from the queue if it exists since they are now offline
- int lastEvent = (int)db_get_dw((HCONTACT)wParam, "UserOnline", "LastEvent", 0);
+ int lastEvent = (int)db_get_dw((MCONTACT)wParam, "UserOnline", "LastEvent", 0);
if (lastEvent) {
CallService(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)lastEvent);
- db_set_dw((HCONTACT)wParam, "UserOnline", "LastEvent", 0);
+ db_set_dw((MCONTACT)wParam, "UserOnline", "LastEvent", 0);
}
}
if ((newStatus == ID_STATUS_ONLINE || newStatus == ID_STATUS_FREECHAT) &&
@@ -63,11 +63,11 @@ static int UserOnlineSettingChanged(WPARAM wParam, LPARAM lParam)
ZeroMemory(&cle, sizeof(cle));
cle.cbSize = sizeof(cle);
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)(uniqueEventId++);
cle.hIcon = LoadSkinIcon(SKINICON_OTHER_USERONLINE, false);
cle.pszService = "UserOnline/Description";
- mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0));
+ mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0));
cle.ptszTooltip = tooltip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
IcoLib_ReleaseIcon(cle.hIcon, 0);