From 75b1ff75c42644eb36552762652e4b0c9ff071bc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 2 Nov 2012 14:11:01 +0000 Subject: final switch to the typed icolib api git-svn-id: http://svn.miranda-ng.org/main/trunk@2152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Scriver/src/chat/clist.cpp | 4 ++-- plugins/Scriver/src/chat/manager.cpp | 10 +++++----- plugins/Scriver/src/chat/options.cpp | 4 ++-- plugins/Scriver/src/chat/services.cpp | 2 +- plugins/Scriver/src/chat/tools.cpp | 6 +++--- plugins/Scriver/src/chat/window.cpp | 26 +++++++++++++------------- 6 files changed, 26 insertions(+), 26 deletions(-) (limited to 'plugins/Scriver/src/chat') 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: -- cgit v1.2.3