diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-02 14:11:01 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-02 14:11:01 +0000 |
commit | 75b1ff75c42644eb36552762652e4b0c9ff071bc (patch) | |
tree | 238f026ef373d30a395846f38c302a81961b14ac /plugins/TabSRMM | |
parent | 2caba72d51b09368801f23dd8951d589ab4dc809 (diff) |
final switch to the typed icolib api
git-svn-id: http://svn.miranda-ng.org/main/trunk@2152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/buttonsbar.cpp | 20 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/clist.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/log.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/manager.cpp | 10 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/muchighlight.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/tools.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 34 | ||||
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/containeroptions.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 11 | ||||
-rw-r--r-- | plugins/TabSRMM/src/hotkeyhandler.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 16 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 26 | ||||
-rw-r--r-- | plugins/TabSRMM/src/trayicon.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/userprefs.cpp | 2 |
21 files changed, 80 insertions, 85 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 1c52564e55..57e5a10991 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -210,7 +210,7 @@ void CB_ChangeButton(HWND hwndDlg, struct TWindowData *dat, CustomButtonData* cb HWND hwndBtn = GetDlgItem(hwndDlg, cbd->dwButtonCID);
if (hwndBtn) {
if (cbd->hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
if (cbd->ptszTooltip)
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(cbd->ptszTooltip), 0);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
@@ -264,7 +264,7 @@ void CB_HardReInit() dwSepCount = 0;
CB_InitDefaultButtons();
- NotifyEventHooks(hHookToolBarLoadedEvt, (WPARAM)0, (LPARAM)0);
+ NotifyEventHooks(hHookToolBarLoadedEvt, 0, 0);
}
static INT_PTR CB_AddButton(WPARAM wParam, LPARAM lParam)
@@ -385,7 +385,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam) hwndDlg = M->FindWindow((HANDLE)wParam);
if (hwndDlg && realbutton && bbdi->hIcon)
- SendMessage(GetDlgItem(hwndDlg, tempCID), BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)bbdi->hIcon));
+ SendMessage(GetDlgItem(hwndDlg, tempCID), BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(bbdi->hIcon));
if (hwndDlg && realbutton && bbdi->pszTooltip) {
if (bbdi->bbbFlags&BBBF_ANSITOOLTIP)
SendMessage(GetDlgItem(hwndDlg, tempCID), BUTTONADDTOOLTIP, (WPARAM)mir_a2u(bbdi->pszTooltip), 0);
@@ -504,7 +504,7 @@ void BB_UpdateIcons(HWND hdlg, struct TWindowData *dat) hwndBtn = GetDlgItem(hdlg, cbd->dwButtonCID);
if (hwndBtn && cbd->hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
}
}
@@ -517,7 +517,7 @@ void BB_UpdateIcons(HWND hdlg, struct TWindowData *dat) hwndBtn = GetDlgItem(hdlg, cbd->dwButtonCID);
if (hwndBtn && cbd->hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
}
}
@@ -569,7 +569,7 @@ void TSAPI BB_InitDlgButtons(TWindowData *dat) SendMessage(hwndBtn, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hwndBtn, BUTTONSETASTHEMEDBTN, isThemed != 0, 0);
if (cbd->hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
if (cbd->ptszTooltip)
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(cbd->ptszTooltip), 0);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
@@ -607,7 +607,7 @@ void TSAPI BB_InitDlgButtons(TWindowData *dat) SendMessage(hwndBtn, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hwndBtn, BUTTONSETASTHEMEDBTN, isThemed != 0, 0);
if (cbd->hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
+ SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIconByHandle(cbd->hIcon));
if (cbd->ptszTooltip)
SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(cbd->ptszTooltip), 0);
SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
@@ -1219,7 +1219,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree) TreeView_DeleteAllItems(hToolBarTree);
himgl = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
- ImageList_AddIcon(himgl, reinterpret_cast<HICON>(CallService(MS_SKIN2_GETICON, 0, (LPARAM)"core_main_24")));
+ ImageList_AddIcon(himgl, Skin_GetIcon("core_main_24"));
HIMAGELIST himl = TreeView_GetImageList(hToolBarTree, TVSIL_NORMAL);
ImageList_Destroy(himl);
TreeView_SetImageList(hToolBarTree, himgl, TVSIL_NORMAL);
@@ -1239,7 +1239,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree) tvis.item.iImage = tvis.item.iSelectedImage = 0;
} else {
tvis.item.pszText = TranslateTS(cbd->ptszTooltip);
- iImage = ImageList_AddIcon(himgl, (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
+ iImage = ImageList_AddIcon(himgl, Skin_GetIconByHandle(cbd->hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
cbd->opFlags = 0;
@@ -1269,7 +1269,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree) tvis.item.iImage = tvis.item.iSelectedImage = -1;
} else {
tvis.item.pszText = TranslateTS(cbd->ptszTooltip);
- iImage = ImageList_AddIcon(himgl, (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)cbd->hIcon));
+ iImage = ImageList_AddIcon(himgl, Skin_GetIconByHandle(cbd->hIcon));
tvis.item.iImage = tvis.item.iSelectedImage = iImage;
}
tvis.item.state = 0;
diff --git a/plugins/TabSRMM/src/chat/clist.cpp b/plugins/TabSRMM/src/chat/clist.cpp index 8e095e1585..5abfc4b384 100644 --- a/plugins/TabSRMM/src/chat/clist.cpp +++ b/plugins/TabSRMM/src/chat/clist.cpp @@ -291,10 +291,10 @@ BOOL CList_AddEvent(HANDLE hContact, HICON Icon, HANDLE event, int type, const T cle.pszService = "GChat/DblClickEvent" ;
cle.ptszTooltip = TranslateTS(szBuf);
if (type) {
- if (!CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, (LPARAM)0))
+ if (!CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, 0))
CallService(MS_CLIST_ADDEVENT, (WPARAM) hContact, (LPARAM) &cle);
} else {
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)"chaticon");
CallService(MS_CLIST_ADDEVENT, (WPARAM) hContact, (LPARAM) &cle);
}
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index 7c8062c1d5..48886bf0ba 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -1030,7 +1030,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO* si, BOOL bRedr SendMessage(hwndRich, EM_STREAMIN, wp, (LPARAM) & stream);
- //SendMessage(hwndRich, EM_EXGETSEL, (WPARAM)0, (LPARAM)&newsel);
+ //SendMessage(hwndRich, EM_EXGETSEL, 0, (LPARAM)&newsel);
/*
* for new added events, only replace in message or action events.
* no need to replace smileys or math formulas elsewhere
diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp index 0dfa59a470..e8a203a470 100644 --- a/plugins/TabSRMM/src/chat/manager.cpp +++ b/plugins/TabSRMM/src/chat/manager.cpp @@ -392,7 +392,7 @@ BOOL SM_RemoveUser(const TCHAR* pszID, const char* pszModule, const TCHAR* pszUI dw = UM_RemoveUser(&pTemp->pUsers, pszUID);
if (pTemp->hWnd)
- SendMessage(pTemp->hWnd, GC_UPDATENICKLIST, (WPARAM)0, (LPARAM)0);
+ SendMessage(pTemp->hWnd, GC_UPDATENICKLIST, 0, 0);
if (pszID)
return TRUE;
@@ -457,7 +457,7 @@ BOOL SM_GiveStatus(const TCHAR* pszID, const char* pszModule, const TCHAR* pszUI if (ui) {
SM_MoveUser(pTemp->ptszID, pTemp->pszModule, ui->pszUID);
if (pTemp->hWnd)
- SendMessage(pTemp->hWnd, GC_UPDATENICKLIST, (WPARAM)0, (LPARAM)0);
+ SendMessage(pTemp->hWnd, GC_UPDATENICKLIST, 0, 0);
}
return TRUE;
}
@@ -481,7 +481,7 @@ BOOL SM_SetContactStatus(const TCHAR* pszID, const char* pszModule, const TCHAR* if (ui) {
SM_MoveUser(pTemp->ptszID, pTemp->pszModule, ui->pszUID);
if (pTemp->hWnd)
- SendMessage(pTemp->hWnd, GC_UPDATENICKLIST, (WPARAM)0, (LPARAM)0);
+ SendMessage(pTemp->hWnd, GC_UPDATENICKLIST, 0, 0);
}
return TRUE;
}
@@ -505,7 +505,7 @@ BOOL SM_TakeStatus(const TCHAR* pszID, const char* pszModule, const TCHAR* pszUI if (ui) {
SM_MoveUser(pTemp->ptszID, pTemp->pszModule, ui->pszUID);
if (pTemp->hWnd)
- SendMessage(pTemp->hWnd, GC_UPDATENICKLIST, (WPARAM)0, (LPARAM)0);
+ SendMessage(pTemp->hWnd, GC_UPDATENICKLIST, 0, 0);
}
return TRUE;
}
@@ -640,7 +640,7 @@ BOOL SM_SendUserMessage(const TCHAR* pszID, const char* pszModule, const TCHAR* while (pTemp != NULL) {
if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) {
if (pTemp->iType == GCW_CHATROOM)
- DoEventHook(pTemp->ptszID, pTemp->pszModule, GC_USER_MESSAGE, NULL, pszText, (LPARAM)NULL);
+ DoEventHook(pTemp->ptszID, pTemp->pszModule, GC_USER_MESSAGE, NULL, pszText, 0);
if (pszID)
return TRUE;
}
diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp index 7b05b5b81b..f4eee6ae06 100644 --- a/plugins/TabSRMM/src/chat/muchighlight.cpp +++ b/plugins/TabSRMM/src/chat/muchighlight.cpp @@ -314,7 +314,7 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L return 0;
::SendMessage(hwndDlg, WM_USER + 100, 0, 0);
- if (lParam != (LPARAM)NULL)
+ if (lParam != 0)
::SendMessage(::GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index 9d2fec8b48..765272fdd2 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -497,7 +497,7 @@ HICON LoadIconEx(int iIndex, char * pszIcoLibName, int iX, int iY) {
char szTemp[256];
mir_snprintf(szTemp, sizeof(szTemp), "chat_%s", pszIcoLibName);
- return (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)szTemp);
+ return Skin_GetIcon(szTemp);
}
static void InitSetting(TCHAR** ppPointer, char* pszSetting, TCHAR* pszDefault)
@@ -582,7 +582,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM if ((LOWORD(wParam) == IDC_GROUP)
&& (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0;
- if (lParam != (LPARAM)NULL)
+ if (lParam != 0)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -1086,7 +1086,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM break;
}
- if (lParam != (LPARAM)NULL)
+ if (lParam != 0)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -1266,7 +1266,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM break;
}
case WM_COMMAND:
- if (lParam != (LPARAM)NULL)
+ if (lParam != 0)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index edd9f25d79..52664447a3 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -418,7 +418,7 @@ static void AddUser(GCEVENT * gce) ui->Status |= si->pStatuses->Status;
if (si->hWnd) {
- SendMessage(si->hWnd, GC_UPDATENICKLIST, (WPARAM)0, (LPARAM)0);
+ SendMessage(si->hWnd, GC_UPDATENICKLIST, 0, 0);
if (si->dat)
GetMyNick(si->dat);
}
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index 170c320299..89848ea829 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -158,7 +158,7 @@ static void TSAPI Chat_OpenPopup(SESSION_INFO* si, HWND hwndPopup) static void TSAPI Chat_DismissPopup(const SESSION_INFO* si, HWND hwndPopup)
{
if (si->hContact)
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)szChatIconString);
if (si->hWnd && KillTimer(si->hWnd, TIMERID_FLASHWND))
@@ -172,7 +172,7 @@ static INT_PTR CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA switch (message) {
case WM_COMMAND:
if (HIWORD(wParam) == STN_CLICKED) {
- SESSION_INFO* si = (SESSION_INFO*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, (LPARAM)0);;
+ SESSION_INFO* si = (SESSION_INFO*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, 0);;
if (si) {
if (nen_options.maskActL & MASK_OPEN)
@@ -184,7 +184,7 @@ static INT_PTR CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA }
break;
case WM_CONTEXTMENU: {
- SESSION_INFO* si = (SESSION_INFO*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, (LPARAM)0);
+ SESSION_INFO* si = (SESSION_INFO*)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, 0);
if (si && si->hContact) {
if (nen_options.maskActR & MASK_OPEN)
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 93173b8fb9..bcf331f15c 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -298,7 +298,7 @@ static void Chat_UpdateWindowState(TWindowData *dat, UINT msg) if (dat->iTabID >= 0) {
if (DBGetContactSettingWord(si->hContact, si->pszModule , "ApparentMode", 0) != 0)
DBWriteContactSettingWord(si->hContact, si->pszModule , "ApparentMode", (LPARAM) 0);
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)szChatIconString);
SendMessage(hwndDlg, GC_UPDATETITLE, 0, 1);
@@ -886,7 +886,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, BOOL isRoom = FALSE;
wchar_t* pszText = NULL;
GETTEXTEX gt = {0};
- LRESULT lResult = (LRESULT)SendMessage(hwnd, EM_GETSEL, (WPARAM)NULL, (LPARAM)NULL);
+ LRESULT lResult = (LRESULT)SendMessage(hwnd, EM_GETSEL, 0, 0);
bool fCompleted = false;
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
@@ -897,7 +897,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, gt.codepage = 1200;
gt.flags = GTL_DEFAULT | GTL_PRECISE;
- iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>, (LPARAM)0);
+ iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>, 0);
if (iLen > 0) {
wchar_t* pszName = NULL;
pszText = reinterpret_cast<wchar_t*>(Utils::safeMirCalloc((iLen + 10) * sizeof(wchar_t)));
@@ -1017,7 +1017,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, gtl.flags = GTL_PRECISE;
gtl.codepage = CP_ACP;
- iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) & gtl, (LPARAM)NULL);
+ iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) & gtl, 0);
SendMessage(hwnd, EM_SCROLLCARET, 0, 0);
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE);
@@ -1043,7 +1043,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, gtl.flags = GTL_PRECISE;
gtl.codepage = CP_ACP;
- iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) & gtl, (LPARAM)NULL);
+ iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM) & gtl, 0);
SendMessage(hwnd, EM_SCROLLCARET, 0, 0);
SendMessage(hwnd, WM_SETREDRAW, TRUE, 0);
RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE);
@@ -1768,7 +1768,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, }
case ID_MESS:
- DoEventHookAsync(GetParent(hwnd), parentdat->ptszID, parentdat->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, (LPARAM)NULL);
+ DoEventHookAsync(GetParent(hwnd), parentdat->ptszID, parentdat->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, 0);
break;
default: {
@@ -2435,7 +2435,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (g_Settings.ShowContactStatus && g_Settings.ContactStatusFirst && ui->ContactStatus) {
HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 8, hIcon, 16, 16, 0, NULL, DI_NORMAL);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
x_offset += 18;
}
@@ -2458,7 +2458,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (g_Settings.ShowContactStatus && !g_Settings.ContactStatusFirst && ui->ContactStatus) {
HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 8, hIcon, 16, 16, 0, NULL, DI_NORMAL);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
x_offset += 18;
}
@@ -2504,7 +2504,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar switch (wParam) {
case SESSION_OFFLINE:
SendMessage(hwndDlg, GC_UPDATESTATUSBAR, 0, 0);
- SendMessage(si->hWnd, GC_UPDATENICKLIST, (WPARAM)0, (LPARAM)0);
+ SendMessage(si->hWnd, GC_UPDATENICKLIST, 0, 0);
return TRUE;
case SESSION_ONLINE:
@@ -2520,7 +2520,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar return TRUE;
case SESSION_TERMINATE:
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)szChatIconString);
si->wState &= ~STATE_TALK;
@@ -2766,7 +2766,7 @@ LABEL_SHOWWINDOW: return(_dlgReturn(hwndDlg, 1));
case TABSRMM_HK_MUC_SHOWSERVER:
if (si->iType != GCW_SERVER)
- DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_MESSAGE, NULL, L"/servershow", (LPARAM)NULL);
+ DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_MESSAGE, NULL, L"/servershow", 0);
return(_dlgReturn(hwndDlg, 1));
default:
break;
@@ -2998,7 +2998,7 @@ LABEL_SHOWWINDOW: break;
case ID_MESS:
- DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, (LPARAM)NULL);
+ DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, 0);
break;
default:
@@ -3126,7 +3126,7 @@ LABEL_SHOWWINDOW: //ui = SM_GetUserFromIndex(si->pszID, si->pszModule, item);
if (ui) {
if (g_Settings.DoubleClick4Privat ? GetKeyState(VK_SHIFT) & 0x8000 : !(GetKeyState(VK_SHIFT) & 0x8000)) {
- LRESULT lResult = (LRESULT)SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_GETSEL, (WPARAM)NULL, (LPARAM)NULL);
+ LRESULT lResult = (LRESULT)SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_GETSEL, 0, 0);
int start = LOWORD(lResult);
TCHAR* pszName = (TCHAR*)alloca(sizeof(TCHAR) * (lstrlen(ui->pszUID) + 3));
if (start == 0)
@@ -3137,7 +3137,7 @@ LABEL_SHOWWINDOW: SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_REPLACESEL, FALSE, (LPARAM) pszName);
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
SetFocus(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE));
- } else DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, (LPARAM)NULL);
+ } else DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, 0);
}
return TRUE;
@@ -3178,7 +3178,7 @@ LABEL_SHOWWINDOW: if (ptszText[0] == '/' || si->iType == GCW_SERVER)
fSound = false;
- DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_MESSAGE, NULL, ptszText, (LPARAM)NULL);
+ DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_MESSAGE, NULL, ptszText, 0);
mi->idleTimeStamp = time(0);
mi->lastIdleCheck = 0;
SM_BroadcastMessage(si->pszModule, GC_UPDATESTATUSBAR, 0, 1, TRUE);
@@ -3268,7 +3268,7 @@ LABEL_SHOWWINDOW: case IDC_CHANMGR:
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_CHANMGR)))
break;
- DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_CHANMGR, NULL, NULL, (LPARAM)NULL);
+ DoEventHookAsync(hwndDlg, si->ptszID, si->pszModule, GC_USER_CHANMGR, NULL, NULL, 0);
break;
case IDC_FILTER:
@@ -3770,7 +3770,7 @@ LABEL_SHOWWINDOW: case WM_DESTROY: {
int i;
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)szChatIconString);
si->wState &= ~STATE_TALK;
si->hWnd = NULL;
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index eb5312b266..3c8dead289 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -75,7 +75,7 @@ void CContactCache::initPhaseTwo() m_szAccount = 0;
if (m_szProto) {
- acc = reinterpret_cast<PROTOACCOUNT *>(::CallService(MS_PROTO_GETACCOUNT, (WPARAM)0, (LPARAM)m_szProto));
+ acc = reinterpret_cast<PROTOACCOUNT *>(::CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)m_szProto));
if (acc && acc->tszAccountName)
m_szAccount = acc->tszAccountName;
}
@@ -173,7 +173,7 @@ void CContactCache::updateMeta(bool fForce) m_hSubContact = hSubContact;
m_szMetaProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)m_hSubContact, 0);
if (m_szMetaProto) {
- PROTOACCOUNT *acc = reinterpret_cast<PROTOACCOUNT *>(::CallService(MS_PROTO_GETACCOUNT, (WPARAM)0, (LPARAM)m_szMetaProto));
+ PROTOACCOUNT *acc = reinterpret_cast<PROTOACCOUNT *>(::CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)m_szMetaProto));
if (acc && acc->tszAccountName)
m_szAccount = acc->tszAccountName;
m_wMetaStatus = DBGetContactSettingWord(m_hSubContact, m_szMetaProto, "Status", ID_STATUS_OFFLINE);
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 7d93aeed96..eb3b58c457 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -778,7 +778,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, GetWindowRect(pContainer->hwndStatus, &rcs);
pContainer->statusBarHeight = (rcs.bottom - rcs.top) + 1;
- SendMessage(pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, (LPARAM)0);
+ SendMessage(pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
}
else
@@ -2615,7 +2615,7 @@ HMENU TSAPI BuildMCProtocolMenu(HWND hwndDlg) { continue;
tzProtoName = dbv.pszVal;
- PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, (WPARAM)0, (LPARAM)tzProtoName);
+ PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)tzProtoName);
if (acc && acc->tszAccountName) {
mir_snprintf(szTemp, sizeof(szTemp), "Handle%d", i);
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index 5282537202..1dade08c30 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -207,7 +207,7 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_SBARLAYOUT, CB_SETCURSEL, (WPARAM)((pContainer->settings->dwFlagsEx & 0xff000000) >> 24), 0);
- SendMessage(hwndDlg, DM_SC_INITDIALOG, (WPARAM)0, (LPARAM)pContainer->settings);
+ SendMessage(hwndDlg, DM_SC_INITDIALOG, 0, (LPARAM)pContainer->settings);
SendDlgItemMessage(hwndDlg, IDC_TITLEFORMAT, EM_LIMITTEXT, TITLE_FORMATLEN - 1, 0);
SetDlgItemText(hwndDlg, IDC_TITLEFORMAT, pContainer->settings->szTitleFormat);
SetDlgItemText(hwndDlg, IDC_THEME, pContainer->szRelThemeFile);
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 1b08037ec5..79af801c17 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -835,7 +835,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro if (szProto == NULL)
return 0; // should never happen...
- PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, (WPARAM)0, (LPARAM)szProto);
+ PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)szProto);
tszFinalProto = (acc && acc->tszAccountName ? acc->tszAccountName : 0);
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 548068794d..364eef5b68 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -223,13 +223,8 @@ void CGlobals::reloadSystemModulesChanged() mi.cbSize = sizeof(mi);
mi.position = -2000090000;
- if (ServiceExists(MS_SKIN2_GETICONBYHANDLE)) {
- mi.flags = CMIF_ICONFROMICOLIB | CMIF_DEFAULT;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_MESSAGE);
- } else {
- mi.flags = CMIF_DEFAULT;
- mi.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
- }
+ mi.flags = CMIF_ICONFROMICOLIB | CMIF_DEFAULT;
+ mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_MESSAGE);
mi.pszName = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
PluginConfig.m_hMenuItem = Menu_AddContactMenuItem(&mi);
@@ -399,7 +394,7 @@ int CGlobals::ModulesLoaded(WPARAM wParam, LPARAM lParam) ::CB_InitDefaultButtons();
::ModPlus_Init(wParam, lParam);
- ::NotifyEventHooks(hHookToolBarLoadedEvt, (WPARAM)0, (LPARAM)0);
+ ::NotifyEventHooks(hHookToolBarLoadedEvt, 0, 0);
//
if (M->GetByte("avatarmode", -1) == -1)
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index 080538727b..48bafd5e2b 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -178,7 +178,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_HOTKEY: {
CLISTEVENT *cli = 0;
- cli = (CLISTEVENT *)CallService(MS_CLIST_GETEVENT, (WPARAM)INVALID_HANDLE_VALUE, (LPARAM)0);
+ cli = (CLISTEVENT *)CallService(MS_CLIST_GETEVENT, (WPARAM)INVALID_HANDLE_VALUE, 0);
if (cli != NULL) {
if (strncmp(cli->pszService, "SRMsg/TypingMessage", strlen(cli->pszService))) {
CallService(cli->pszService, 0, (LPARAM)cli);
@@ -405,7 +405,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP */
if (cle) {
if (ServiceExists(cle->pszService)) {
- CallService(cle->pszService, (WPARAM)NULL, (LPARAM)cle);
+ CallService(cle->pszService, 0, (LPARAM)cle);
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)cle->hContact, (LPARAM)cle->hDbEvent);
}
} else { // still, we got that message posted.. the event may be waiting in tabSRMMs tray...
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 1e73619d8a..6b0d85a024 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -1473,7 +1473,7 @@ void CTip::show(const RECT& rc, POINT& pt, const HICON hIcon, const TCHAR *szTit m_rcRich.right = m_rcRich.left + m_szRich.cx;
m_rcRich.bottom = m_rcRich.top + m_szRich.cy;
- ::SendMessage(m_hRich, EM_FORMATRANGE, 0, (LPARAM)NULL); // required, clear cached painting data in the richedit
+ ::SendMessage(m_hRich, EM_FORMATRANGE, 0, 0); // required, clear cached painting data in the richedit
::SetWindowPos(m_hwnd, HWND_TOP, pt.x - 5, pt.y - 5, m_szRich.cx + m_leftWidth + LEFT_BORDER + RIGHT_BORDER + 2 * xBorder,
m_szRich.cy + TOP_BORDER + BOTTOM_BORDER + 2 * yBorder, SWP_NOACTIVATE|SWP_SHOWWINDOW);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 9c261f2f30..f53bf2ebbf 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -3477,7 +3477,7 @@ quote_from_last: case DM_STATUSICONCHANGE:
if (m_pContainer->hwndStatus) {
SendMessage(dat->pContainer->hwnd, WM_SIZE, 0, 0);
- SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, (LPARAM)0);
+ SendMessage(m_pContainer->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
InvalidateRect(m_pContainer->hwndStatus, NULL, TRUE);
}
return 0;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index e22f366ec6..b8e9cb202b 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -490,7 +490,7 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId) }
case ID_MESSAGELOGSETTINGS_FORTHISCONTACT:
- CallService(MS_TABMSG_SETUSERPREFS, (WPARAM)dat->hContact, (LPARAM)0);
+ CallService(MS_TABMSG_SETUSERPREFS, (WPARAM)dat->hContact, 0);
return 1;
default:
@@ -690,14 +690,14 @@ int TSAPI GetAvatarVisibility(HWND hwndDlg, struct TWindowData *dat) /** panel and contact is shown, reloads contact's avatar -> panel
* user avatar -> bottom picture
*/
- SendMessage(dat->hwndPanelPic, AVATAR_SETCONTACT, (WPARAM)0, (LPARAM)dat->hContact);
+ SendMessage(dat->hwndPanelPic, AVATAR_SETCONTACT, 0, (LPARAM)dat->hContact);
if (dat->hwndContactPic)
- SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, (WPARAM)0, (LPARAM)dat->szProto);
+ SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->szProto);
}
else {
//show only user picture(contact is unaccessible)
if (dat->hwndContactPic)
- SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, (WPARAM)0, (LPARAM)dat->szProto);
+ SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->szProto);
}
//Bolshevik_
} else {
@@ -746,9 +746,9 @@ int TSAPI GetAvatarVisibility(HWND hwndDlg, struct TWindowData *dat) if (dat->showPic)
//shows contact or user picture, depending on panel visibility
if (dat->hwndPanelPic)
- SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, (WPARAM)0, (LPARAM)dat->szProto);
+ SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->szProto);
if (dat->hwndContactPic)
- SendMessage(dat->hwndContactPic, AVATAR_SETCONTACT, (WPARAM)0, (LPARAM)dat->hContact);
+ SendMessage(dat->hwndContactPic, AVATAR_SETCONTACT, 0, (LPARAM)dat->hContact);
}
return dat->showPic;
@@ -1826,7 +1826,7 @@ int TSAPI MsgWindowDrawHandler(WPARAM wParam, LPARAM lParam, TWindowData *dat) }
if (!PluginConfig.g_bDisableAniAvatars && fa.hWindow == 0 && dat->hwndPanelPic == 0) {
dat->hwndPanelPic = CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, dat->hwndPanelPicParent, (HMENU)7000, NULL, NULL);
- SendMessage(dat->hwndPanelPic, AVATAR_SETCONTACT, (WPARAM)0, (LPARAM)dat->hContact);
+ SendMessage(dat->hwndPanelPic, AVATAR_SETCONTACT, 0, (LPARAM)dat->hContact);
}
} else {
if (fa.hWindow != NULL && dat->hwndContactPic) {
@@ -1835,7 +1835,7 @@ int TSAPI MsgWindowDrawHandler(WPARAM wParam, LPARAM lParam, TWindowData *dat) }
if (!PluginConfig.g_bDisableAniAvatars && fa.hWindow == 0 && dat->hwndContactPic == 0) {
dat->hwndContactPic =CreateWindowEx(WS_EX_TOPMOST, AVATAR_CONTROL_CLASS, _T(""), WS_VISIBLE | WS_CHILD, 1, 1, 1, 1, GetDlgItem(hwndDlg, IDC_CONTACTPIC), (HMENU)0, NULL, NULL);
- SendMessage(dat->hwndContactPic, AVATAR_SETCONTACT, (WPARAM)0, (LPARAM)dat->hContact);
+ SendMessage(dat->hwndContactPic, AVATAR_SETCONTACT, 0, (LPARAM)dat->hContact);
}
}
dat->hwndFlash = fa.hWindow;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 4781a52903..cd022728a0 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -1102,26 +1102,26 @@ static int TSAPI LoadFromIconLib() while (ICONBLOCKS[n].szSection) {
i = 0;
while (ICONBLOCKS[n].idesc[i].szDesc) {
- *(ICONBLOCKS[n].idesc[i].phIcon) = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)ICONBLOCKS[n].idesc[i].szName);
+ *(ICONBLOCKS[n].idesc[i].phIcon) = Skin_GetIcon(ICONBLOCKS[n].idesc[i].szName);
i++;
}
n++;
}
- PluginConfig.g_buttonBarIcons[0] = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"core_main_8");
- PluginConfig.g_buttonBarIcons[1] = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"core_main_10");
- PluginConfig.g_buttonBarIconHandles[0] = (HICON)CallService(MS_SKIN2_GETICONHANDLE, 0, (LPARAM)"core_main_10");
- PluginConfig.g_buttonBarIconHandles[1] = (HICON)CallService(MS_SKIN2_GETICONHANDLE, 0, (LPARAM)"core_main_8");
- PluginConfig.g_buttonBarIconHandles[20] = (HICON)CallService(MS_SKIN2_GETICONHANDLE, 0, (LPARAM)"core_main_9");
+ PluginConfig.g_buttonBarIcons[0] = Skin_GetIcon("core_main_8");
+ PluginConfig.g_buttonBarIcons[1] = Skin_GetIcon("core_main_10");
+ PluginConfig.g_buttonBarIconHandles[0] = Skin_GetIconHandle("core_main_10");
+ PluginConfig.g_buttonBarIconHandles[1] = Skin_GetIconHandle("core_main_8");
+ PluginConfig.g_buttonBarIconHandles[20] = Skin_GetIconHandle("core_main_9");
- PluginConfig.g_buttonBarIcons[5] = PluginConfig.g_buttonBarIcons[12] = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"core_main_23");
- PluginConfig.g_IconChecked = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"core_main_19");
- PluginConfig.g_IconUnchecked = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"core_main_20");
- PluginConfig.g_IconFolder = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"core_main_5");
+ PluginConfig.g_buttonBarIcons[5] = PluginConfig.g_buttonBarIcons[12] = Skin_GetIcon("core_main_23");
+ PluginConfig.g_IconChecked = Skin_GetIcon("core_main_19");
+ PluginConfig.g_IconUnchecked = Skin_GetIcon("core_main_20");
+ PluginConfig.g_IconFolder = Skin_GetIcon("core_main_5");
- PluginConfig.g_iconOverlayEnabled = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"tabSRMM_overlay_enabled");
- PluginConfig.g_iconOverlayDisabled = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"tabSRMM_overlay_disabled");
+ PluginConfig.g_iconOverlayEnabled = Skin_GetIcon("tabSRMM_overlay_enabled");
+ PluginConfig.g_iconOverlayDisabled = Skin_GetIcon("tabSRMM_overlay_disabled");
- PluginConfig.g_iconClock = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"tabSRMM_clock_symbol");
+ PluginConfig.g_iconClock = Skin_GetIcon("tabSRMM_clock_symbol");
CacheMsgLogIcons();
M->BroadcastMessage(DM_LOADBUTTONBARICONS, 0, 0);
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index 9da43b2472..848765070f 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -265,7 +265,7 @@ void TSAPI AddContactToFavorites(HANDLE hContact, const TCHAR *szNickname, const if (hIcon == 0)
hIcon = LoadSkinnedProtoIcon(szProto, wStatus);
- PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, (WPARAM)0, (LPARAM)szProto);
+ PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)szProto);
if (acc && acc->tszAccountName) {
mii.cbSize = sizeof(mii);
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index 7148724917..b23380910f 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -160,7 +160,7 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, EnumSystemCodePages((CODEPAGE_ENUMPROC)FillCpCombo, CP_INSTALLED);
SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_INSERTSTRING, 0, (LPARAM)TranslateT("Use default codepage"));
if (sCodePage == 0)
- SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_SETCURSEL, (WPARAM)0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_SETCURSEL, 0, 0);
else {
for (i=0; i < SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETCOUNT, 0, 0); i++) {
if (SendDlgItemMessage(hwndDlg, IDC_CODEPAGES, CB_GETITEMDATA, (WPARAM)i, 0) == (LRESULT)sCodePage)
|