summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-02 14:11:01 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-02 14:11:01 +0000
commit75b1ff75c42644eb36552762652e4b0c9ff071bc (patch)
tree238f026ef373d30a395846f38c302a81961b14ac /plugins/Scriver
parent2caba72d51b09368801f23dd8951d589ab4dc809 (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/Scriver')
-rw-r--r--plugins/Scriver/src/chat/clist.cpp4
-rw-r--r--plugins/Scriver/src/chat/manager.cpp10
-rw-r--r--plugins/Scriver/src/chat/options.cpp4
-rw-r--r--plugins/Scriver/src/chat/services.cpp2
-rw-r--r--plugins/Scriver/src/chat/tools.cpp6
-rw-r--r--plugins/Scriver/src/chat/window.cpp26
-rw-r--r--plugins/Scriver/src/globals.cpp38
-rw-r--r--plugins/Scriver/src/infobar.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp10
-rw-r--r--plugins/Scriver/src/msgs.cpp16
-rw-r--r--plugins/Scriver/src/msgwindow.cpp6
11 files changed, 56 insertions, 68 deletions
diff --git a/plugins/Scriver/src/chat/clist.cpp b/plugins/Scriver/src/chat/clist.cpp
index 7cbe58c572..34205bfb4a 100644
--- a/plugins/Scriver/src/chat/clist.cpp
+++ b/plugins/Scriver/src/chat/clist.cpp
@@ -282,10 +282,10 @@ BOOL CList_AddEvent(HANDLE hContact, HICON Icon, HANDLE event, int type, TCHAR*
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)event);
CallService(MS_CLIST_ADDEVENT,(WPARAM) hContact,(LPARAM) &cle);
}
diff --git a/plugins/Scriver/src/chat/manager.cpp b/plugins/Scriver/src/chat/manager.cpp
index 9573c920fa..69713b8980 100644
--- a/plugins/Scriver/src/chat/manager.cpp
+++ b/plugins/Scriver/src/chat/manager.cpp
@@ -394,7 +394,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;
@@ -458,7 +458,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;
}
@@ -482,7 +482,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;
}
@@ -506,7 +506,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;
}
@@ -618,7 +618,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/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp
index 62ee3310fa..32d8f5124b 100644
--- a/plugins/Scriver/src/chat/options.cpp
+++ b/plugins/Scriver/src/chat/options.cpp
@@ -284,7 +284,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
if ((LOWORD(wParam) == IDC_CHAT_NICKROW || LOWORD(wParam) == IDC_CHAT_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;
@@ -500,7 +500,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
break;
}
- if (lParam != (LPARAM)NULL)
+ if (lParam != 0)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
diff --git a/plugins/Scriver/src/chat/services.cpp b/plugins/Scriver/src/chat/services.cpp
index edda2bf488..f5538861b8 100644
--- a/plugins/Scriver/src/chat/services.cpp
+++ b/plugins/Scriver/src/chat/services.cpp
@@ -414,7 +414,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);
}
}
}
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp
index b448ca9aa4..f5adc887a5 100644
--- a/plugins/Scriver/src/chat/tools.cpp
+++ b/plugins/Scriver/src/chat/tools.cpp
@@ -89,7 +89,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);;
CallFunctionAsync(ShowRoomFromPopup, si);
@@ -99,9 +99,9 @@ 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->windowData.hContact)
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->windowData.hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->windowData.hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->windowData.hContact, (LPARAM)"chaticon");
PUDeletePopUp( hWnd );
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index bf637ccb2b..2e60fa30da 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -329,7 +329,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
BOOL isRoom = FALSE;
TCHAR* 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);
SendMessage(hwnd, WM_SETREDRAW, FALSE, 0);
start = LOWORD(lResult);
@@ -961,7 +961,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
case ID_MESS:
- DoEventHookAsync(GetParent(hwnd), si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, (LPARAM)NULL);
+ DoEventHookAsync(GetParent(hwnd), si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, 0);
break;
default:
@@ -991,7 +991,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
int index = SendMessage(hwnd, LB_GETCURSEL, 0, 0);
if (index!=LB_ERR) {
USERINFO *ui = SM_GetUserFromIndex(si->ptszID, si->pszModule, index);
- DoEventHookAsync(GetParent(hwnd), si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, (LPARAM)NULL);
+ DoEventHookAsync(GetParent(hwnd), si->ptszID, si->pszModule, GC_USER_PRIVMESS, ui->pszUID, NULL, 0);
}
break;
}
@@ -1457,7 +1457,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
if (si->wState & GC_EVENT_HIGHLIGHT) {
si->wState &= ~GC_EVENT_HIGHLIGHT;
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->windowData.hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->windowData.hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->windowData.hContact, (LPARAM)"chaticon");
}
@@ -1538,7 +1538,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
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-3,hIcon,16,16,0,NULL, DI_NORMAL);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
x_offset += 18;
}
DrawIconEx(dis->hDC,x_offset, dis->rcItem.top + offset,hIcon,10,10,0,NULL, DI_NORMAL);
@@ -1546,7 +1546,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
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-3,hIcon,16,16,0,NULL, DI_NORMAL);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
x_offset += 18;
}
@@ -1587,7 +1587,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
switch(wParam) {
case SESSION_OFFLINE:
SendMessage(hwndDlg, DM_UPDATESTATUSBAR, 0, 0);
- SendMessage(si->hWnd, GC_UPDATENICKLIST, (WPARAM)0, (LPARAM)0);
+ SendMessage(si->hWnd, GC_UPDATENICKLIST, 0, 0);
return TRUE;
case SESSION_ONLINE:
@@ -1603,7 +1603,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
return TRUE;
case SESSION_TERMINATE:
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->windowData.hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->windowData.hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->windowData.hContact, (LPARAM)"chaticon");
si->wState &= ~STATE_TALK;
DBWriteContactSettingWord(si->windowData.hContact, si->pszModule ,"ApparentMode",(LPARAM) 0);
@@ -1747,7 +1747,7 @@ LABEL_SHOWWINDOW:
if (DBGetContactSettingWord(si->windowData.hContact, si->pszModule ,"ApparentMode", 0) != 0)
DBWriteContactSettingWord(si->windowData.hContact, si->pszModule ,"ApparentMode",(LPARAM) 0);
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->windowData.hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->windowData.hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->windowData.hContact, (LPARAM)"chaticon");
}
break;
@@ -1834,7 +1834,7 @@ LABEL_SHOWWINDOW:
ui = SM_GetUserFromIndex(si->ptszID, si->pszModule, item);
if (ui) {
if (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)
@@ -1845,7 +1845,7 @@ LABEL_SHOWWINDOW:
SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_REPLACESEL, FALSE, (LPARAM) pszName);
PostMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
}
- 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;
@@ -1888,7 +1888,7 @@ LABEL_SHOWWINDOW:
EnableWindow(GetDlgItem(hwndDlg,IDOK),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);
mir_free(pszRtf);
mir_free(ptszText);
SetFocus(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE));
@@ -1952,7 +1952,7 @@ LABEL_SHOWWINDOW:
case IDC_CHAT_CHANMGR:
if (!IsWindowEnabled(GetDlgItem(hwndDlg,IDC_CHAT_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_CHAT_FILTER:
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index 6e9a23b22b..113cf79437 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -118,37 +118,34 @@ BOOL IsStaticIcon(HICON hIcon) {
}
void ReleaseIconSmart(HICON hIcon) {
- if (!IsStaticIcon(hIcon)) {
- DWORD result = CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
- if ( result == 1 || result == CALLSERVICE_NOTFOUND)
- DestroyIcon(hIcon);
- }
+ if (!IsStaticIcon(hIcon))
+ Skin_ReleaseIcon(hIcon);
}
int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id) {
HICON hIcon = LoadSkinnedIcon(id);
int res = ImageList_AddIcon(hIml, hIcon);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
return res;
}
int ImageList_AddIcon_Ex2(HIMAGELIST hIml, HICON hIcon) {
int res = ImageList_AddIcon(hIml, hIcon);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
return res;
}
int ImageList_ReplaceIcon_Ex(HIMAGELIST hIml, int nIndex, int id) {
HICON hIcon = LoadSkinnedIcon(id);
int res = ImageList_ReplaceIcon(hIml, nIndex, hIcon);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
return res;
}
int ImageList_AddIcon_ProtoEx(HIMAGELIST hIml, const char* szProto, int status) {
HICON hIcon = LoadSkinnedProtoIcon(szProto, status);
int res = ImageList_AddIcon(hIml, hIcon);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
return res;
}
@@ -177,15 +174,13 @@ void RegisterIcons(void)
void ReleaseIcons()
{
- int i;
- for (i = 0; i < SIZEOF(hIconList); i++) {
- if (hIconList[i] != NULL) {
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIconList[i], 0);
- }
- }
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)g_dat->hMsgIcon, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)g_dat->hMsgIconBig, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)g_dat->hIconChatBig, 0);
+ for (int i = 0; i < SIZEOF(hIconList); i++)
+ if (hIconList[i] != NULL)
+ Skin_ReleaseIcon(hIconList[i]);
+
+ Skin_ReleaseIcon(g_dat->hMsgIcon);
+ Skin_ReleaseIcon(g_dat->hMsgIconBig);
+ Skin_ReleaseIcon(g_dat->hIconChatBig);
}
HICON GetCachedIcon(const char *name)
@@ -202,13 +197,12 @@ HICON GetCachedIcon(const char *name)
void LoadGlobalIcons() {
int i;
int overlayIcon;
- for (i = 0; i < SIZEOF(iconList); i++) {
- hIconList[i] = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)iconList[i].name);
- }
+ for (i = 0; i < SIZEOF(iconList); i++)
+ hIconList[i] = Skin_GetIcon(iconList[i].name);
g_dat->hMsgIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
g_dat->hMsgIconBig = LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE);
- g_dat->hIconChatBig = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"chat_window");
+ g_dat->hIconChatBig = Skin_GetIcon("chat_window");
ImageList_RemoveAll(g_dat->hButtonIconList);
ImageList_RemoveAll(g_dat->hChatButtonIconList);
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index 57209c47c7..4d244d82d2 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -249,7 +249,7 @@ static INT_PTR CALLBACK InfobarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA
adr.rcDraw.right = avatarWidth - 1;
adr.rcDraw.bottom = avatarHeight - 1;
adr.dwFlags = AVDRQ_DRAWBORDER | AVDRQ_HIDEBORDERONTRANSPARENCY;
- CallService(MS_AV_DRAWAVATAR, (WPARAM)0, (LPARAM)&adr);
+ CallService(MS_AV_DRAWAVATAR, 0, (LPARAM)&adr);
}
}
BitBlt(dis->hDC, 0, 0, itemWidth, itemHeight, hdcMem, 0, 0, SRCCOPY);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 6324cc3e62..b4a27aa27d 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -271,10 +271,10 @@ void SetStatusIcon(struct SrmmWindowData *dat) {
}
}
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)dat->statusIcon, 0);
+ Skin_ReleaseIcon(dat->statusIcon);
dat->statusIcon = LoadSkinnedProtoIcon(szProto, dat->wStatus);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)dat->statusIconBig, 0);
+ Skin_ReleaseIcon(dat->statusIconBig);
dat->statusIconBig = LoadSkinnedProtoIconBig(szProto, dat->wStatus);
if ((int)dat->statusIconBig == CALLSERVICE_NOTFOUND) {
dat->statusIconBig = NULL;
@@ -1754,7 +1754,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
adr.rcDraw.bottom = avatarHeight - 1;
adr.dwFlags = AVDRQ_DRAWBORDER | AVDRQ_HIDEBORDERONTRANSPARENCY;
- CallService(MS_AV_DRAWAVATAR, (WPARAM)0, (LPARAM)&adr);
+ CallService(MS_AV_DRAWAVATAR, 0, (LPARAM)&adr);
}
}
BitBlt(dis->hDC, 0, 0, itemWidth, itemHeight, hdcMem, 0, 0, SRCCOPY);
@@ -2071,8 +2071,8 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (dat->nTypeMode == PROTOTYPE_SELFTYPING_ON) {
NotifyTyping(dat, PROTOTYPE_SELFTYPING_OFF);
}
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)dat->statusIcon, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)dat->statusIconBig , 0);
+ Skin_ReleaseIcon(dat->statusIcon);
+ Skin_ReleaseIcon(dat->statusIconBig);
if (dat->statusIconOverlay != NULL) DestroyIcon(dat->statusIconOverlay);
dat->statusIcon = NULL;
dat->statusIconOverlay = NULL;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 972ea864ca..67997b9fee 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -437,14 +437,14 @@ void ChangeStatusIcons() {
sid.hIconDisabled = CopyIcon(GetCachedIcon("scriver_UNICODEOFF"));
sid.flags = 0;
sid.szTooltip = NULL;
- ModifyStatusIcon((WPARAM)NULL, (LPARAM) &sid);
+ ModifyStatusIcon(0, (LPARAM) &sid);
sid.dwId = 1;
sid.hIcon = CopyIcon(GetCachedIcon("scriver_TYPING"));
sid.hIconDisabled = CopyIcon(GetCachedIcon("scriver_TYPINGOFF"));
sid.flags = MBF_HIDDEN;
sid.szTooltip = NULL;
- ModifyStatusIcon((WPARAM)NULL, (LPARAM) &sid);
+ ModifyStatusIcon(0, (LPARAM) &sid);
}
int StatusIconPressed(WPARAM wParam, LPARAM lParam) {
@@ -498,18 +498,12 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
ZeroMemory(&mi, sizeof(mi));
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;
hMsgMenuItem = Menu_AddContactMenuItem(&mi);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)mi.hIcon, 0);
+ Skin_ReleaseIcon(mi.hIcon);
HookEvent_Ex(ME_SMILEYADD_OPTIONSCHANGED, SmileySettingsChanged);
HookEvent_Ex(ME_IEVIEW_OPTIONSCHANGED, SmileySettingsChanged);
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp
index 4fa52a0005..6e306db168 100644
--- a/plugins/Scriver/src/msgwindow.cpp
+++ b/plugins/Scriver/src/msgwindow.cpp
@@ -276,8 +276,8 @@ static void SetupStatusBar(ParentWindowData *dat)
statwidths[2] = rc.right - rc.left - SB_UNICODE_WIDTH;
statwidths[3] = -1;
SendMessage(dat->hwndStatus, SB_SETPARTS, 4, (LPARAM) statwidths);
- SendMessage(dat->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, (LPARAM)0);
- SendMessage(dat->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_NOBORDERS) | 3, (LPARAM)0);
+ SendMessage(dat->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
+ SendMessage(dat->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_NOBORDERS) | 3, 0);
}
static int AddOrReplaceIcon(HIMAGELIST hList, int prevIndex, HICON hIcon) {
@@ -1056,7 +1056,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
break;
}
case DM_STATUSICONCHANGE:
- SendMessage(dat->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, (LPARAM)0);
+ SendMessage(dat->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW) | 2, 0);
SetupStatusBar(dat);
RedrawWindow(dat->hwndStatus, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
break;