summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdchat/src/manager.cpp10
-rw-r--r--src/core/stdchat/src/options.cpp6
-rw-r--r--src/core/stdchat/src/services.cpp2
-rw-r--r--src/core/stdchat/src/tools.cpp6
-rw-r--r--src/core/stdchat/src/window.cpp26
-rw-r--r--src/core/stdclist/src/clistmenus.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp16
-rw-r--r--src/core/stdmsg/src/msglog.cpp2
-rw-r--r--src/core/stdmsg/src/msgs.cpp2
-rw-r--r--src/core/stduihist/history.cpp2
10 files changed, 35 insertions, 39 deletions
diff --git a/src/core/stdchat/src/manager.cpp b/src/core/stdchat/src/manager.cpp
index 02a0f76a59..e423f3853b 100644
--- a/src/core/stdchat/src/manager.cpp
+++ b/src/core/stdchat/src/manager.cpp
@@ -404,7 +404,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;
@@ -470,7 +470,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;
}
@@ -494,7 +494,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;
}
@@ -518,7 +518,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;
}
@@ -633,7 +633,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/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp
index 89d39d7f47..8fa46bd0ed 100644
--- a/src/core/stdchat/src/options.cpp
+++ b/src/core/stdchat/src/options.cpp
@@ -499,7 +499,7 @@ HICON LoadIconEx( char* pszIcoLibName, BOOL big )
{
char szTemp[256];
mir_snprintf(szTemp, SIZEOF(szTemp), "chat_%s", pszIcoLibName);
- return (HICON) CallService(MS_SKIN2_GETICON, big, (LPARAM)szTemp);
+ return Skin_GetIcon(szTemp, big);
}
static void InitSetting(TCHAR** ppPointer, char* pszSetting, TCHAR* pszDefault)
@@ -742,7 +742,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
break;
}
- if (lParam != (LPARAM)NULL)
+ if (lParam != 0)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -879,7 +879,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg,UINT uMsg,WPARAM wParam
if ((LOWORD(wParam) == IDC_TIMEOUT) && (HIWORD(wParam)!=EN_CHANGE || (HWND)lParam != GetFocus()))
return 0;
- if (lParam != (LPARAM)NULL)
+ if (lParam != 0)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch (LOWORD(wParam)) {
diff --git a/src/core/stdchat/src/services.cpp b/src/core/stdchat/src/services.cpp
index 06e4f20cc8..6d08843093 100644
--- a/src/core/stdchat/src/services.cpp
+++ b/src/core/stdchat/src/services.cpp
@@ -586,7 +586,7 @@ static void AddUser(GCEVENT * gce)
if (si->hWnd) {
g_TabSession.pUsers = si->pUsers;
- SendMessage(si->hWnd, GC_UPDATENICKLIST, (WPARAM)0, (LPARAM)0);
+ SendMessage(si->hWnd, GC_UPDATENICKLIST, 0, 0);
} } } }
static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam)
diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp
index fa8f28ead3..de899836b1 100644
--- a/src/core/stdchat/src/tools.cpp
+++ b/src/core/stdchat/src/tools.cpp
@@ -98,7 +98,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);
@@ -108,9 +108,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->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)"chaticon");
if (si->hWnd && KillTimer(si->hWnd, TIMERID_FLASHWND))
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp
index ccddae051b..fc95cbf9f2 100644
--- a/src/core/stdchat/src/window.cpp
+++ b/src/core/stdchat/src/window.cpp
@@ -382,7 +382,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
int iLen;
GETTEXTLENGTHEX gtl = {0};
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);
@@ -390,7 +390,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
SendMessage(hwnd, EM_SETSEL, end, end);
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);
if (iLen >0) {
TCHAR *pszName = NULL;
TCHAR *pszSelName = NULL;
@@ -550,7 +550,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);
@@ -576,7 +576,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);
@@ -1084,7 +1084,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
break;
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:
@@ -1755,7 +1755,7 @@ END_REMOVETAB:
if (s->wState&GC_EVENT_HIGHLIGHT) {
s->wState &= ~GC_EVENT_HIGHLIGHT;
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)s->hContact, (LPARAM)0))
+ if (CallService(MS_CLIST_GETEVENT, (WPARAM)s->hContact, 0))
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)s->hContact, (LPARAM)"chaticon");
}
@@ -1923,7 +1923,7 @@ END_REMOVETAB:
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:
@@ -1946,7 +1946,7 @@ END_REMOVETAB:
DBWriteContactSettingDword(si->hContact, "Chat", "roomwidth" , si->iWidth);
DBWriteContactSettingDword(si->hContact, "Chat", "roomheight", si->iHeight);
}
- 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)"chaticon");
si->wState &= ~STATE_TALK;
DBWriteContactSettingWord(si->hContact, si->pszModule ,"ApparentMode",(LPARAM) 0);
@@ -2135,7 +2135,7 @@ LABEL_SHOWWINDOW:
FlashWindow(hwndDlg, FALSE);
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)"chaticon");
}
break;
@@ -2425,7 +2425,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_MESSAGE), EM_GETSEL, (WPARAM)NULL, (LPARAM)NULL);
+ LRESULT lResult = (LRESULT)SendMessage(GetDlgItem(hwndDlg, IDC_MESSAGE), EM_GETSEL, 0, 0);
int start = LOWORD(lResult);
TCHAR* pszName = (TCHAR*)alloca(sizeof(TCHAR)*(lstrlen(ui->pszUID) + 3));
if (start == 0)
@@ -2436,7 +2436,7 @@ LABEL_SHOWWINDOW:
SendMessage( GetDlgItem(hwndDlg, IDC_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;
@@ -2472,7 +2472,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_MESSAGE));
@@ -2549,7 +2549,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:
diff --git a/src/core/stdclist/src/clistmenus.cpp b/src/core/stdclist/src/clistmenus.cpp
index 76be7e93e4..f172c53b71 100644
--- a/src/core/stdclist/src/clistmenus.cpp
+++ b/src/core/stdclist/src/clistmenus.cpp
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
INT_PTR CloseAction(WPARAM wParam,LPARAM lParam)
{
- if (CallService(MS_SYSTEM_OKTOEXIT,(WPARAM)0,(LPARAM)0))
+ if (CallService(MS_SYSTEM_OKTOEXIT,0,0))
DestroyWindow(pcli->hwndContactList);
return(0);
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 6afebefd72..dcd20353bf 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -681,17 +681,13 @@ void Button_SetIcon_IcoLib(HWND hwndDlg, int itemId, int iconId, const char* too
void Button_FreeIcon_IcoLib(HWND hwndDlg, int itemId)
{
- HICON hIcon = ( HICON )SendDlgItemMessage(hwndDlg, itemId, BM_SETIMAGE, IMAGE_ICON, 0 );
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon((HICON)SendDlgItemMessage(hwndDlg, itemId, BM_SETIMAGE, IMAGE_ICON, 0));
}
void Window_FreeIcon_IcoLib(HWND hwndDlg)
{
- HICON hIcon = (HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
-
- hIcon = (HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, 0));
}
INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -1489,7 +1485,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if ((g_dat->flags & SMF_SHOWTYPINGWIN) && GetForegroundWindow() != hwndDlg) {
HICON hIcon = (HICON)SendMessage(hwndDlg, WM_GETICON, ICON_SMALL, 0);
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)hTyping );
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
dat->showTyping = 1;
}
@@ -1532,7 +1528,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
else DrawIconEx(dis->hDC, dis->rcItem.left, dis->rcItem.top, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
return TRUE;
}
}
@@ -1820,7 +1816,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
break;
case DM_STATUSICONCHANGE:
- SendMessage(dat->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW | (SendMessage(dat->hwndStatus, SB_GETPARTS, 0, 0) - 1)), (LPARAM)0);
+ SendMessage(dat->hwndStatus, SB_SETTEXT, (WPARAM)(SBT_OWNERDRAW | (SendMessage(dat->hwndStatus, SB_GETPARTS, 0, 0) - 1)), 0);
break;
case WM_CLOSE:
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index d24cda4032..3596233975 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -616,7 +616,7 @@ void LoadMsgLogIcons(void)
hoBmp = (HBITMAP) SelectObject(hdcMem, hBmp);
FillRect(hdcMem, &rc, hBkgBrush);
DrawIconEx(hdcMem, 0, 0, hIcon, bih.biWidth, bih.biHeight, 0, NULL, DI_NORMAL);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
SelectObject(hdcMem, hoBmp);
GetDIBits(hdc, hBmp, 0, bih.biHeight, pBmpBits, (BITMAPINFO *) & bih, DIB_RGB_COLORS);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 4ecb53e31f..940487b011 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -204,7 +204,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam)
cle.ptszTooltip = szTip;
CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM) 1);
CallServiceSync(MS_CLIST_ADDEVENT, wParam, (LPARAM) & cle);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)cle.hIcon, 0);
+ Skin_ReleaseIcon(cle.hIcon);
}
}
return 0;
diff --git a/src/core/stduihist/history.cpp b/src/core/stduihist/history.cpp
index 9fb174d5c3..e67a32dc8e 100644
--- a/src/core/stduihist/history.cpp
+++ b/src/core/stduihist/history.cpp
@@ -249,7 +249,7 @@ static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LP
urd.hwndDlg = hwndDlg;
urd.hInstance = hInst;
urd.lpTemplate = MAKEINTRESOURCEA(IDD_HISTORY);
- urd.lParam = (LPARAM)NULL;
+ urd.lParam = 0;
urd.pfnResizer = HistoryDlgResizer;
CallService(MS_UTILS_RESIZEDIALOG, 0, (LPARAM)&urd);
return TRUE;