diff options
Diffstat (limited to 'plugins/FavContacts/src/main.cpp')
-rw-r--r-- | plugins/FavContacts/src/main.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index 4982a7fcb9..ee53ee1b06 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -75,7 +75,7 @@ TCHAR g_filter[1024] = {0}; Options g_Options = {0};
static HANDLE hDialogsList = NULL;
-static HCONTACT hContactToActivate = NULL;
+static MCONTACT hContactToActivate = NULL;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
@@ -248,7 +248,7 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam) Hotkey_Register(&hotkey);
if (ServiceExists(MS_AV_GETAVATARBITMAP)) {
- 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_b(hContact, "FavContacts", "IsFavourite", 0))
CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
}
@@ -387,7 +387,7 @@ static BOOL sttMeasureItem_Group(LPMEASUREITEMSTRUCT lpmis, Options *options) static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
{
- HCONTACT hContact = (HCONTACT)lpmis->itemData;
+ MCONTACT hContact = (MCONTACT)lpmis->itemData;
lpmis->itemHeight = 4;
lpmis->itemWidth = 8+10;
@@ -525,7 +525,7 @@ void ImageList_DrawDimmed(HIMAGELIST himl, int i, HDC hdc, int left, int top, UI static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
{
- HCONTACT hContact = (HCONTACT)lpdis->itemData;
+ MCONTACT hContact = (MCONTACT)lpdis->itemData;
HDC hdcTemp = CreateCompatibleDC(lpdis->hDC);
HBITMAP hbmTemp = CreateCompatibleBitmap(lpdis->hDC, lpdis->rcItem.right-lpdis->rcItem.left, lpdis->rcItem.bottom-lpdis->rcItem.top);
@@ -703,7 +703,7 @@ static BOOL sttDrawItem(LPDRAWITEMSTRUCT lpdis, Options *options=NULL) static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- static HCONTACT hContact = NULL;
+ static MCONTACT hContact = NULL;
switch (message) {
case WM_MEASUREITEM:
@@ -749,7 +749,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, int nRecent = 0;
int maxRecent = g_Options.wMaxRecent ? g_Options.wMaxRecent : 10;
for (int i = 0; nRecent < maxRecent; ++i) {
- HCONTACT hContact = g_contactCache->get(i);
+ MCONTACT hContact = g_contactCache->get(i);
if (!hContact) break;
if (!g_contactCache->filter(i, g_filter)) continue;
@@ -764,7 +764,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_DATA;
GetMenuItemInfo((HMENU)lParam, wParam, TRUE, &mii);
- HCONTACT hContact = (HCONTACT)mii.dwItemData;
+ MCONTACT hContact = (MCONTACT)mii.dwItemData;
if (!CallService(MS_DB_CONTACT_IS, mii.dwItemData, 0)) return FALSE;
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
@@ -793,7 +793,7 @@ int sttShowMenu(bool centered) SIZE szColumn = {0};
TCHAR *prevGroup = NULL;
int i, idItem = 100;
- HCONTACT hContact;
+ MCONTACT hContact;
favList.build();
@@ -867,7 +867,7 @@ int sttShowMenu(bool centered) mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA;
GetMenuItemInfo(hMenu, res, FALSE, &mii);
- hContact = (HCONTACT)mii.dwItemData;
+ hContact = (MCONTACT)mii.dwItemData;
}
SetForegroundWindow(hwndSave);
DestroyMenu(hMenu);
@@ -892,7 +892,7 @@ INT_PTR svcShowMenuCentered(WPARAM wParam, LPARAM lParam) INT_PTR svcOpenContact(WPARAM wParam, LPARAM lParam)
{
- hContactToActivate = (HCONTACT)wParam;
+ hContactToActivate = (MCONTACT)wParam;
CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContactToActivate, 0);
return 0;
}
@@ -940,7 +940,7 @@ int ProcessSrmmIconClick( WPARAM wParam, LPARAM lParam ) StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (lstrcmpA(sicd->szModule, "FavContacts")) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0;
@@ -977,7 +977,7 @@ static void sttResetListOptions(HWND hwndList) static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static bool bInitialized = false;
- static HCONTACT hSelectedContact = 0;
+ static MCONTACT hSelectedContact = 0;
switch (msg) {
case WM_INITDIALOG:
@@ -1005,7 +1005,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA hSelectedContact = db_find_first();
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_SETCHECKMARK,
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0),
db_get_b(hContact, "FavContacts", "IsFavourite", 0));
@@ -1127,7 +1127,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA sttSaveOptions();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
BYTE fav = SendDlgItemMessage(hwnd, IDC_CLIST, CLM_GETCHECKMARK,
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
if (fav != db_get_b(hContact, "FavContacts", "IsFavourite", 0))
@@ -1145,7 +1145,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA case CLN_NEWCONTACT:
iSelection = (int)((NMCLISTCONTROL *)lParam)->hItem;
- 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 (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection) {
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_SETCHECKMARK, iSelection,
db_get_b(hContact, "FavContacts", "IsFavourite", 0));
@@ -1156,7 +1156,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA case CLN_CHECKCHANGED:
iSelection = (int)((NMCLISTCONTROL *)lParam)->hItem;
- 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 (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection) {
hSelectedContact = hContact;
RedrawWindow(GetDlgItem(hwnd, IDC_CANVAS), NULL, NULL, RDW_INVALIDATE);
|