diff options
278 files changed, 1802 insertions, 1949 deletions
diff --git a/include/m_icolib.h b/include/m_icolib.h index 5137f39edf..1412c98f13 100644 --- a/include/m_icolib.h +++ b/include/m_icolib.h @@ -150,12 +150,17 @@ __forceinline HICON Skin_GetIconByHandle(HANDLE hIcolibIcon, int size) // lParam = (LPARAM)(char*)pszName (optional) // at least one needs to be specified
//
#define MS_SKIN2_RELEASEICON "Skin2/Icons/ReleaseIcon"
+#define MS_SKIN2_RELEASEICONBIG "Skin2/Icons/ReleaseIconBig"
__forceinline void Skin_ReleaseIcon(const char* szIconName)
{ CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)szIconName);
}
#ifdef __cplusplus
+__forceinline void Skin_ReleaseIcon(const char* szIconName, int big)
+{ CallService((big) ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szIconName);
+}
+
__forceinline void Skin_ReleaseIcon(HICON hIcon)
#else
__forceinline void Skin_ReleaseIcon2(HICON hIcon)
@@ -163,8 +168,6 @@ __forceinline void Skin_ReleaseIcon2(HICON hIcon) { CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
}
-#define MS_SKIN2_RELEASEICONBIG "Skin2/Icons/ReleaseIconBig"
-
//
// Check whether HICON is managed by IcoLib
//
diff --git a/plugins/!Deprecated/NewAwaySysMod/SetAwayMsg.cpp b/plugins/!Deprecated/NewAwaySysMod/SetAwayMsg.cpp index 46748b991b..e367519554 100644 --- a/plugins/!Deprecated/NewAwaySysMod/SetAwayMsg.cpp +++ b/plugins/!Deprecated/NewAwaySysMod/SetAwayMsg.cpp @@ -70,17 +70,17 @@ static LRESULT CALLBACK MsgEditSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, PostMessage(GetParent(hWnd), WM_COMMAND, IDC_OK, 0);
return 0;
}
- if (wParam == 1)
+ if (wParam == 1)
{ // ctrl-a
SendMessage(hWnd, EM_SETSEL, 0, -1);
return 0;
}
- if (wParam == 23)
+ if (wParam == 23)
{ // ctrl-w
SendMessage(GetParent(hWnd), WM_CLOSE, 0, 0);
return 0;
}
- if (wParam == 127)
+ if (wParam == 127)
{ // ctrl-backspace
DWORD start, end;
SendMessage(hWnd, EM_GETSEL, (WPARAM)&end, NULL);
@@ -249,7 +249,7 @@ static int SetAwayMsgDlgResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *u return RD_ANCHORX_RIGHT | RD_ANCHORY_HEIGHT;
}
}
-
+
return RD_ANCHORX_LEFT | RD_ANCHORY_BOTTOM;
}
@@ -533,7 +533,7 @@ HICON g_LoadIconEx( const char* name, bool big ) {
char szSettingName[100];
mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", "", name );
- return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
+ return Skin_GetIcon(szSettingName, big);
}
INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@@ -555,7 +555,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA IDC_SAWAYMSG_VARS, ILI_NOICON, LPGENT("Open Variables help dialog"),
IDC_SAWAYMSG_OPTIONS, ILI_SETTINGS, LPGENT("Show settings menu")
};
-
+
switch (uMsg)
{
@@ -565,7 +565,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA TranslateDialogDefault(hwndDlg);
g_SetAwayMsgPage.SetWnd(hwndDlg);
g_SetAwayMsgPage.DBToMemToPage();
-/*
+/*
HICON hTitleIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
HICON hTitleIconBig = LoadSkinnedIconBig(SKINICON_OTHER_MIRANDA);
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hTitleIconBig);
@@ -578,24 +578,24 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA Status = g_ProtoStates[dat->szProtocol].Status;
HICON hTitleIcon = LoadSkinnedProtoIcon(szProto, Status);
HICON hTitleIconBig = LoadSkinnedProtoIconBig(szProto, Status);
-
-
-
+
+
+
if(hTitleIconBig == NULL || (HICON)CALLSERVICE_NOTFOUND == hTitleIconBig) {
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hTitleIconBigElse);
} else {
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hTitleIconBig);
}
-
+
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)hTitleIcon);
-
+
SendDlgItemMessage(hwndDlg, IDC_SAWAYMSG_MSGDATA, EM_LIMITTEXT, AWAY_MSGDATA_MAX, 0);
-
-
-
+
+
+
// init window size variables / resize the window
RECT rc;
POINT pt;
@@ -618,7 +618,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA //MinMsgEditSize = rc.right - rc.left + rcContactSplitter.right - rcVars.left + 3;
MinMsgEditSize = rcOK.right - rc.left + rcContactSplitter.right - rcVars.left + 3;
rc.left = MINSPLITTERPOS;
-
+
//NightFox: use MINSPLITTERPOS as min size ;
// GetWindowRect(GetDlgItem(hwndDlg, IDC_SAWAYMSG_SAVEMSG), &rc);
// GetWindowRect(GetDlgItem(hwndDlg, IDC_SAWAYMSG_DELETE), &rc);
@@ -632,17 +632,17 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA MinMsgSplitterX = pt.x;
GetWindowRect(GetDlgItem(hwndDlg, IDC_SAWAYMSG_IGNOREREQ), &rc);
MinContactSplitterX = rcMsgDlg.right - rc.left + 1;
-
+
/*
-
+
//NightFox: add status bar
-
+
PROTOACCOUNT * acc = ProtoGetAccount(szProto);
-
+
//HWND hWndStatusBar = CreateStatusWindow(WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | SBARS_SIZEGRIP, NULL, hwndDlg, 999);//IDC_STATUSBAR);
SetWindowPos(hWndStatusBar, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
-
-
+
+
SIZE sz;
HDC hdc = GetDC(hWndStatusBar);
@@ -658,16 +658,16 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA SendMessage(hWndStatusBar, SB_SETICON, 1, (LPARAM)LoadSkinnedProtoIcon(szProto, Status));
SendMessage(hWndStatusBar, SB_SETTEXT, 1, (LPARAM)acc->tszAccountName);
*/
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
// [try] getting dialog position
int DlgPosX = DBGetContactSettingDword(NULL, MOD_NAME, SAM_DB_DLGPOSX, -1);
int DlgPosY = DBGetContactSettingDword(NULL, MOD_NAME, SAM_DB_DLGPOSY, -1);
@@ -999,7 +999,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA }
if (hContact)
{
-
+
if (IsAnICQProto((char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0))) {
WindowTitle += TranslateT("message for");
WindowTitle += _T(" ");
@@ -1007,8 +1007,8 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA WindowTitle += TranslateT("for");
WindowTitle += _T(" ");
}
-
-
+
+
WindowTitle += (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
if (!IsAnICQProto((char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)))
{
@@ -1033,12 +1033,12 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA /*if (CallProtoService(szProto, PS_GETNAME, 256, (LPARAM)ProtoTitle.GetBuffer(256)))
{ // on a failure, set ProtoTitle to an empty string
//ProtoTitle[0] = '\0';
- }*/
+ }*/
//ProtoTitle.ReleaseBuffer();
//WindowTitle += ANSI2TCHAR(ProtoTitle) + TranslateT(" protocol");
-
+
PROTOACCOUNT * acc = ProtoGetAccount(szProto);
-
+
WindowTitle += acc->tszAccountName;
//WindowTitle += _T(" ");
//WindowTitle += TranslateT("account");
@@ -1122,7 +1122,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA //CString ProtoTitle;
//CallProtoService(proto[I]->szName, PS_GETNAME, 256, (LPARAM)ProtoTitle.GetBuffer(256));
//ProtoTitle.ReleaseBuffer();
-
+
PROTOACCOUNT * acc = ProtoGetAccount(proto[I]->szName);
//NightFox: protocols -> accounts
//hItem = CList->AddInfo(TCString(_T("* ")) + ANSI2TCHAR(ProtoTitle) + TranslateT(" contacts *"), CLC_ROOT, hItem, (LPARAM)proto[I]->szName, LoadSkinnedProtoIcon(proto[I]->szName, g_ProtoStates[proto[I]->szName].Status));
diff --git a/plugins/!Deprecated/W7UI/src/jumplistarray.cpp b/plugins/!Deprecated/W7UI/src/jumplistarray.cpp index 669a7784ef..5eabf82fe1 100644 --- a/plugins/!Deprecated/W7UI/src/jumplistarray.cpp +++ b/plugins/!Deprecated/W7UI/src/jumplistarray.cpp @@ -151,7 +151,7 @@ bool CJumpListArray::LoadMirandaIcon(char *mir_icon, TCHAR *icon, int *id) mir_free(name);
mir_free(path);
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)mir_icon);
+ HICON hIcon = Skin_GetIcon(mir_icon);
SaveIconToFile(hIcon, icon);
return true;
@@ -201,7 +201,7 @@ IShellLink *CJumpListArray::NewShellLink(TCHAR *icon, int iIcon, TCHAR *title, T if (SUCCEEDED(pShellLink->QueryInterface(IID_IPropertyStore, (void **)&pPropStore)))
{
PROPVARIANT pv;
-
+
InitPropVariantFromString(title, &pv);
pPropStore->SetValue(PKEY_Title, pv);
PropVariantClear(&pv);
diff --git a/plugins/!NotAdopted/NoHistory/icons.cpp b/plugins/!NotAdopted/NoHistory/icons.cpp index 741ad3727e..b8fcddc70b 100644 --- a/plugins/!NotAdopted/NoHistory/icons.cpp +++ b/plugins/!NotAdopted/NoHistory/icons.cpp @@ -6,9 +6,9 @@ HICON hIconRemove, hIconKeep, hIconClear; HANDLE hIcoLibIconsChanged = 0;
int ReloadIcons(WPARAM wParam, LPARAM lParam) {
- hIconRemove = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)MODULE "_remove");
- hIconKeep = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)MODULE "_keep");
- hIconClear = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)MODULE "_clear");
+ hIconRemove = Skin_GetIcon(MODULE "_remove");
+ hIconKeep = Skin_GetIcon(MODULE "_keep");
+ hIconClear = Skin_GetIcon(MODULE "_clear");
return 0;
}
@@ -26,7 +26,7 @@ void InitIcons() { sid.pszDefaultFile = MODULE ".dll"; \
sid.hDefaultIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(z), IMAGE_ICON, 0, 0, 0); \
CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid); \
- sid.iDefaultIndex++;
+ sid.iDefaultIndex++;
AddIcon("Disable", MODULE "_remove", IDI_HREMOVE);
AddIcon("Enable", MODULE "_keep", IDI_HKEEP);
diff --git a/plugins/!NotAdopted/NotesAndReminders/src/notes.cpp b/plugins/!NotAdopted/NotesAndReminders/src/notes.cpp index 5f98768d8b..67bc7c3439 100644 --- a/plugins/!NotAdopted/NotesAndReminders/src/notes.cpp +++ b/plugins/!NotAdopted/NotesAndReminders/src/notes.cpp @@ -248,7 +248,7 @@ STICKYNOTE* NewNoteEx(int Ax,int Ay,int Aw,int Ah,char *Data,ULARGE_INTEGER *ID, TWC.lpszClassName = NOTE_WND_CLASS;
TWC.cbSize = sizeof(WNDCLASSEX);
TWC.lpfnWndProc = (WNDPROC)StickyNoteWndProc;
- if (!RegisterClassEx(&TWC)) return NULL;
+ if (!RegisterClassEx(&TWC)) return NULL;
}
if (!TData || Aw < 0 || Ah < 0)
@@ -276,12 +276,12 @@ STICKYNOTE* NewNoteEx(int Ax,int Ay,int Aw,int Ah,char *Data,ULARGE_INTEGER *ID, TreeAdd(&g_Stickies,TSN);
- if (!TData)
+ if (!TData)
{
TData = _strdup("");
TSN->data = TData;
}
- else
+ else
TSN->data = TData;
// init note title (time-stamp)
@@ -552,7 +552,7 @@ void LoadNotes(BOOL bIsStartup) ULARGE_INTEGER newid;
OT = 1; TV = 1;
- Tx = 100; Ty = 100;
+ Tx = 100; Ty = 100;
Tw = 179; Th = 35;
Data = NULL; ID = NULL;
@@ -869,7 +869,7 @@ static void JustSaveNotesEx(STICKYNOTE *pModified) bDeleteTData = FALSE;
}
- if (!tData)
+ if (!tData)
// empty note
SzT = 0;
else
@@ -1192,7 +1192,7 @@ int CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPara {
switch (message)
{
- case WM_CLOSE:
+ case WM_CLOSE:
return TRUE;
case WM_SIZE:
@@ -1330,7 +1330,7 @@ int CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPara HICON hcIcon;
if (SN->OnTop)
hcIcon = Skin_GetIconByHandle(hIconLibItem[4]);
- else
+ else
hcIcon = Skin_GetIconByHandle(hIconLibItem[7]);
DrawIcon(hdc, wr.right - wr.left - 16, 0 + 3, hcIcon);
Skin_ReleaseIcon(hcIcon);
@@ -1366,17 +1366,17 @@ int CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPara RedrawWindow(hdlg, NULL, NULL, RDW_UPDATENOW);
return TRUE;
case WM_NOTIFY:
- if (LOWORD(wParam) == 1)
+ if (LOWORD(wParam) == 1)
{
char *Buff;
PENLINK PEnLnk = (PENLINK)lParam;
- if (PEnLnk->msg == WM_LBUTTONDOWN)
+ if (PEnLnk->msg == WM_LBUTTONDOWN)
{
SendDlgItemMessage(hdlg,1,EM_EXSETSEL,0,(LPARAM)&(PEnLnk->chrg));
Buff = (char*)malloc(PEnLnk->chrg.cpMax - PEnLnk->chrg.cpMin + 1);
SendDlgItemMessage(hdlg,1,EM_GETSELTEXT,0,(LPARAM)Buff);
- if ((GetAsyncKeyState(VK_CONTROL) >> 15) != 0)
+ if ((GetAsyncKeyState(VK_CONTROL) >> 15) != 0)
ShellExecute(hdlg,"open","iexplore",Buff,"",SW_SHOWNORMAL);
else if (g_lpszAltBrowser && *g_lpszAltBrowser)
ShellExecute(hdlg,"open",g_lpszAltBrowser,Buff,"",SW_SHOWNORMAL);
@@ -1712,7 +1712,7 @@ int CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPara RemoveProp(hdlg, "ctrldata");
}
break;
- case WM_CONTEXTMENU:
+ case WM_CONTEXTMENU:
if (DoContextMenu(hdlg,wParam,lParam)) return FALSE;
default:
@@ -1941,7 +1941,7 @@ int CALLBACK DlgProcViewNotes(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lPar InitListView(GetDlgItem(Dialog,IDC_LISTREMINDERS));
return TRUE;
}
- case WM_CONTEXTMENU:
+ case WM_CONTEXTMENU:
{
HWND H;
STICKYNOTE *pNote = NULL;
@@ -2023,24 +2023,24 @@ int CALLBACK DlgProcViewNotes(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lPar return TRUE;
}
case WM_CLOSE:
- {
- DestroyWindow(Dialog);
- ListNotesVisible = FALSE;
- return TRUE;
- }
+ DestroyWindow(Dialog);
+ ListNotesVisible = FALSE;
+ return TRUE;
+
case WM_DESTROY:
- ListNotesVisible = FALSE;
- CallService(MS_SKIN2_RELEASEICONBIG, (WPARAM)SendMessage(Dialog, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(Dialog, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
- return TRUE;
+ ListNotesVisible = FALSE;
+ Skin_ReleaseIcon((HICON)SendMessage(Dialog, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(Dialog, WM_SETICON, ICON_SMALL, 0));
+ return TRUE;
+
case WM_NOTIFY:
{
if (wParam == IDC_LISTREMINDERS)
{
NM = (NMLISTVIEW *)lParam;
- switch (NM->hdr.code)
+ switch (NM->hdr.code)
{
- case LVN_ITEMCHANGED:
+ case LVN_ITEMCHANGED:
{
S = ((STICKYNOTE*)TreeGetAt(g_Stickies,NM->iItem))->data;
SetDlgItemText(Dialog,IDC_REMINDERDATA,S);
diff --git a/plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp b/plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp index 0d545056f9..2b3eb77f3b 100644 --- a/plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp +++ b/plugins/!NotAdopted/NotesAndReminders/src/reminders.cpp @@ -404,7 +404,7 @@ void JustSaveReminders(void) else
tmpReminder = NULL;
- if (!tmpReminder)
+ if (!tmpReminder)
tmpReminder = "";
Value = (char*)malloc(strlen(tmpReminder) + 512);
@@ -689,7 +689,7 @@ void ExportReminders() void NewReminder(void)
{
- if (!NewReminderVisible)
+ if (!NewReminderVisible)
{
NewReminderVisible = TRUE;
CreateDialog(hinstance, MAKEINTRESOURCE(IDD_ADDREMINDER), 0, DlgProcNewReminder);
@@ -1302,7 +1302,7 @@ static void PopulateTimeCombo(HWND Dialog, UINT nIDTime, BOOL bRelative, const S n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
// item data contains time offset from midnight in seconds (bit 31 is set to flag that
// combo box items are absolute times and not relative times like below
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((ULONG)((h*60+m)*60) | 0x80000000));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((ULONG)((h*60+m)*60) | 0x80000000));
li.QuadPart += (ULONGLONG)30 * MinutesToFileTime;
@@ -1331,35 +1331,35 @@ static void PopulateTimeCombo(HWND Dialog, UINT nIDTime, BOOL bRelative, const S wCurMinute = tm2.wMinute;
mir_snprintf(s, sizeof(s), "%02d:%02d", (UINT)tm2.wHour, (UINT)tm2.wMinute);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// 5 minutes
li.QuadPart += (ULONGLONG)5 * MinutesToFileTime;
FileTimeToTzLocalST((FILETIME*)&li, &tm2);
mir_snprintf(s, sizeof(s), "%02d:%02d (5 %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// 10 minutes
li.QuadPart += (ULONGLONG)5 * MinutesToFileTime;
FileTimeToTzLocalST((FILETIME*)&li, &tm2);
mir_snprintf(s, sizeof(s), "%02d:%02d (10 %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// 15 minutes
li.QuadPart += (ULONGLONG)5 * MinutesToFileTime;
FileTimeToTzLocalST((FILETIME*)&li, &tm2);
mir_snprintf(s, sizeof(s), "%02d:%02d (15 %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// 30 minutes
li.QuadPart += (ULONGLONG)15 * MinutesToFileTime;
FileTimeToTzLocalST((FILETIME*)&li, &tm2);
mir_snprintf(s, sizeof(s), "%02d:%02d (30 %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)((li.QuadPart-ref)/FILETIME_TICKS_PER_SEC));
// round +1h time to nearest even or half hour
li.QuadPart += (ULONGLONG)30 * MinutesToFileTime;
@@ -1393,7 +1393,7 @@ static void PopulateTimeCombo(HWND Dialog, UINT nIDTime, BOOL bRelative, const S else
mir_snprintf(s, sizeof(s), "%02d:%02d (%d.%d %s)", (UINT)tm2.wHour, (UINT)tm2.wMinute, dt/60, ((dt%60)*10)/60, lpszHours);
n = SendDlgItemMessage(Dialog,nIDTime,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(dt*60));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, (LPARAM)(dt*60));
li.QuadPart += (ULONGLONG)30 * MinutesToFileTime;
}
@@ -1424,39 +1424,39 @@ static void PopulateTimeOffsetCombo(HWND Dialog, UINT nIDCombo) {
mir_snprintf(s, sizeof(s), "%d %s", i*5, lpszMinutes);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(i*5));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*5));
}
// 1 hour
mir_snprintf(s, sizeof(s), "1 %s", lpszHour);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)60);
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)60);
// 2, 4, 8 hours
for (i = 2; i <= 8; i+=2)
{
mir_snprintf(s, sizeof(s), "%d %s", i, lpszHours);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(i*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*60));
}
// 1 day
mir_snprintf(s, sizeof(s), "1 %s", lpszDay);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(24*60));
// 2-4 days
for (i = 2; i <= 4; i++)
{
mir_snprintf(s, sizeof(s), "%d %s", i, lpszDays);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(i*24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(i*24*60));
}
// 1 week
mir_snprintf(s, sizeof(s), "1 %s", lpszWeek);
n = SendDlgItemMessage(Dialog,nIDCombo,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,(WPARAM)n,(LPARAM)(7*24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, (LPARAM)(7*24*60));
}
// returns non-zero if specified time was inside "missing" hour of daylight saving
@@ -1508,7 +1508,7 @@ static int ReformatTimeInputEx(HWND Dialog, UINT nIDTime, UINT nIDRefTime, int h n = SendDlgItemMessage(Dialog, nIDTime, CB_FINDSTRING, (WPARAM)-1, (LPARAM)buf);
if (n != CB_ERR)
{
- SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, (WPARAM)n, 0);
+ SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, n, 0);
return 0;
}
@@ -1531,7 +1531,7 @@ static int ReformatTimeInputEx(HWND Dialog, UINT nIDTime, UINT nIDRefTime, int h n = SendDlgItemMessage(Dialog, nIDTime, CB_FINDSTRING, (WPARAM)-1, (LPARAM)buf);
if (n != CB_ERR)
{
- SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, (WPARAM)n, 0);
+ SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, n, 0);
return 0;
}
@@ -1638,7 +1638,7 @@ output_result: n = SendDlgItemMessage(Dialog, nIDTime, CB_FINDSTRING, (WPARAM)-1, (LPARAM)buf);
if (n != CB_ERR)
{
- SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, (WPARAM)n, 0);
+ SendDlgItemMessage(Dialog, nIDTime, CB_SETCURSEL, n, 0);
goto invalid_dst;
}
@@ -1681,7 +1681,7 @@ preset_value:; {
// time offset from ref time ("24:43 (5 Minutes)" etc.)
- UINT nDeltaSeconds = (UINT)SendDlgItemMessage(Dialog, nIDTime, CB_GETITEMDATA, (WPARAM)n, 0);
+ UINT nDeltaSeconds = (UINT)SendDlgItemMessage(Dialog, nIDTime, CB_GETITEMDATA, n, 0);
li.QuadPart += (ULONGLONG)nDeltaSeconds * FILETIME_TICKS_PER_SEC;
FILETIMEtoSYSTEMTIME((FILETIME*)&li, pDate);
@@ -1698,7 +1698,7 @@ preset_value:; {
// absolute time (offset from midnight on pDate)
- UINT nDeltaSeconds = (UINT)((ULONG)SendDlgItemMessage(Dialog, nIDTime, CB_GETITEMDATA, (WPARAM)n, 0) & ~0x80000000);
+ UINT nDeltaSeconds = (UINT)((ULONG)SendDlgItemMessage(Dialog, nIDTime, CB_GETITEMDATA, n, 0) & ~0x80000000);
pDate->wHour = 0;
pDate->wMinute = 0;
pDate->wSecond = 0;
@@ -1853,7 +1853,7 @@ int CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM {
NMLISTVIEW *NM = (NMLISTVIEW*)lParam;
- switch (NM->hdr.code)
+ switch (NM->hdr.code)
{
case DTN_DATETIMECHANGE:
OnDateChanged(Dialog, IDC_DATEAGAIN, IDC_TIMEAGAIN, IDC_REFTIME);
@@ -2005,7 +2005,7 @@ int CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM n = SendDlgItemMessage(Dialog,IDC_REMINDAGAININ,CB_GETCURSEL,0,0);
if (n != CB_ERR)
{
- TT = SendDlgItemMessage(Dialog,IDC_REMINDAGAININ,CB_GETITEMDATA,(WPARAM)n,0) * 60;
+ TT = SendDlgItemMessage(Dialog,IDC_REMINDAGAININ,CB_GETITEMDATA,n, 0) * 60;
if (TT >= 24*3600)
{
@@ -2114,7 +2114,7 @@ int CALLBACK DlgProcNotifyReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM }
SetFocus(NewNote(0, 0, -1, -1, ReminderText, 0, TRUE, TRUE, 0)->REHwnd);
- break;
+ break;
}
}
return TRUE;
@@ -2186,7 +2186,7 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP // search for preset first
n = SendDlgItemMessage(Dialog, IDC_TIME, CB_FINDSTRING, (WPARAM)-1, (LPARAM)s);
if (n != CB_ERR)
- SendDlgItemMessage(Dialog, IDC_TIME, CB_SETCURSEL, (WPARAM)n, 0);
+ SendDlgItemMessage(Dialog, IDC_TIME, CB_SETCURSEL, n, 0);
else
SetDlgItemText(Dialog, IDC_TIME, s);
@@ -2207,31 +2207,31 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP // NOTE: use multiples of REMINDER_UPDATE_INTERVAL_SHORT (currently 5 seconds)
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)Translate("Never"));
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)0);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA, n, 0);
mir_snprintf(s, sizeof(s), "%s 5 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)5);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)5);
mir_snprintf(s, sizeof(s), "%s 10 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)10);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)10);
mir_snprintf(s, sizeof(s), "%s 15 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)15);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)15);
mir_snprintf(s, sizeof(s), "%s 20 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)20);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)20);
mir_snprintf(s, sizeof(s), "%s 30 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)30);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)30);
mir_snprintf(s, sizeof(s), "%s 60 %s", lpszEvery, lpszSeconds);
n = SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_ADDSTRING,0,(LPARAM)s);
- SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)60);
+ SendDlgItemMessage(Dialog,IDC_COMBO_REPEATSND,CB_SETITEMDATA,n, (LPARAM)60);
if (NewReminderVisible == 2 && pEditReminder->RepeatSound)
{
@@ -2248,13 +2248,13 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP // populate sound selection combo
{
int n = SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_ADDSTRING,0,(LPARAM)Translate("Default"));
- SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)0);
+ SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,n, 0);
n = SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_ADDSTRING,0,(LPARAM)Translate("Alternative 1"));
- SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)1);
+ SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,n, (LPARAM)1);
n = SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_ADDSTRING,0,(LPARAM)Translate("Alternative 2"));
- SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)2);
+ SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,n, (LPARAM)2);
n = SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_ADDSTRING,0,(LPARAM)Translate("None"));
- SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,(WPARAM)n,(LPARAM)-1);
+ SendDlgItemMessage(Dialog,IDC_COMBO_SOUND,CB_SETITEMDATA,n, (LPARAM)-1);
if (NewReminderVisible == 2 && pEditReminder->SoundSel)
{
@@ -2303,9 +2303,9 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP {
NMLISTVIEW *NM = (NMLISTVIEW*)lParam;
- switch (NM->hdr.code)
+ switch (NM->hdr.code)
{
- case DTN_DATETIMECHANGE:
+ case DTN_DATETIMECHANGE:
OnDateChanged(Dialog, IDC_DATE, IDC_TIME, IDC_REFTIME);
break;
}
@@ -2347,7 +2347,7 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP case CBN_SELENDOK:
{
int n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETCURSEL, 0, 0);
- n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, (WPARAM)n, 0);
+ n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, n, 0);
EnableWindow(GetDlgItem(Dialog, IDC_BTN_PLAYSOUND), n>=0);
EnableWindow(GetDlgItem(Dialog, IDC_COMBO_REPEATSND), n>=0);
@@ -2359,7 +2359,7 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP case IDC_BTN_PLAYSOUND:
{
int n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETCURSEL, 0, 0);
- n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, (WPARAM)n, 0);
+ n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, n, 0);
switch (n)
{
case 0: SkinPlaySound("AlertReminder"); break;
@@ -2377,7 +2377,7 @@ int CALLBACK DlgProcNewReminder(HWND Dialog,UINT Message,WPARAM wParam,LPARAM lP DestroyWindow(Dialog);
NewReminderVisible = FALSE;
pEditReminder = NULL;
- return TRUE;
+ return TRUE;
}
case IDC_VIEWREMINDERS:
{
@@ -2712,7 +2712,7 @@ int CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPARAM NM = (NMLISTVIEW *)lParam;
switch (NM->hdr.code)
{
- case LVN_ITEMCHANGED:
+ case LVN_ITEMCHANGED:
{
S = ((REMINDERDATA*)TreeGetAt(RemindersList,NM->iItem))->Reminder;
SetDlgItemText(Dialog,IDC_REMINDERDATA,S);
@@ -2808,11 +2808,9 @@ int CALLBACK DlgProcViewReminders(HWND Dialog,UINT Message,WPARAM wParam,LPARAM }
}
case WM_DESTROY:
- {
- CallService(MS_SKIN2_RELEASEICONBIG, (WPARAM)SendMessage(Dialog, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(Dialog, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
- break;
- }
+ Skin_ReleaseIcon((HICON)SendMessage(Dialog, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(Dialog, WM_SETICON, ICON_SMALL, 0));
+ break;
}
return FALSE;
}
@@ -2848,12 +2846,12 @@ unsigned long WS_ResolveName(char *name,WORD *port,int defaultPort) nameCopy=_strdup(name);
if(port != NULL) *port = defaultPort;
pcolon = strchr(nameCopy,':');
- if(pcolon != NULL)
+ if(pcolon != NULL)
{
if(port != NULL) *port = atoi(pcolon+1);
*pcolon = 0;
}
- if (inet_addr(nameCopy) == INADDR_NONE)
+ if (inet_addr(nameCopy) == INADDR_NONE)
{
lk = gethostbyname(nameCopy);
if(lk == 0) return SOCKET_ERROR;
@@ -2878,11 +2876,11 @@ void Send(char *user, char *host, char *Msg, char *server) if(connect(S,(SOCKADDR*)&sockaddr,sizeof(sockaddr)) == SOCKET_ERROR) return;
ch = (char*)malloc(strlen(user) + strlen(host) + 16);
ch = (char*)realloc(ch,sprintf(ch,"rcpt to:%s@%s\r\n",user,host));
- WS_Send(S,"mail from: \r\n",13);
+ WS_Send(S,"mail from: \r\n",13);
WS_Send(S,ch,strlen(ch));
- WS_Send(S,"data\r\n",6);
- WS_Send(S,"From:<REM>\r\n\r\n",14);
- WS_Send(S,Msg,strlen(Msg));
+ WS_Send(S,"data\r\n",6);
+ WS_Send(S,"From:<REM>\r\n\r\n",14);
+ WS_Send(S,Msg,strlen(Msg));
WS_Send(S,"\r\n.\r\n",5);
WS_Send(S,"quit\r\n",6);
SAFE_FREE((void**)&ch);
diff --git a/plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp b/plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp index e37ce72ce9..570f22d023 100644 --- a/plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp +++ b/plugins/!NotAdopted/SmartAutoAway/dlgproc.cpp @@ -75,7 +75,7 @@ BOOL CALLBACK DlgProcAutoAwayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM tci.lParam = (LPARAM)theDialogAA;
tci.pszText = TranslateT("Statuses");
GetClientRect(theDialogAA,&rcClient);
- SendMessage(GetDlgItem(hwndDlg, IDC_OPT_SAA_TAB), TCM_INSERTITEM, (WPARAM)0, (LPARAM)&tci);
+ SendMessage(GetDlgItem(hwndDlg, IDC_OPT_SAA_TAB), TCM_INSERTITEM, 0, (LPARAM)&tci);
MoveWindow((HWND)theDialogAA,theTabSpace.left+(theTabSpace.right-rcClient.right)/2,
theTabSpace.top+(theTabSpace.bottom-rcClient.bottom)/2,
rcClient.right,rcClient.bottom,1);
diff --git a/plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp b/plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp index bc5ad2a255..367bd93a77 100644 --- a/plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp +++ b/plugins/!NotAdopted/SmartAutoAway/idleMenu.cpp @@ -2,8 +2,8 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright 2000-2006 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -59,38 +59,37 @@ static int IconLibIconsChanged(WPARAM wParam, LPARAM lParam) int i;
for (i=0;i<4;i++)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IdleServices[i]);
+ HICON hIcon = Skin_GetIcon(IdleServices[i]);
CListSetMenuItemIcon(hIdleMenu[i], hIcon);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)IdleServices[i]);
+ Skin_ReleaseIcon(IdleServices[i]);
}
return 0;
}
-void AddIdleMenu(){
+void AddIdleMenu(){
CLISTMENUITEM mi;
int i;
- if (ServiceExists(MS_SKIN2_GETICON)){
- SKINICONDESC sid = {0};
- hHookIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, IconLibIconsChanged);
- hasIcoLib = 1;
- sid.cbSize = SKINICONDESC_SIZE_V2;
- sid.pszSection = SECTIONNAME;
- sid.pszDefaultFile = NULL;
- sid.iDefaultIndex = 0;
- for (i=0;i<4;i++){
- sid.pszDescription = iconDescs[i];
- sid.pszName = IdleServices[i];
- sid.iDefaultIndex = iconInd[i];
- sid.hDefaultIcon = (HICON)LoadImage(
- #ifdef SAA_PLUGIN
- g_hInst,
- #else
- GetModuleHandle(NULL),
- #endif
- MAKEINTRESOURCE( iconInd[i] ), IMAGE_ICON, 0, 0, 0);
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- DestroyIcon(sid.hDefaultIcon);
- }
+
+ SKINICONDESC sid = {0};
+ hHookIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, IconLibIconsChanged);
+ hasIcoLib = 1;
+ sid.cbSize = SKINICONDESC_SIZE_V2;
+ sid.pszSection = SECTIONNAME;
+ sid.pszDefaultFile = NULL;
+ sid.iDefaultIndex = 0;
+ for (i=0;i<4;i++){
+ sid.pszDescription = iconDescs[i];
+ sid.pszName = IdleServices[i];
+ sid.iDefaultIndex = iconInd[i];
+ sid.hDefaultIcon = (HICON)LoadImage(
+ #ifdef SAA_PLUGIN
+ g_hInst,
+ #else
+ GetModuleHandle(NULL),
+ #endif
+ MAKEINTRESOURCE( iconInd[i] ), IMAGE_ICON, 0, 0, 0);
+ Skin_AddIcon(&sid);
+ DestroyIcon(sid.hDefaultIcon);
}
ZeroMemory(&mi,sizeof(mi));
@@ -99,41 +98,27 @@ void AddIdleMenu(){ mi.popupPosition=1000090000;
for (i=0;i<4;i++)
{
- if (hasIcoLib)
- mi.hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IdleServices[i]);
- else
- mi.hIcon = (HICON)LoadImage(
- #ifdef SAA_PLUGIN
- g_hInst,
- #else
- GetModuleHandle(NULL),
- #endif
- MAKEINTRESOURCE(iconInd[i]), IMAGE_ICON, 0, 0, 0);
-
- mi.position=i+1;
- mi.pszName=iconDescs[i];
- mi.pszService=IdleServices[i];
- if (i==3) mi.position=1000000;
- hIdleMenu[i]=(HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
-
- if (hasIcoLib)
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)IdleServices[i]);
- else
- DestroyIcon(mi.hIcon);
+ mi.hIcon = Skin_GetIcon(IdleServices[i]);
+ mi.position = i+1;
+ mi.pszName = iconDescs[i];
+ mi.pszService = IdleServices[i];
+ if (i==3) mi.position = 1000000;
+ hIdleMenu[i] = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+
+ Skin_ReleaseIcon(IdleServices[i]);
}
-// return 0;
}
MIRANDASERVICE idleServiceNotIdle(WPARAM w, LPARAM l){
- SimulateIdle(0);
+ SimulateIdle(0);
return 0;
};
MIRANDASERVICE idleServiceShortIdle(WPARAM w, LPARAM l){
- SimulateIdle(1);
+ SimulateIdle(1);
return 0;
};
MIRANDASERVICE idleServiceLongIdle(WPARAM w, LPARAM l){
- SimulateIdle(2);
+ SimulateIdle(2);
return 0;
};
MIRANDASERVICE reconnectService(WPARAM w, LPARAM l){
diff --git a/plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp b/plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp index d83f82c51d..b0522406e9 100644 --- a/plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp +++ b/plugins/!NotAdopted/SmartAutoReplier/SarLuaScript.cpp @@ -110,7 +110,7 @@ int CSarLuaScript::SendMessage(CLuaBridge & luaBridge) int CSarLuaScript::GetMyStatus(CLuaBridge & luaBridge)
{
lua_State *pFunctionContext = (lua_State*)luaBridge;
- int nStatusMode = CallService(MS_CLIST_GETSTATUSMODE, (WPARAM)0, (LPARAM)0);
+ int nStatusMode = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
nStatusMode = g_nCurrentMode;
@@ -217,7 +217,7 @@ int CSarLuaScript::SetMyStatus(CLuaBridge & luaBridge) nNewStatus = ID_STATUS_OUTTOLUNCH;
}
- CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)nNewStatus, (LPARAM)0);
+ CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)nNewStatus, 0);
return FALSE;
}
diff --git a/plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h b/plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h index 00df403181..616be6aac4 100644 --- a/plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h +++ b/plugins/!NotAdopted/SmartAutoReplier/wtl/atlctrls.h @@ -7000,7 +7000,7 @@ public: int GetRangeLimit(BOOL bLowLimit) const
{
ATLASSERT(::IsWindow(m_hWnd));
- return (int)::SendMessage(m_hWnd, PBM_GETRANGE, bLowLimit, (LPARAM)NULL);
+ return (int)::SendMessage(m_hWnd, PBM_GETRANGE, bLowLimit, 0);
}
DWORD SetRange32(int nMin, int nMax)
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h b/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h index f12ff96172..feae6e69de 100644 --- a/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h +++ b/plugins/!NotAdopted/Xfire/xfiretest/baseProtocol.h @@ -248,7 +248,7 @@ typedef struct { //
// Add a icon into options UI
//
-// wParam = (WPARAM)0
+// wParam = 0
// lParam = (LPARAM)(SKINICONDESC*)sid;
//
#define MS_SKIN2_ADDICON "Skin2/Icons/AddIcon"
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/main.cpp b/plugins/!NotAdopted/Xfire/xfiretest/main.cpp index f90eedce0b..1c590e0107 100644 --- a/plugins/!NotAdopted/Xfire/xfiretest/main.cpp +++ b/plugins/!NotAdopted/Xfire/xfiretest/main.cpp @@ -3,7 +3,7 @@ //#define MIRANDA_VER 0x801
/*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
+ * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
*
* Copyright (C) 2010 by
* dufte <dufte@justmail.de>
@@ -25,7 +25,7 @@ * Based on J. Lawler - BaseProtocol
* Herbert Poul/Beat Wolf - xfirelib
*
- * Miranda ICQ: the free icq client for MS Windows
+ * Miranda ICQ: the free icq client for MS Windows
* Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
*
*/
@@ -54,7 +54,7 @@ #include "inviterequestpacket.h"
#include "buddylistgames2packet.h"
#include "dummyxfiregameresolver.h"
-#include "sendtypingpacket.h"
+#include "sendtypingpacket.h"
#include "xfireclanpacket.h"
#include "recvremovebuddypacket.h"
#include "gameinfopacket.h"
@@ -298,7 +298,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { }
- XFireClient::XFireClient(string username_,string password_,char protover,int useproxy,string proxyip,int proxyport)
+ XFireClient::XFireClient(string username_,string password_,char protover,int useproxy,string proxyip,int proxyport)
: username(username_), password(password_) {
client = new Client();
client->setGameResolver( new DummyXFireGameResolver() );
@@ -343,7 +343,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { *(temp+100)=0;
}
SendStatusMessagePacket *packet = new SendStatusMessagePacket();
-
+
if(myClient->useutf8)
packet->awaymsg = s.c_str();
else
@@ -409,7 +409,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { psr.lastName = (char*)fb->lname->at(i).c_str();
ProtoBroadcastAck(protocolname, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) 1, (LPARAM) & psr);
}
-
+
ProtoBroadcastAck(protocolname, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
break;
}
@@ -425,7 +425,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { if(entry)
ProcessBuddyInfo(buddyinfo,entry->hcontact,(char*)entry->username.c_str());
-
+
break;
}
case XFIRE_CLANINVITATION_ID:
@@ -453,7 +453,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { }
}
break;
- }
+ }
case XFIRE_RECVREMOVEBUDDYPACKET:
{
RecvRemoveBuddyPacket *remove = (RecvRemoveBuddyPacket*)content;
@@ -470,7 +470,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { {
if(myClient->client->connected)
{
- //
+ //
if (bpStatus == ID_STATUS_AWAY)
myClient->Status(statusmessage[1]);
else
@@ -496,7 +496,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { char temp[255];
char * dummy;
- ClanBuddyListNamesPacket *clan = (ClanBuddyListNamesPacket*)content;
+ ClanBuddyListNamesPacket *clan = (ClanBuddyListNamesPacket*)content;
sprintf(temp,"Clan_%d",clan->clanid);
DBVARIANT dbv;
@@ -560,7 +560,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { //handlingBuddys(entry,0,NULL);
}
break;
- }*/
+ }*/
case XFIRE_BUDDYS_GAMES_ID:
{
vector<char *> *sids=NULL; //dieses array dient zu zwischensicherung von unbekannten sids
@@ -582,8 +582,8 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { memcpy(sid,((BuddyListGamesPacket*)content)->sids->at(i),16);
//ab ins array damit
sids->push_back(sid);
- }
- else
+ }
+ else
{
if(entry->game==0&&
entry->hcontact!=0&&
@@ -629,7 +629,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { xfire_newc.username=(char*)invite->name.c_str();
xfire_newc.nick=(char*)invite->nick.c_str();
xfire_newc.id=0;
-
+
HANDLE handle=CList_AddContact(xfire_newc,TRUE,TRUE,0);
if(handle) { // invite nachricht mitsenden
@@ -638,7 +638,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { PROTORECVEVENT pre;
str=(char*)invite->msg.c_str();
-
+
time_t t = time(NULL);
ccs.szProtoService = PSR_MESSAGE;
ccs.hContact = handle;
@@ -665,7 +665,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { case XFIRE_CLAN_PACKET:
{
char temp[100];
- XFireClanPacket *clan = (XFireClanPacket*)content;
+ XFireClanPacket *clan = (XFireClanPacket*)content;
for(int i=0;i<clan->count;i++)
{
@@ -687,7 +687,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { break;
case XFIRE_LOGIN_SUCCESS_ID: //login war erfolgreich
{
- LoginSuccessPacket *login = (LoginSuccessPacket*)content;
+ LoginSuccessPacket *login = (LoginSuccessPacket*)content;
char * temp = mir_utf8decode((char*)login->nick.c_str(),NULL);
//nick speichern
DBWriteContactSettingString(NULL,protocolname,"Nick",temp);
@@ -703,7 +703,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { case XFIRE_RECV_OLDVERSION_PACKET_ID:
{
- RecvOldVersionPacket *version = (RecvOldVersionPacket*)content;
+ RecvOldVersionPacket *version = (RecvOldVersionPacket*)content;
char temp[255];
if((unsigned int)client->protocolVersion<(unsigned int)version->newversion)
@@ -764,7 +764,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { CallService(MS_PROTO_CONTACTISTYPING,(WPARAM)ccs.hContact,PROTOTYPE_CONTACTTYPING_OFF);
CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
-
+
}
}
else if( (( MessagePacket*)content)->getMessageType() == 3) {
@@ -872,7 +872,7 @@ void StartIniUpdateAndDetection(LPVOID dummy) if(DBGetContactSettingByte(NULL,protocolname,"autoiniupdate",0))
UpdateMyXFireIni(NULL);
if(DBGetContactSettingByte(NULL,protocolname,"autoicodllupdate",0))
- UpdateMyIcons(NULL);
+ UpdateMyIcons(NULL);
#ifndef NO_PTHREAD
void* (*func)(void*) = &inigamedetectiont;
@@ -906,7 +906,7 @@ int UrlCall(WPARAM wparam,LPARAM lparam) { //nach = suchen
char*g=strchr(q,'=');
//gefunden? dann abschneiden
- if(g)
+ if(g)
{
*g=0;
g++;
@@ -1085,7 +1085,7 @@ int ExtraListRebuild(WPARAM wparam, LPARAM lparam) return xgamelist.iconmngr.resetIconHandles();
}
-int ExtraImageApply(WPARAM wparam, LPARAM lparam)
+int ExtraImageApply(WPARAM wparam, LPARAM lparam)
{
HANDLE hContact=(HANDLE)wparam;
if(ServiceExists(MS_CLIST_EXTRA_SET_ICON))
@@ -1193,7 +1193,7 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) strcpy(servicefunction, protocolname);
strcat(servicefunction, PS_GETMYAVATAR);
CreateServiceFunction(servicefunction, GetMyAvatar);
-
+
//nur bei miranda8 den iconrefresh machen
if(miranda8) {
HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, ExtraImageApply);
@@ -1219,7 +1219,7 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) strcpy(servicefunction, protocolname);
strcat(servicefunction, PSR_MESSAGE);
CreateServiceFunction( servicefunction, RecvMessage );
-
+
strcpy(servicefunction, XFIRE_URLCALL);
CreateServiceFunction( servicefunction, UrlCall );
@@ -1337,7 +1337,7 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) mi.pszName = LPGEN("Remove F&riend ...");
removefriend=(HANDLE)CallService( MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi );
- //block user
+ //block user
strcpy(servicefunction, protocolname);
strcat(servicefunction, "BlockFriend");
CreateServiceFunction(servicefunction,BlockFriend);
@@ -1406,22 +1406,18 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) XFireLog("Wasn't able to get GetExtendedUdpTable function");
}
- if(ServiceExists(MS_SKIN2_GETICON))
- {
- char szFile[MAX_PATH];
- GetModuleFileNameA(hinstance, szFile, MAX_PATH);
-
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
- sid.pszDefaultFile = szFile;
- sid.cx = sid.cy = 16;
- sid.pszSection = (char*)LPGEN( "Protocols/XFire" );
- sid.pszName = "XFIRE_main";
- sid.pszDescription = (char*)Translate("Protocol icon");
- sid.iDefaultIndex = -IDI_TM;
- CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
- }
+ char szFile[MAX_PATH];
+ GetModuleFileNameA(hinstance, szFile, MAX_PATH);
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.pszDefaultFile = szFile;
+ sid.cx = sid.cy = 16;
+ sid.pszSection = (char*)LPGEN( "Protocols/XFire" );
+ sid.pszName = "XFIRE_main";
+ sid.pszDescription = (char*)Translate("Protocol icon");
+ sid.iDefaultIndex = -IDI_TM;
+ Skin_AddIcon(&sid);
return 0;
}
@@ -1467,7 +1463,7 @@ static void SetStatusLate( LPVOID param ) Sleep(1000);
if(bpStatus==ID_STATUS_OFFLINE)
{
- SetStatus((WPARAM)param,(LPARAM)NULL);
+ SetStatus((WPARAM)param,0);
}
}
@@ -1493,10 +1489,10 @@ static int UserIsTyping(WPARAM wParam, LPARAM lParam) if(myClient!=NULL)
if(myClient->client->connected)
if(!DBGetContactSettingTString(hContact, protocolname, "Username",&dbv))
- {
+ {
SendTypingPacket typing;
typing.init(myClient->client, dbv.pszVal);
- myClient->client->send( &typing );
+ myClient->client->send( &typing );
DBFreeVariant(&dbv);
}
}
@@ -1575,17 +1571,9 @@ int GetName(WPARAM wParam,LPARAM lParam) int TMLoadIcon(WPARAM wParam,LPARAM lParam)
{
if(LOWORD( wParam ) == PLI_PROTOCOL) {
- if(ServiceExists(MS_SKIN2_GETICON))
- {
- if(wParam & PLIF_ICOLIB)
- return CallService( MS_SKIN2_GETICON, 0, (LPARAM)"XFIRE_main" );
- else
- return (int)CopyIcon((HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"XFIRE_main" ));
- }
- else
- {
- return (int)LoadImage(hinstance, MAKEINTRESOURCE(IDI_TM), IMAGE_ICON, GetSystemMetrics(wParam&PLIF_SMALL?SM_CXSMICON:SM_CXICON), GetSystemMetrics(wParam&PLIF_SMALL?SM_CYSMICON:SM_CYICON), 0);
- }
+ if(wParam & PLIF_ICOLIB)
+ return Skin_GetIcon("XFIRE_main");
+ return (int)CopyIcon( Skin_GetIcon("XFIRE_main"));
}
return NULL;
}
@@ -1619,7 +1607,7 @@ static void ConnectingThread(LPVOID params) oldStatus = bpStatus;
bpStatus = wParam;
- ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,wParam);
+ ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,wParam);
LeaveCriticalSection(&connectingMutex);
}
@@ -1670,7 +1658,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam) else
{
CallService(MS_DB_CRYPT_DECODESTRING,strlen(dbv2.pszVal)+1,(LPARAM)dbv2.pszVal);
-
+
if(myClient!=NULL)
delete myClient;
@@ -1735,7 +1723,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam) {
if(bpStatus == ID_STATUS_OFFLINE) // nix
{
- }
+ }
else if(myClient!=NULL&&myClient->client->connected) // online --> afk
{
//setze bei aktivem nocustomaway die alte awaystatusmsg zurück, bugfix
@@ -1757,7 +1745,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam) //teamspeak/ventrilo pid sowie gamepid auf NULL setzen, damit bei einem reconnect die neuerkannt werden
pid=NULL;
- ts2pid=NULL;
+ ts2pid=NULL;
DBWriteContactSettingWord(NULL,protocolname,"currentgame",0);
DBWriteContactSettingWord(NULL,protocolname,"currentvoice",0);
DBDeleteContactSetting(NULL,protocolname, "VServerIP");
@@ -1777,7 +1765,7 @@ int SetStatus(WPARAM wParam,LPARAM lParam) bpStatus = wParam;
ProtoBroadcastAck(protocolname,NULL,ACKTYPE_STATUS,ACKRESULT_SUCCESS,(HANDLE)oldStatus,wParam);
-
+
return 0;
}
@@ -1798,11 +1786,11 @@ int GetStatus(WPARAM wParam,LPARAM lParam) HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan)
{
- HANDLE hContact;
+ HANDLE hContact;
if (xfc.username == NULL)
return 0;
-
+
// here we create a new one since no one is to be found
hContact = (HANDLE) CallService( MS_DB_CONTACT_ADD, 0, 0);
if ( hContact ) {
@@ -1825,13 +1813,13 @@ HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan) DBWriteContactSettingTString(hContact, protocolname, "Nick", xfc.username);
DBWriteContactSettingTString(hContact, protocolname, "Username", xfc.username);
-
+
//DBWriteContactSettingTString(hContact, protocolname, "Screenname", xfc.nick);
DBWriteContactSettingDword(hContact, protocolname, "UserId", xfc.id);
if(clan>0)
DBWriteContactSettingDword(hContact, protocolname, "Clan", clan);
-
+
DBWriteContactSettingWord(hContact, protocolname, "Status", SetOnline ? ID_STATUS_ONLINE:ID_STATUS_OFFLINE);
if(DBGetContactSettingByte(NULL,protocolname,"noavatars",-1)==0)
@@ -1846,8 +1834,8 @@ HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan) }
else
{
- /*
- scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
+ /*
+ scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
getestet mit clanbuddy's >270 members
mit hilfe der buddyinfos kann man den avatar laden und screenshot infos etc bekommt man auch
@@ -1863,7 +1851,7 @@ HANDLE CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan) if (xfc.id==0) {
DBWriteContactSettingByte( hContact, "CList", "NotOnList", 1 );
DBWriteContactSettingByte( hContact, "CList", "Hidden", 1 );
- }
+ }
return hContact;
}
@@ -1893,7 +1881,7 @@ HANDLE CList_FindContact (int uid) {
return (HANDLE)hContact;
}
- }
+ }
hContact = (HANDLE) CallService( MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
}
return 0;
@@ -1967,7 +1955,7 @@ void CList_MakeAllOffline() }
}
DBWriteContactSettingWord(hContact,protocolname,"Status",ID_STATUS_OFFLINE);
- }
+ }
hContact = (HANDLE) CallService( MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
}
//alle gefundenen handles lsöchen
@@ -2001,7 +1989,7 @@ void SetAvatar2(LPVOID lparam) { GetBuddyInfo* buddyinfo=(GetBuddyInfo*)lparam;
if(myClient!=NULL)
if(myClient->client->connected)
- myClient->client->send( buddyinfo );
+ myClient->client->send( buddyinfo );
delete lparam;
lasttime-=sleep;
@@ -2054,7 +2042,7 @@ void SetAvatar(LPVOID lparam) }
BOOL GetAvatar(char* username,XFireAvatar* av)
-{
+{
BOOL status=FALSE;
if(av==NULL||username==NULL)
@@ -2072,7 +2060,7 @@ BOOL GetAvatar(char* username,XFireAvatar* av) nlhr.szUrl = address;
nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlib,(LPARAM)&nlhr);
-
+
if(nlhrReply) {
//nicht auf dem server
if (nlhrReply->resultCode != 200) {
@@ -2088,7 +2076,7 @@ BOOL GetAvatar(char* username,XFireAvatar* av) else
{
//fwrite(nlhrReply->pData,nlhrReply->dataLength,1,f);
-
+
//id wo angefangen wird, die adresse "rauszuschneiden"
char avatarid[]="m_user_avatar_img_wrapper";
char* pointer_av=avatarid;
@@ -2102,7 +2090,7 @@ BOOL GetAvatar(char* username,XFireAvatar* av) {
if(*pointer_av==*pointer)
{
- pointer_av++;
+ pointer_av++;
if(pointer_av-avatarid>4)
found=TRUE;
}
@@ -2357,7 +2345,7 @@ int RebuildContactMenu( WPARAM wParam, LPARAM lParam ) else
DBFreeVariant(&dbv2);
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )vipport, ( LPARAM )&clmi2 );
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )vipport, ( LPARAM )&clmi2 );
//clansite nur bei clanmembern anbieten
if(DBGetContactSettingDword((HANDLE)wParam, protocolname, "Clan",0)==0)
@@ -2385,7 +2373,7 @@ int RebuildContactMenu( WPARAM wParam, LPARAM lParam ) //gameobject holen
Xfire_game* game=xgamelist.getGamebyGameid(gameid);
//hat das spiel netzwerkparameter?
- if(game)
+ if(game)
{
if(game->networkparams)
{
@@ -2436,7 +2424,7 @@ void SetXFireGameStatusMsg(Xfire_game* game) {
char inipath[XFIRE_MAX_STATIC_STRING_LEN]="";
static char statusmsg[100]="";
-
+
//kein gameobject, dann abbrechen
if(!game) return;
@@ -2559,7 +2547,7 @@ void gamedetectiont(LPVOID lparam) if(myClient!=NULL)
myClient->client->send( packet );
}
- delete packet;
+ delete packet;
}
else
@@ -2585,15 +2573,15 @@ void gamedetectiont(LPVOID lparam) DBWriteContactSettingTString(NULL, protocolname, "currentvoicename", "Mumble");
DBWriteContactSettingWord(NULL,protocolname,"currentvoice",vid);
-
+
sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
DBWriteContactSettingTString(NULL, protocolname, "VServerIP", temp);
-
+
if(myClient!=NULL)
myClient->client->send( packet );
}
}
- delete packet;
+ delete packet;
}
}
else
@@ -2613,7 +2601,7 @@ void gamedetectiont(LPVOID lparam) if(myClient!=NULL)
myClient->client->send( packet );
ts2pid=0;
- delete packet;
+ delete packet;
}
else
{
@@ -2633,7 +2621,7 @@ void gamedetectiont(LPVOID lparam) myClient->client->send( packet );
}
}
- delete packet;
+ delete packet;
}
//if(op!=NULL) CloseHandle(op);
}
@@ -2664,7 +2652,7 @@ void gamedetectiont(LPVOID lparam) if(DBGetContactSettingByte(NULL,protocolname,"sendgamestatus",1))
if(myClient!=NULL)
myClient->client->send( packet );
-
+
//spielzeit messen
time_t t2=time(NULL);
time_t t3=t2-t1;
@@ -2683,7 +2671,7 @@ void gamedetectiont(LPVOID lparam) sprintf(temp,Translate("Last game: %s playtime: %.2d:%.2d:%.2d"),currentgame->name,mytm->tm_hour,mytm->tm_min,mytm->tm_sec);
DBWriteContactSettingTString(NULL, protocolname, "LastGame", temp);
-
+
if(currentgame->noicqstatus!=TRUE&&DBGetContactSettingByte(NULL,protocolname,"autosetstatusmsg",0))
SetOldStatusMsg();
@@ -2696,7 +2684,7 @@ void gamedetectiont(LPVOID lparam) {
if(ServiceExists("PopUp/EnableDisableMenuCommand"))
{
- CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
+ CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
}
else if(ServiceExists("PopUp/ToggleEnabled"))
{
@@ -2714,14 +2702,14 @@ void gamedetectiont(LPVOID lparam) //bug beseitigt, wenn spiel beendet, alte ip entfernen
DBDeleteContactSetting(NULL,protocolname, "ServerIP");
-
+
pid=NULL;
currentgame=NULL;
xgamelist.SetGameStatus(FALSE);
NotifyEventHooks(hookgamestart,0,0);
- delete packet;
+ delete packet;
}
else //noch offen
{
@@ -2736,7 +2724,7 @@ void gamedetectiont(LPVOID lparam) //XFireLog("IPPort detection ...","");
if(GetServerIPPort(pid,myClient->client->localaddr,myClient->client->llocaladdr,&packet->ip[3],&packet->ip[2],&packet->ip[1],&packet->ip[0],&packet->port))
{
-
+
if(packet->ip[3]!=0)
{
sprintf(temp,"%d.%d.%d.%d:%d",(unsigned char)packet->ip[3],(unsigned char)packet->ip[2],(unsigned char)packet->ip[1],(unsigned char)packet->ip[0],packet->port);
@@ -2753,7 +2741,7 @@ void gamedetectiont(LPVOID lparam) if(currentgame->noicqstatus!=TRUE&&DBGetContactSettingByte(NULL,protocolname,"autosetstatusmsg",0))
SetGameStatusMsg();
}
- delete packet;
+ delete packet;
}
//XFireLog("fertig ...","");
//packet->=xf[currentgame].gameid2;
@@ -2770,7 +2758,7 @@ void gamedetectiont(LPVOID lparam) processInfo->dwSize = sizeof ( PROCESSENTRY32);
XFireLog("XFire Gamedetection - Suche laufende Spiele ...");
-
+
//gamelist blocken
xgamelist.Block(TRUE);
@@ -2787,7 +2775,7 @@ void gamedetectiont(LPVOID lparam) if(nextgame->checkpath(processInfo))
{
SendGameStatusPacket *packet = new SendGameStatusPacket() ;
-
+
XFireLog("XFire Gamedetection - Spiel gefunden: %i",nextgame->id);
if(myClient!=NULL)
@@ -2799,7 +2787,7 @@ void gamedetectiont(LPVOID lparam) DBWriteContactSettingString(NULL,protocolname,"currentgamename",currentgame->name);
packet->gameid=currentgame->send_gameid;
t1=time(NULL);
-
+
if(DBGetContactSettingByte(NULL,protocolname,"sendgamestatus",1))
{
XFireLog("XFire Gamedetection - Sendgame-ID: %i",currentgame->send_gameid);
@@ -2832,7 +2820,7 @@ void gamedetectiont(LPVOID lparam) if(ServiceExists("PopUp/EnableDisableMenuCommand")&&DBGetContactSettingByte(NULL,"PopUp","ModuleIsEnabled",0)==1&&DBGetContactSettingByte(NULL,"PopUp","DisableWhenFullscreen",0)==0) /**/
{
disabledpopups=TRUE;
- CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
+ CallService("PopUp/EnableDisableMenuCommand",NULL,NULL);
}
else if(ServiceExists("PopUp/ToggleEnabled")&&DBGetContactSettingByte(NULL,"YAPP","Enabled",0)==1)
{
@@ -2854,7 +2842,7 @@ void gamedetectiont(LPVOID lparam) }
}
}
- CloseHandle ( hSnapShot);
+ CloseHandle ( hSnapShot);
//gamelist unblocken
xgamelist.Block(FALSE);
@@ -2898,7 +2886,7 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg) && *(away+2)=='F'
&& *(away+3)=='K'
&& *(away+4)==')')
- ||
+ ||
(*(away)=='('
&&*(away+1)=='A'
&& *(away+2)=='B'
@@ -2929,7 +2917,7 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg) strcat(temp2," ");
DBFreeVariant(&dbv);
}
-
+
if(DBGetContactSettingByte(NULL,protocolname,"noipportinstatus",0)==0)
{
if(!DBGetContactSettingTString(entry->hcontact,protocolname, "ServerName",&dbv))
@@ -2949,7 +2937,7 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg) }
}
}
-
+
strncpy(status,temp2,97);
if(strlen(entry->statusmsg.c_str())>0)
@@ -2993,8 +2981,8 @@ void setBuddyStatusMsg(BuddyListEntry *entry,string statusmsg) }
else
{
- /*
- scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
+ /*
+ scheinbar unterpricht xfire bei zu agressiven nachfragen der buddyinfos die verbindung , deshalb erstmal auskommentiert
getestet mit clanbuddy's >270 members
mit hilfe der buddyinfos kann man den avatar laden und screenshot infos etc bekommt man auch
@@ -3047,12 +3035,12 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) if(strlen(entry->nick.c_str())>0&&DBGetContactSettingByte(NULL,protocolname,"shownicks",1))
{
char*nick=NULL;
-
+
if(myClient->useutf8)
nick=( char* )entry->nick.c_str();
else
nick=mir_utf8decode(( char* )entry->nick.c_str(),NULL);
-
+
if(nick)
{
if(myClient->useutf8)
@@ -3098,7 +3086,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) DBWriteContactSettingTString(hContact, protocolname, "GameInfo", entry->gameinfo.c_str());
//beim voicechat foglendes machn
- if(entry->game2>0)
+ if(entry->game2>0)
{
gameob=(DummyXFireGame*)entry->game2Obj; //obj wo ip und port sind auslesen
@@ -3120,7 +3108,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) DBDeleteContactSetting(hContact, protocolname, "VPort");
}
}
-
+
DBWriteContactSettingWord(hContact, protocolname, "VoiceId", entry->game2);
SetIcon(hContact,xgamelist.iconmngr.getGameIconHandle(entry->game2),EXTRA_ICON_ADV2); //icon seperat setzen
@@ -3133,7 +3121,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) DBDeleteContactSetting(hContact, protocolname, "VoiceId");
SetIcon(hContact,(HANDLE)-1,EXTRA_ICON_ADV2);
}
-
+
//beim game folgendes machen
if(entry->game>0)
{
@@ -3169,7 +3157,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) //nein dann username
entry->username.c_str():
//klar, dann nick nehmen
- entry->nick.c_str())
+ entry->nick.c_str())
,gname,(unsigned char)gameob->ip[3],(unsigned char)gameob->ip[2],(unsigned char)gameob->ip[1],(unsigned char)gameob->ip[0],(unsigned long)gameob->port);
}
}
@@ -3207,7 +3195,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) }
}
}
-
+
if(gameob)
{
if((unsigned char)gameob->ip[3]!=0)
@@ -3318,7 +3306,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) if(clan>0)
{
int val=DBGetContactSettingByte(NULL,protocolname,"mainclangroup",0);
-
+
if( DBGetContactSettingByte(NULL,protocolname,"skipfriendsgroups",0)==0 ||
(DBGetContactSettingByte(NULL,protocolname,"skipfriendsgroups",0)==1&&
DBGetContactSettingByte(entry->hcontact, protocolname, "isfriend", 0)==0)
@@ -3346,7 +3334,7 @@ HANDLE handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan) else if(clan==-1)//hauptgruppe für fof
{
int val=DBGetContactSettingByte(NULL,protocolname,"fofgroup",0);
-
+
if(val==0)
{
DBWriteContactSettingTString(entry->hcontact, "CList", "Group", group);
@@ -3380,7 +3368,7 @@ int AddtoList( WPARAM wParam, LPARAM lParam ) { if (ccs->hContact)
{
- DBVARIANT dbv2;
+ DBVARIANT dbv2;
if(!DBGetContactSetting(ccs->hContact,protocolname,"Username",&dbv2)) {
if(myClient!=NULL)
@@ -3390,7 +3378,7 @@ int AddtoList( WPARAM wParam, LPARAM lParam ) { accept.name = dbv2.pszVal;
myClient->client->send(&accept );
}
-
+
//temporären buddy entfernen, da eh ein neues packet kommt
DBWriteContactSettingByte(ccs->hContact, protocolname, "DontSendDenyPacket", 1);
CallService(MS_DB_CONTACT_DELETE, (WPARAM) ccs->hContact, 0);
@@ -3478,8 +3466,8 @@ void CreateGroup(char*grpn,char*field) { DBWriteContactSettingByte(NULL,protocolname,field,0);
}
}
-
-
+
+
char group[255]="";
char temp[10];
int i=0;
@@ -3552,7 +3540,7 @@ int SetAwayMsg(WPARAM wParam, LPARAM lParam) { static void SendAMAck( LPVOID param )
{
DBVARIANT dbv;
-
+
if(!DBGetContactSettingTString((HANDLE)param, protocolname, "XStatusMsg",&dbv))
{
ProtoBroadcastAck(protocolname, (HANDLE)param, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, LPARAM(dbv.pszVal));
@@ -3627,7 +3615,7 @@ int StartGame(WPARAM wParam,LPARAM lParam,LPARAM fParam) { xgamelist.Block(TRUE);
Xfire_game*game=xgamelist.getGamebyGameid(fParam);
-
+
//starte das spiel
if(game)
game->start_game();
@@ -3702,7 +3690,7 @@ int StartThisGame(WPARAM wParam,LPARAM lParam) { //hole passendes spielobjekt
Xfire_game*game=xgamelist.getGamebyGameid(id);
-
+
//starte das spiel
if(game)
game->start_game();
@@ -3722,7 +3710,7 @@ int JoinGame(WPARAM wParam,LPARAM lParam) { //hole passendes spielobjekt
Xfire_game*game=xgamelist.getGamebyGameid(id);
-
+
//starte das spiel
if(game)
{
@@ -3754,7 +3742,7 @@ int doneQuery( WPARAM wParam, LPARAM lParam ) { sprintf(temp,"(%d/%d)",gameinfo->players,gameinfo->maxplayers);
DBWriteContactSettingTString(bud->hcontact, protocolname, "Players", temp);
DBWriteContactSettingByte(bud->hcontact, protocolname, "Passworded", gameinfo->password);
-
+
if(myClient!=NULL)
handlingBuddys(bud,0,NULL,TRUE);
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/options.cpp b/plugins/!NotAdopted/Xfire/xfiretest/options.cpp index b87e9133d8..10e4fbb25a 100644 --- a/plugins/!NotAdopted/Xfire/xfiretest/options.cpp +++ b/plugins/!NotAdopted/Xfire/xfiretest/options.cpp @@ -642,7 +642,7 @@ static BOOL CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM dbces.pfnEnumProc = enumSettingsProc;
dbces.szModule = "XFireBlock";
dbces.lParam = (LPARAM)hwndDlg;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)NULL,(LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, 0,(LPARAM)&dbces);
SendMessage(GetDlgItem(hwndDlg,IDC_REMUSER),BM_SETIMAGE,IMAGE_ICON,(WPARAM)LoadSkinnedIcon(SKINICON_OTHER_DELETE));
@@ -669,9 +669,9 @@ static BOOL CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if(sel!=LB_ERR) //nur wenn was ausgewählt wurde
{
SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETTEXT, sel, (LPARAM)temp);
- SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_DELETESTRING, sel, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_DELETESTRING, sel, 0);
DBDeleteContactSetting(NULL,"XFireBlock",temp);
- if(SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETCOUNT, (WPARAM)0, (LPARAM)0)==0)
+ if(SendDlgItemMessage(hwndDlg, IDC_BLOCKUSER, LB_GETCOUNT, 0, 0)==0)
EnableDlgItem(hwndDlg, IDC_REMUSER, FALSE);
}
}
@@ -996,7 +996,7 @@ static BOOL CALLBACK DlgProcOpts6(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if(hicon)
SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,(WPARAM)hicon,0);
else
- SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,(WPARAM)NULL,0);
+ SendMessage(GetDlgItem(hwndDlg,IDC_GAMEICO),STM_SETICON,0,0);
//elemente aktivieren
EnableDlgItem(hwndDlg, IDC_DONTDETECT, TRUE);
diff --git a/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp b/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp index 8de46776d8..44e755cd28 100644 --- a/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp +++ b/plugins/!NotAdopted/Xfire/xfiretest/tools.cpp @@ -1,5 +1,5 @@ /*
- * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
+ * Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
*
* Copyright (C) 2010 by
* dufte <dufte@justmail.de>
@@ -21,7 +21,7 @@ * Based on J. Lawler - BaseProtocol
* Herbert Poul/Beat Wolf - xfirelib
*
- * Miranda ICQ: the free icq client for MS Windows
+ * Miranda ICQ: the free icq client for MS Windows
* Copyright (C) 2000-2008 Richard Hughes, Roland Rabien & Tristan Van de Vreede
*
*/
@@ -96,15 +96,9 @@ int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hi if (bIconsNotLoaded)
{
- if (ServiceExists(MS_SKIN2_GETICON))
- {
- hicNotify = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"popup_notify");
- hicWarning = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"popup_warning");
- hicError = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"popup_error");
- }
- if (!hicNotify) hicNotify = LoadIcon(NULL, IDI_INFORMATION);
- if (!hicWarning) hicWarning = LoadIcon(NULL, IDI_WARNING);
- if (!hicError) hicError = LoadIcon(NULL, IDI_ERROR);
+ hicNotify = Skin_GetIcon("popup_notify");
+ hicWarning = Skin_GetIcon("popup_warning");
+ hicError = Skin_GetIcon("popup_error");
bIconsNotLoaded = FALSE;
}
@@ -201,7 +195,7 @@ void MessageE(LPVOID msg) switch(DBGetContactSettingByte(NULL,protocolname,"nomsgbox",0))
{
case 0:
- if(!already)
+ if(!already)
{
already=TRUE; //keine doppelte fehlernachrichten
Message(msg);
@@ -250,7 +244,7 @@ char* GetLaunchPath(char*launch) {
*(strrchr(temp,'\\'))=0;
}
-
+
return temp;
}
//roll bits, vllt ein tickschneller als die funktionen von winsock
@@ -408,7 +402,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1, //socker erstellen
- SOCKET s;
+ SOCKET s;
s = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
if(s==INVALID_SOCKET)
{
@@ -417,13 +411,13 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1, closesocket(s);
return FALSE;
}
-
+
static struct sockaddr_in msockaddr;
memset(&msockaddr,0,sizeof(msockaddr));
msockaddr.sin_addr.s_addr = localaddr;
msockaddr.sin_family = AF_INET;
msockaddr.sin_port = 0;
-
+
//socket an nw binden
if (bind(s, (sockaddr *)&msockaddr, sizeof(msockaddr)) == SOCKET_ERROR)
{
@@ -432,7 +426,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1, closesocket(s);
return FALSE;
}
-
+
//wir wollen alles was da reinkommt haben
static int I = 1;
static DWORD b;
@@ -501,7 +495,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1, DUMP("Dump Full packet##############","");
DUMP("Headersize: %d",(temp.ipv & 0x0f)*4);*/
-
+
temp3=(char*)&temp;
temp3+=(temp.ipv & 0x0f)*4;
temp2=(udp*)temp3;
@@ -512,7 +506,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1, DUMP("Dump Udp##############","");*/
- for(unsigned int i = 0 ; i < localport.size() ; i++)
+ for(unsigned int i = 0 ; i < localport.size() ; i++)
{
//DUMP("destport %d ==",temp2->dstport);
//DUMP("== %d",localport.at(i));
@@ -536,7 +530,7 @@ BOOL GetServerIPPort(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1, XFireLog("got ip!");
return TRUE;
}
-
+
XFireLog("no serverip found!");
return FALSE;
}
@@ -621,22 +615,22 @@ BOOL GetServerIPPort2(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1 //socker erstellen
- SOCKET s;
+ SOCKET s;
s = socket(AF_INET, SOCK_RAW, IPPROTO_UDP);
-
+
static struct sockaddr_in msockaddr;
memset(&msockaddr,0,sizeof(msockaddr));
msockaddr.sin_addr.s_addr = localaddr;
msockaddr.sin_family = AF_INET;
msockaddr.sin_port = 0;
-
+
//socket an nw binden
if (bind(s, (sockaddr *)&msockaddr, sizeof(msockaddr)) == SOCKET_ERROR)
{
closesocket(s);
return FALSE;
}
-
+
//wir wollen alles was da reinkommt haben
static int I = 1;
DWORD b;
@@ -699,7 +693,7 @@ BOOL GetServerIPPort2(DWORD pid,char*localaddrr,unsigned long localaddr,char*ip1 temp2=(udp*)temp3;
temp4=(mpacket2*)&temp;
- for(unsigned int i = 0 ; i < localport.size() ; i++)
+ for(unsigned int i = 0 ; i < localport.size() ; i++)
if(temp2->dstport==localport.at(i)/*FIX: für XP SP3 ->*/&&temp4->srcip!=localaddr) //ist das ziel des packets, gleich dem port des spiels
{
*port=r(temp2->srcport); //ja dann serverdaten an gamethread übermitteln
@@ -816,7 +810,7 @@ BOOL checkCommandLine(HANDLE hProcess,char * mustcontain,char * mustnotcontain) //commandline bekommen, siehe link oben
ULONG rc = _ZwQueryInformationProcess(hProcess,ProcessBasicInformation,&ProcessInfo,sizeof(ProcessInfo),NULL);
-
+
rc = _ZwReadVirtualMemory(hProcess,ProcessInfo.PebBaseAddress, UserPool, sizeof(PEB), NULL);
peb = (PPEB)UserPool;
@@ -839,7 +833,7 @@ BOOL checkCommandLine(HANDLE hProcess,char * mustcontain,char * mustnotcontain) buffer=(WCHAR*)new char[uSize];
rc = _ZwReadVirtualMemory(hProcess, pBaseAddress, buffer, uSize, NULL);
-
+
//in ansi umwandeln
int correctsize=WideCharToMultiByte(CP_OEMCP, 0, buffer, -1, NULL, 0, NULL, NULL);
@@ -951,7 +945,7 @@ BOOL GetWWWContent2(char*address,char*filename,BOOL dontoverwrite,char**tobuf,un if(GetFileAttributes(filename)!=0xFFFFFFFF)
{
Netlib_Logf(hNetlib,"%s already exists, no overwrite.",filename);
- return TRUE;
+ return TRUE;
}
}
Netlib_Logf(hNetlib,"Download Url %s ...",address);
@@ -964,7 +958,7 @@ BOOL GetWWWContent2(char*address,char*filename,BOOL dontoverwrite,char**tobuf,un nlhr.szUrl = address;
nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlib,(LPARAM)&nlhr);
-
+
if(nlhrReply) {
//nicht auf dem server
if (nlhrReply->resultCode != 200) {
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index 3a0a01f946..38749f997b 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -165,7 +165,7 @@ bool AddContactDlgAccounts(HWND hdlg, ADDCONTACTSTRUCT* acs) cbei.iImage = cbei.iSelectedImage = ImageList_AddIcon(hIml, hIcon);
DestroyIcon(hIcon);
cbei.lParam = (LPARAM)pAccounts[i]->szModuleName;
- SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_INSERTITEM, 0, (LPARAM)&cbei);
+ SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_INSERTITEM, 0, (LPARAM)&cbei);
if (acs->szProto && cbei.lParam && !strcmp(acs->szProto, pAccounts[i]->szModuleName))
iIndex = cbei.iItem;
cbei.iItem++;
@@ -197,11 +197,11 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp Utils_RestoreWindowPositionNoSize(hdlg, NULL, "AddContact", "");
TranslateDialogDefault(hdlg);
- SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)CallService(MS_SKIN2_GETICON, 1, (LPARAM)ICON_ADD));
- SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)CallService(MS_SKIN2_GETICON, 0, (LPARAM)ICON_ADD));
+ SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIcon(ICON_ADD,1));
+ SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon(ICON_ADD));
HookEventMessage(ME_SKIN2_ICONSCHANGED, hdlg, DM_ADDCONTACT_CHANGEICONS);
HookEventMessage(ME_PROTO_ACCLISTCHANGED, hdlg, DM_ADDCONTACT_CHANGEACCLIST);
-
+
{
for (int groupId = 0; groupId < 999; groupId++)
{
@@ -371,7 +371,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp if (IsDlgButtonChecked(hdlg, IDC_ADDED))
CallContactService(hContact, PSS_ADDED, 0, 0);
- if (IsDlgButtonChecked(hdlg, IDC_AUTH))
+ if (IsDlgButtonChecked(hdlg, IDC_AUTH))
{
DWORD flags = CallProtoService(acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH)
@@ -407,8 +407,8 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp break;
case DM_ADDCONTACT_CHANGEICONS:
- CallService(MS_SKIN2_RELEASEICONBIG, (WPARAM)SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)CallService(MS_SKIN2_GETICON, 1, (LPARAM)ICON_ADD)), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)CallService(MS_SKIN2_GETICON, 0, (LPARAM)ICON_ADD)), 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIcon(ICON_ADD, 1)));
+ Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon(ICON_ADD)));
break;
case DM_ADDCONTACT_CHANGEACCLIST:
@@ -420,8 +420,8 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp case WM_DESTROY:
hAddDlg = NULL;
- CallService(MS_SKIN2_RELEASEICONBIG, (WPARAM)SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_SMALL, 0));
ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_GETIMAGELIST, 0, 0));
acs = (ADDCONTACTSTRUCT*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
if (acs)
diff --git a/plugins/Alarms/src/icons.cpp b/plugins/Alarms/src/icons.cpp index 5a07541e27..d1f1fc7e93 100644 --- a/plugins/Alarms/src/icons.cpp +++ b/plugins/Alarms/src/icons.cpp @@ -7,11 +7,11 @@ HICON hIconMenuSet, hIconList1, hIconList2, hIconMenuShowHide, hIconSystray; int ReloadIcons(WPARAM wParam, LPARAM lParam)
{
- hIconMenuSet = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_menu_set");
- hIconList1 = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_list1");
- hIconList2 = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_list2");
+ hIconMenuSet = Skin_GetIcon("alarms_menu_set");
+ hIconList1 = Skin_GetIcon("alarms_list1");
+ hIconList2 = Skin_GetIcon("alarms_list2");
if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME))
- hIconMenuShowHide = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_menu_showhide");
+ hIconMenuShowHide = Skin_GetIcon("alarms_menu_showhide");
RefreshReminderFrame();
return 0;
@@ -59,13 +59,13 @@ void InitIcons() sid.hDefaultIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_MAINMENU), IMAGE_ICON, 16, 16, 0);
Skin_AddIcon(&sid);
- hIconMenuShowHide = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_menu_showhide");
+ hIconMenuShowHide = Skin_GetIcon("alarms_menu_showhide");
}
- hIconMenuSet = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_menu_set");
- hIconList1 = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_list1");
- hIconList2 = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_list2");
- hIconSystray = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"alarms_systray");
+ hIconMenuSet = Skin_GetIcon("alarms_menu_set");
+ hIconList1 = Skin_GetIcon("alarms_list1");
+ hIconList2 = Skin_GetIcon("alarms_list2");
+ hIconSystray = Skin_GetIcon("alarms_systray");
hIcoLibIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, ReloadIcons);
}
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp index 3c6169a11d..db39e995f6 100644 --- a/plugins/AssocMgr/src/test.cpp +++ b/plugins/AssocMgr/src/test.cpp @@ -120,7 +120,7 @@ static int ServiceParseAimLink(WPARAM wParam,LPARAM lParam) ZeroMemory(&psr,sizeof(PROTOSEARCHRESULT));
psr.cbSize=sizeof(PROTOSEARCHRESULT);
psr.nick=sn;
- CallService(MS_ADDCONTACT_SHOW,(WPARAM)NULL,(LPARAM)&acs);
+ CallService(MS_ADDCONTACT_SHOW,0,(LPARAM)&acs);
}
return 0;
}
@@ -295,7 +295,7 @@ static void AddIcqUser(ICQFILEINFO *info) psr.uin=uin;
psr.auth=1; /* authentication needed flag */
psr.uid=NULL; /* icq contact */
- CallService(MS_ADDCONTACT_SHOW,(WPARAM)NULL,(LPARAM)&acs);
+ CallService(MS_ADDCONTACT_SHOW,0,(LPARAM)&acs);
}
}
}
@@ -306,7 +306,7 @@ static void MessageIcqUser(ICQFILEINFO *info) if(ServiceExists(MS_MSG_SENDMESSAGE)) {
hContact=HContactFromUIN(atoi(info->uin),NULL); /* adds the contact if needed */
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,(LPARAM)NULL);
+ CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
}
}
@@ -441,7 +441,7 @@ static int ServiceParseYmsgrLink(WPARAM wParam,LPARAM lParam) ZeroMemory(&psr,sizeof(PROTOSEARCHRESULT));
psr.cbSize=sizeof(PROTOSEARCHRESULT);
psr.nick=id;
- CallService(MS_ADDCONTACT_SHOW,(WPARAM)NULL,(LPARAM)&acs);
+ CallService(MS_ADDCONTACT_SHOW,0,(LPARAM)&acs);
}
return 0;
}
@@ -558,7 +558,7 @@ static int ServiceParseMsnimLink(WPARAM wParam,LPARAM lParam) psr.cbSize=sizeof(PROTOSEARCHRESULT);
psr.nick=email;
psr.email=email;
- CallService(MS_ADDCONTACT_SHOW,(WPARAM)NULL,(LPARAM)&acs);
+ CallService(MS_ADDCONTACT_SHOW,0,(LPARAM)&acs);
}
return 0;
}
@@ -579,7 +579,7 @@ static int ServiceParseMsnimLink(WPARAM wParam,LPARAM lParam) if(ServiceExists(MS_MSG_SENDMESSAGE)) {
hContact=MSN_HContactFromEmail(email,email,TRUE,TRUE); /* does not yet check if email is current user */
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,(LPARAM)NULL);
+ CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
}
return 0;
}
@@ -646,7 +646,7 @@ static int ServiceParseLink(WPARAM wParam,LPARAM lParam) if(ServiceExists(MS_MSG_SENDMESSAGE)) {
hContact=gg_getcontact(atoi(arg),TRUE,FALSE,arg);
if(hContact!=NULL)
- CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,(LPARAM)NULL);
+ CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
}
}
return 0;
@@ -754,7 +754,7 @@ static int ServiceParseXmppURI(WPARAM wParam,LPARAM lParam) ZeroMemory(&psr,sizeof(PROTOSEARCHRESULT));
psr.cbSize=sizeof(PROTOSEARCHRESULT);
psr.nick=jid;
- CallService(MS_ADDCONTACT_SHOW,(WPARAM)NULL,(LPARAM)&acs);
+ CallService(MS_ADDCONTACT_SHOW,0,(LPARAM)&acs);
}
return 0;
}
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index d16afa4969..842d2c912b 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -140,9 +140,9 @@ int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam) g_IECAuthGrant.ColumnType = clistIcon;
if (ServiceExists(MS_CLIST_EXTRA_ADD_ICON)) {
- g_IECAuth.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"auth_icon"), (LPARAM)0);
- g_IECGrant.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"grant_icon"), (LPARAM)0);
- g_IECAuthGrant.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"authgrant_icon"), (LPARAM)0);
+ g_IECAuth.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("auth_icon"), 0);
+ g_IECGrant.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("grant_icon"), 0);
+ g_IECAuthGrant.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("authgrant_icon"), 0);
}
return 0;
diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp index 425edb3831..33f0d53260 100644 --- a/plugins/AutoShutdown/src/frame.cpp +++ b/plugins/AutoShutdown/src/frame.cpp @@ -234,8 +234,8 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA UnhookEvent(dat->hHookIconsChanged);
/* other childs are destroyed automatically */
if(dat->hwndToolTip!=NULL) DestroyWindow(dat->hwndToolTip);
- hIcon=(HICON)SendMessage(dat->hwndIcon,STM_SETIMAGE,IMAGE_ICON,(LPARAM)NULL);
- IcoLib_ReleaseIcon(hIcon); /* does NULL check */
+ hIcon=(HICON)SendMessage(dat->hwndIcon,STM_SETIMAGE,IMAGE_ICON,0);
+ Skin_ReleaseIcon(hIcon); /* does NULL check */
break;
}
case WM_NCDESTROY:
@@ -281,9 +281,9 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA }
case M_REFRESH_ICONS:
if(dat->hwndIcon!=NULL)
- IcoLib_ReleaseIcon((HICON)SendMessage(dat->hwndIcon,STM_SETIMAGE,IMAGE_ICON,(LPARAM)IcoLib_GetIcon("AutoShutdown_Header")));
+ Skin_ReleaseIcon((HICON)SendMessage(dat->hwndIcon,STM_SETIMAGE,IMAGE_ICON,(LPARAM)Skin_GetIcon("AutoShutdown_Header")));
if(hFrame) /* refresh frame title icon */
- IcoLib_ReleaseIcon(SetFrameTitleIcon(hFrame,IcoLib_GetIcon("AutoShutdown_Active")));
+ Skin_ReleaseIcon(SetFrameTitleIcon(hFrame,Skin_GetIcon("AutoShutdown_Active")));
return 0;
case M_REFRESH_FONTS:
{ LOGFONT lf;
@@ -343,7 +343,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwndFrame,UINT msg,WPARAM wParam,LPARA }
dat->flags&=~FWPDF_COUNTDOWNINVALID;
/* commctl 4.70+, Win95: 1-100 will work fine (wrap around) */
- SendMessage(dat->hwndProgress,PBM_SETRANGE32,(WPARAM)0,(LPARAM)dat->countdown);
+ SendMessage(dat->hwndProgress,PBM_SETRANGE32,0,(LPARAM)dat->countdown);
return 0;
case WM_TIMER:
if(dat==NULL) return 0;
@@ -537,7 +537,7 @@ void ShowCountdownFrame(WORD fTimeFlags) CLISTFrame clf;
ZeroMemory(&clf,sizeof(clf));
clf.cbSize=sizeof(clf);
- clf.hIcon=IcoLib_GetIcon("AutoShutdown_Active"); /* CListFrames does not make a copy */
+ clf.hIcon=Skin_GetIcon("AutoShutdown_Active"); /* CListFrames does not make a copy */
clf.align=alBottom;
clf.height=GetSystemMetrics(SM_CYICON);
clf.Flags=F_VISIBLE|F_SHOWTBTIP|F_NOBORDER|F_SKINNED;
@@ -570,7 +570,7 @@ void CloseCountdownFrame(void) if(hwndCountdownFrame!=NULL) {
SendMessage(hwndCountdownFrame,M_CLOSE_COUNTDOWN,0,0);
if(hFrame) {
- IcoLib_ReleaseIcon(SetFrameTitleIcon(hFrame,NULL));
+ Skin_ReleaseIcon(SetFrameTitleIcon(hFrame,NULL));
/* HACKS TO FIX CLUIFrames:
* workaround #6: MS_CLIST_FRAMES_REMOVEFRAME does not finish with
* destroy cycle (clist_modern, clist_nicer crashes) */
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index aa7ed6678a..2131c768aa 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -71,7 +71,7 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR hwndSettingsDlg=hwndDlg;
TranslateDialogDefault(hwndDlg);
locale=CallService(MS_LANGPACK_GETLOCALE,0,0);
- SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,(LPARAM)IcoLib_GetIcon("AutoShutdown_Header"));
+ SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,(LPARAM)Skin_GetIcon("AutoShutdown_Header"));
{ HFONT hBoldFont;
LOGFONT lf;
if(GetObject((HFONT)SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_GETFONT,0,0),sizeof(lf),&lf)) {
@@ -191,10 +191,10 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR CallService(MS_AUTOREPLACER_REMWINHANDLE,0,(LPARAM)GetDlgItem(hwndDlg,IDC_EDIT_MESSAGE));
Utils_SaveWindowPosition(hwndDlg,NULL,"AutoShutdown","SettingsDlg_");
MagneticWindows_RemoveWindow(hwndDlg);
- hIcon=(HICON)SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,(LPARAM)NULL);
- IcoLib_ReleaseIcon(hIcon); /* does NULL check */
+ hIcon=(HICON)SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,0);
+ Skin_ReleaseIcon(hIcon); /* does NULL check */
hFont=(HFONT)SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_GETFONT,0,0);
- SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_SETFONT,(WPARAM)NULL,FALSE); /* no return value */
+ SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_SETFONT,0,FALSE); /* no return value */
if(hFont!=NULL) DeleteObject(hFont);
hwndSettingsDlg=NULL;
return TRUE;
@@ -463,7 +463,7 @@ void SetShutdownMenuItem(BOOL fActive) }
else hTrayMenuItem = Menu_AddTrayMenuItem(&cmi);
- IcoLib_ReleaseIcon(cmi.hIcon);
+ Skin_ReleaseIcon(cmi.hIcon);
}
static INT_PTR MenuItemCommand(WPARAM wParam,LPARAM lParam)
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 3c33d39653..c8f524e874 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -169,7 +169,7 @@ static DWORD ShutdownNow(BYTE shutdownType) break;
case SDSDT_SETMIRANDAOFFLINE:
/* set global status mode to offline (is remembered by Miranda on exit) */
- CallService(MS_CLIST_SETSTATUSMODE,(WPARAM)ID_STATUS_OFFLINE,(LPARAM)NULL);
+ CallService(MS_CLIST_SETSTATUSMODE,(WPARAM)ID_STATUS_OFFLINE,0);
break;
case SDSDT_STANDBY:
case SDSDT_HIBERNATE:
@@ -368,7 +368,7 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR if(lParam==SDSDT_SHUTDOWN || lParam==SDSDT_REBOOT || lParam==SDSDT_LOGOFF)
ShowWindow(GetDlgItem(hwndDlg,IDC_TEXT_UNSAVEDWARNING),SW_SHOW);
- SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,(LPARAM)IcoLib_GetIcon("AutoShutdown_Header"));
+ SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,(LPARAM)Skin_GetIcon("AutoShutdown_Header"));
{ HFONT hBoldFont;
LOGFONT lf;
if(GetObject((HFONT)SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_GETFONT,0,0),sizeof(lf),&lf)) {
@@ -404,10 +404,10 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR /* reallow foreground window changes (WinMe/2000+) */
if(pfnLockSetForegroundWindow) pfnLockSetForegroundWindow(LSFW_UNLOCK);
Utils_SaveWindowPosition(hwndDlg,NULL,"AutoShutdown","ConfirmDlg_");
- hIcon=(HICON)SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,(LPARAM)NULL);
- IcoLib_ReleaseIcon(hIcon); /* does NULL check */
+ hIcon=(HICON)SendDlgItemMessage(hwndDlg,IDC_ICON_HEADER,STM_SETIMAGE,IMAGE_ICON,0);
+ Skin_ReleaseIcon(hIcon); /* does NULL check */
hFont=(HFONT)SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_GETFONT,0,0);
- SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_SETFONT,(WPARAM)NULL,FALSE); /* no return value */
+ SendDlgItemMessage(hwndDlg,IDC_TEXT_HEADER,WM_SETFONT,0,FALSE); /* no return value */
if(hFont!=NULL) DeleteObject(hFont);
return TRUE;
}
diff --git a/plugins/AutoShutdown/src/utils.cpp b/plugins/AutoShutdown/src/utils.cpp index c0128f80d6..c6dd625531 100644 --- a/plugins/AutoShutdown/src/utils.cpp +++ b/plugins/AutoShutdown/src/utils.cpp @@ -116,7 +116,7 @@ char* GetWinErrorDescription(DWORD dwLastError) char *buf=NULL;
DWORD flags=FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM;
if(!FormatMessageA(flags,NULL,dwLastError,LANGIDFROMLCID((LCID)CallService(MS_LANGPACK_GETLOCALE,0,0)),(char*)&buf,0,NULL))
- if(GetLastError()==ERROR_RESOURCE_LANG_NOT_FOUND)
+ if(GetLastError()==ERROR_RESOURCE_LANG_NOT_FOUND)
FormatMessageA(flags,NULL,dwLastError,0,(char*)&buf,0,NULL);
return buf;
}
@@ -155,11 +155,11 @@ BOOL TimeStampToSystemTime(time_t timestamp,SYSTEMTIME *st) return TRUE;
}
-BOOL GetFormatedCountdown(TCHAR *pszOut,int nSize,time_t countdown)
+BOOL GetFormatedCountdown(TCHAR *pszOut,int nSize,time_t countdown)
{
static BOOL fInited=FALSE;
static int (WINAPI *pfnStrFromTimeInterval)(TCHAR*,UINT,DWORD,int);
- static int (WINAPI *pfnGetDurationFormat)(LCID,DWORD,const SYSTEMTIME*,double,WCHAR*,WCHAR*,int);
+ static int (WINAPI *pfnGetDurationFormat)(LCID,DWORD,const SYSTEMTIME*,double,WCHAR*,WCHAR*,int);
/* Init */
if(!fInited) {
*(PROC*)&pfnGetDurationFormat=GetProcAddress(GetModuleHandleA("KERNEL32"),"GetDurationFormat");
@@ -185,7 +185,7 @@ BOOL GetFormatedCountdown(TCHAR *pszOut,int nSize,time_t countdown) return FALSE;
}
-BOOL GetFormatedDateTime(TCHAR *pszOut,int nSize,time_t timestamp,BOOL fShowDateEvenToday)
+BOOL GetFormatedDateTime(TCHAR *pszOut,int nSize,time_t timestamp,BOOL fShowDateEvenToday)
{
SYSTEMTIME st,stNow;
LCID locale;
@@ -250,7 +250,7 @@ int FontService_RegisterColor(const char *pszDbModule,const char *pszDbName,cons ColourIDT cid;
ZeroMemory(&cid,sizeof(cid));
cid.cbSize=sizeof(cid);
- cid.defcolour=clrDefault;
+ cid.defcolour=clrDefault;
lstrcpynA(cid.dbSettingsGroup,pszDbModule,sizeof(cid.dbSettingsGroup)); /* buffer safe */
lstrcpynA(cid.setting,pszDbName,sizeof(cid.setting)); /* buffer safe */
lstrcpyn(cid.group,pszSection,SIZEOF(cid.group)); /* buffer safe */
@@ -291,16 +291,6 @@ HANDLE IcoLib_AddIconRes(const char *pszDbName,const TCHAR *pszSection,const TCH return Skin_AddIcon(&sid);
}
-HICON IcoLib_GetIcon(const char *pszDbName)
-{
- return (HICON)CallService(MS_SKIN2_GETICON,0,(LPARAM)pszDbName);
-}
-
-int IcoLib_ReleaseIcon(HICON hIcon)
-{
- return CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon,0);
-}
-
int SkinAddNewSoundBundled(const char *pszDbName,const char *pszSection,const char *pszDesc,const char *pszSubDir,const char *pszDefaultFile)
{
SKINSOUNDDESCEX ssd;
diff --git a/plugins/AutoShutdown/src/utils.h b/plugins/AutoShutdown/src/utils.h index d70dd980d7..189906e57a 100644 --- a/plugins/AutoShutdown/src/utils.h +++ b/plugins/AutoShutdown/src/utils.h @@ -42,7 +42,5 @@ int FontService_GetColor(const TCHAR *pszSection,const TCHAR *pszDescription,COL /* Skin */
HANDLE IcoLib_AddIconRes(const char *pszDbName,const TCHAR *pszSection,const TCHAR *pszDesc,HINSTANCE hInst,WORD idRes,BOOL fLarge);
-HICON IcoLib_GetIcon(const char *pszDbName);
-int IcoLib_ReleaseIcon(HICON hIcon);
int SkinAddNewSoundBundled(const char *pszDbName,const char *pszSection,const char *pszDesc,const char *pszSubDir,const char *pszDefaultFile);
void AddHotkey();
diff --git a/plugins/AvatarHistory/src/icolib.cpp b/plugins/AvatarHistory/src/icolib.cpp index a4105eef3c..76bc96d80c 100644 --- a/plugins/AvatarHistory/src/icolib.cpp +++ b/plugins/AvatarHistory/src/icolib.cpp @@ -27,9 +27,9 @@ static HICON LoadIconEx(IconIndex i) HICON hIcon;
if (hHooks[4])
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)iconList[(int)i].szName);
+ hIcon = Skin_GetIcon(iconList[(int)i].szName);
else
- hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(iconList[(int)i].defIconID),
+ hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(iconList[(int)i].defIconID),
IMAGE_ICON, 0, 0, 0);
return hIcon;
@@ -39,7 +39,7 @@ static HICON LoadIconEx(IconIndex i) static void ReleaseIconEx(HICON hIcon)
{
if (hHooks[4])
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
else
DestroyIcon(hIcon);
}
@@ -75,7 +75,7 @@ void SetupIcoLib() sid.ptszDefaultFile = path;
sid.flags = SIDF_ALL_TCHAR;
- for (unsigned i = 0; i < MAX_REGS(iconList); i++)
+ for (unsigned i = 0; i < MAX_REGS(iconList); i++)
{
if (!iconList[i].core)
{
@@ -129,7 +129,6 @@ HICON createProtoOverlayedIcon(HANDLE hContact) HICON resIcon = getOverlayedIcon(icon0, icon1, FALSE);
ReleaseIconEx(icon1);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)icon0, 0);
-
+ Skin_ReleaseIcon(icon0);
return resIcon;
}
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index c16db18830..06f7f69e27 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -83,48 +83,35 @@ HistoryWindow::~HistoryWindow() if(eventIcoms != NULL)
{
for(int i = 0; i < iconsNum; ++i)
- {
if(eventIcoms[i] != NULL)
- {
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)eventIcoms[i], 0);
- }
- }
+ Skin_ReleaseIcon(eventIcoms[i]);
delete[] eventIcoms;
}
if(plusIco != NULL)
- {
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)plusIco, 0);
- }
+ Skin_ReleaseIcon(plusIco);
+
if(minusIco != NULL)
- {
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)minusIco, 0);
- }
+ Skin_ReleaseIcon(minusIco);
+
if(findNextIco != NULL)
- {
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)findNextIco, 0);
- }
+ Skin_ReleaseIcon(findNextIco);
+
if(findPrevIco != NULL)
- {
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)findPrevIco, 0);
- }
+ Skin_ReleaseIcon(findPrevIco);
+
if(himlSmall != NULL)
- {
ImageList_Destroy(himlSmall);
- }
+
if(himlNone != NULL)
- {
ImageList_Destroy(himlNone);
- }
+
if(bkBrush != NULL)
- {
DeleteObject(bkBrush);
- }
+
if(bkFindBrush != NULL)
- {
DeleteObject(bkFindBrush);
- }
}
std::map<HANDLE, HistoryWindow*> HistoryWindow::windows;
@@ -643,7 +630,7 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP urd.hwndDlg=hwndDlg;
urd.hInstance=hInst;
urd.lpTemplate=MAKEINTRESOURCEA(IDD_HISTORY);
- urd.lParam=(LPARAM)NULL;
+ urd.lParam=0;
urd.pfnResizer=HistoryWindow::HistoryDlgResizer;
CallService(MS_UTILS_RESIZEDIALOG,0,(LPARAM)&urd);
ListView_SetColumnWidth(GetDlgItem(hwndDlg,IDC_LIST), 0, LVSCW_AUTOSIZE_USEHEADER);
@@ -1216,8 +1203,8 @@ void HistoryWindow::Initialise() ScreenToClient(hWnd, &pt);
listOryginalPos = pt.x;
- plusIco = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 1, (LPARAM)hPlusIcon);
- minusIco = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 1, (LPARAM)hMinusIcon);
+ plusIco = Skin_GetIconByHandle(hPlusIcon, 1);
+ minusIco = Skin_GetIconByHandle(hMinusIcon, 1);
SendDlgItemMessage( hWnd, IDC_SHOWHIDE, BUTTONSETASPUSHBTN, TRUE, 0 );
SendDlgItemMessage( hWnd, IDC_SHOWHIDE, BUTTONSETASFLATBTN, TRUE, 0 );
if(hContact == NULL || Options::instance->showContacts)
@@ -1257,7 +1244,7 @@ void HistoryWindow::Initialise() eventIcoms = new HICON[allIconNumber];
for(int i = 0; i < iconsNum; ++i)
{
- eventIcoms[i] = hEventIcons[i] == NULL ? NULL : (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hEventIcons[i]);
+ eventIcoms[i] = hEventIcons[i] == NULL ? NULL : Skin_GetIconByHandle(hEventIcons[i]);
ImageList_AddIcon(himlSmall, eventIcoms[i]);
}
@@ -1297,9 +1284,9 @@ void HistoryWindow::Initialise() HIMAGELIST himlButtons = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 3, 3);
if(himlButtons)
{
- findNextIco = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hFindNextIcon);
+ findNextIco = Skin_GetIconByHandle(hFindNextIcon);
ImageList_AddIcon(himlButtons, findNextIco);
- findPrevIco = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hFindPrevIcon);
+ findPrevIco = Skin_GetIconByHandle(hFindPrevIcon);
ImageList_AddIcon(himlButtons, findPrevIco);
configIco = LoadSkinnedIcon(SKINICON_OTHER_OPTIONS);
ImageList_AddIcon(himlButtons, configIco);
@@ -1307,7 +1294,7 @@ void HistoryWindow::Initialise() ImageList_AddIcon(himlButtons, deleteIco);
// Set the image list.
- SendMessage(toolbarWindow, TB_SETIMAGELIST, (WPARAM)0, (LPARAM)himlButtons);
+ SendMessage(toolbarWindow, TB_SETIMAGELIST, 0, (LPARAM)himlButtons);
// Load the button images.
SendMessage(toolbarWindow, TB_LOADIMAGES, (WPARAM)IDB_STD_SMALL_COLOR, (LPARAM)HINST_COMMCTRL);
@@ -1338,10 +1325,10 @@ void HistoryWindow::Initialise() void HistoryWindow::Destroy()
{
HICON hIcon = (HICON)SendMessage(hWnd, WM_SETICON, ICON_BIG, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
hIcon = (HICON)SendMessage(hWnd, WM_SETICON, ICON_SMALL, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
UnregisterHotkeyControl(GetDlgItem(hWnd, IDC_SHOWHIDE));
UnregisterHotkeyControl(GetDlgItem(hWnd, IDC_LIST_CONTACTS));
diff --git a/plugins/BasicHistory/src/RichHtmlExport.cpp b/plugins/BasicHistory/src/RichHtmlExport.cpp index 5a772a4914..d1254e4dcc 100644 --- a/plugins/BasicHistory/src/RichHtmlExport.cpp +++ b/plugins/BasicHistory/src/RichHtmlExport.cpp @@ -318,18 +318,21 @@ void RichHtmlExport::WriteHeader(const std::wstring &fileName, const std::wstrin ExtractFile(IDR_CSS, css);
ExtractFile(IDR_JS, folder + _T("\\history.js"));
- HICON ico = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hPlusExIcon);
+ HICON ico = Skin_GetIconByHandle(hPlusExIcon);
IcoSave(folder + _T("\\pnode.ico"), ico);
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)ico, 0);
- ico = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hMinusExIcon);
+ Skin_ReleaseIcon(ico);
+
+ ico = Skin_GetIconByHandle(hMinusExIcon);
IcoSave(folder + _T("\\mnode.ico"), ico);
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)ico, 0);
- ico = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hEventIcons[0]);
+ Skin_ReleaseIcon(ico);
+
+ ico = Skin_GetIconByHandle(hEventIcons[0]);
IcoSave(folder + _T("\\event0.ico"), ico);
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)ico, 0);
- ico = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hEventIcons[1]);
+ Skin_ReleaseIcon(ico);
+
+ ico = Skin_GetIconByHandle(hEventIcons[1]);
IcoSave(folder + _T("\\event1.ico"), ico);
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)ico, 0);
+ Skin_ReleaseIcon(ico);
EXP_FILE << _T("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
EXP_FILE << _T("<html><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=") << encoding << _T("\">\n");
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index fa36b477bf..551ec82a96 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -49,7 +49,7 @@ TCHAR **oldStatusMsg; BYTE g_bOldSetting;
int hLangpack;
-PWTSRegisterSessionNotification wtsRegisterSessionNotification ;
+PWTSRegisterSessionNotification wtsRegisterSessionNotification ;
PWTSUnRegisterSessionNotification wtsUnRegisterSessionNotification;
PFNDwmIsCompositionEnabled dwmIsCompositionEnabled;
@@ -90,7 +90,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam) {
static DWORD dwOldIcon = 0;
HICON hIcon = 0;
-
+
switch(uMsg)
{
case WM_INITDIALOG:
@@ -103,11 +103,11 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam) if (IsAeroMode())
{
SetWindowLongPtr(hDlg, GWL_STYLE, GetWindowLongPtr(hDlg, GWL_STYLE) | WS_DLGFRAME | WS_SYSMENU);
-
+
RECT rect;
GetClientRect(hDlg, &rect);
SetWindowPos(hDlg, 0, 0, 0, rect.right, rect.bottom +
- GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CXSIZEFRAME),
+ GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CXSIZEFRAME),
SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER);
}
SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_SETICON, 0, (LPARAM)hIcon);
@@ -117,8 +117,8 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam) oldLangID = 0;
SetTimer(hDlg,1,200,NULL);
- oldLayout = GetKeyboardLayout(0);
- if (MAKELCID((WORD)oldLayout & 0xffffffff, SORT_DEFAULT) != (LCID)0x00000409)
+ oldLayout = GetKeyboardLayout(0);
+ if (MAKELCID((WORD)oldLayout & 0xffffffff, SORT_DEFAULT) != (LCID)0x00000409)
ActivateKeyboardLayout((HKL)0x00000409, 0);
LanguageChanged(hDlg);
return TRUE;
@@ -167,7 +167,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam) case WM_DESTROY:
{
KillTimer(hDlg, 1);
- if (GetKeyboardLayout(0) != oldLayout)
+ if (GetKeyboardLayout(0) != oldLayout)
ActivateKeyboardLayout(oldLayout, 0);
SetClassLongPtr(hDlg, GCLP_HICON, (long)dwOldIcon);
DestroyIcon(hIcon);
@@ -209,7 +209,7 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM lParam) else
if (lstrcmpA(szTemp,"PopupWnd2") == 0 || lstrcmpA(szTemp,"YAPPWinClass") == 0) // destroy opened popups
SendMessage(hWnd, UM_DESTROYPOPUP,0,0);
-// else
+// else
// if (lstrcmpA(szTemp,"#32770") == 0)
// SendMessage(hWnd, WM_CLOSE,0,0);
else
@@ -220,7 +220,7 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM lParam) node->next = g_pMirWnds;
g_pMirWnds = node;
ShowWindow(hWnd,SW_HIDE);
- }
+ }
}
return(true);
}
@@ -228,11 +228,11 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM lParam) TCHAR* GetDefStatusMsg(unsigned uStatus, const char* szProto)
{
TCHAR *ret = (TCHAR *)CallService ( MS_AWAYMSG_GETSTATUSMSGT, (WPARAM)uStatus, (LPARAM)szProto );
- if ( (int)ret == CALLSERVICE_NOTFOUND )
+ if ( (int)ret == CALLSERVICE_NOTFOUND )
{
char* tmp = ( char* )CallService( MS_AWAYMSG_GETSTATUSMSG, (WPARAM)uStatus, (LPARAM)szProto );
ret = mir_a2t( tmp );
- mir_free( tmp );
+ mir_free( tmp );
}
return ret;
}
@@ -257,11 +257,11 @@ static int ChangeAllProtoStatuses(unsigned statusMode, TCHAR *msg) {
unsigned status = CallProtoService(proto[i]->szModuleName,PS_GETSTATUS,0,0);
if (
- (g_wMask & OPT_ONLINEONLY) ? // check "Change only if current status is Online" option
+ (g_wMask & OPT_ONLINEONLY) ? // check "Change only if current status is Online" option
((status == ID_STATUS_ONLINE) || (status == ID_STATUS_FREECHAT)) // process only "online" and "free for chat"
- :
+ :
((status > ID_STATUS_OFFLINE) && (status < ID_STATUS_IDLE) && (status != ID_STATUS_INVISIBLE)) // process all existing statuses except for "invisible" & "offline"
- )
+ )
{
if (g_wMask & OPT_SETONLINEBACK){ // need to save old statuses & status messages
oldStatus[i] = status;
@@ -294,7 +294,7 @@ static int BackAllProtoStatuses(void) {
if ( oldStatus[i] )
{
- SetStatus(proto[i]->szModuleName, oldStatus[i], oldStatusMsg[i]);
+ SetStatus(proto[i]->szModuleName, oldStatus[i], oldStatusMsg[i]);
if (oldStatusMsg[i])
{
mir_free(oldStatusMsg[i]);
@@ -322,7 +322,7 @@ static void CreateTrayIcon(bool create) nim.hWnd = g_hListenWindow;
nim.uID = 100;
nim.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
- nim.hIcon = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"hidemim" );
+ nim.hIcon = Skin_GetIcon("hidemim");
nim.uCallbackMessage = WM_USER + 24;
Shell_NotifyIcon(create ? NIM_ADD : NIM_DELETE, &nim);
g_TrayIcon = create;
@@ -394,11 +394,11 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) }
else
{
- if (ServiceExists(MS_VARS_FORMATSTRING))
+ if (ServiceExists(MS_VARS_FORMATSTRING))
{
FORMATINFO fi;
TCHAR *ptszParsed;
-
+
ZeroMemory(&fi, sizeof(fi));
fi.cbSize = sizeof(fi);
fi.flags = FIF_TCHAR;
@@ -443,7 +443,7 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) } break;
case WM_USER+52: // back
{
- if (!g_bWindowHidden || g_fPassRequested)
+ if (!g_bWindowHidden || g_fPassRequested)
break;
if (g_wMask & OPT_REQPASS){ //password request
@@ -455,7 +455,7 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) strncpy(g_password, dbVar.pszVal, MAXPASSLEN);
DBFreeVariant(&dbVar);
CallService( MS_DB_CRYPT_DECODESTRING, MAXPASSLEN+1, ( LPARAM )g_password );
-
+
int res = DialogBox(g_hInstance,(MAKEINTRESOURCE(IDD_PASSDIALOGNEW)),GetForegroundWindow(),(DLGPROC)DlgStdInProc);
g_fPassRequested = false;
@@ -639,7 +639,7 @@ void BossKeyMenuItemInit(void) // Add menu item mi.flags = CMIF_TCHAR;
mi.position = 2000100000;
mi.pszPopupName = 0;
- mi.hIcon = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"hidemim" );
+ mi.hIcon = Skin_GetIcon("hidemim");
mi.ptszName = _T("Hide");
mi.pszService = MS_BOSSKEY_HIDE;
@@ -652,7 +652,7 @@ void BossKeyMenuItemUnInit(void) // Remove menu item {
CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)g_hMenuItem, 0);
g_hMenuItem = 0;
- if(g_hmGenMenuInit)
+ if(g_hmGenMenuInit)
UnhookEvent(g_hmGenMenuInit);
g_hmGenMenuInit = 0;
}
@@ -696,7 +696,7 @@ static int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) static int TabsrmmButtonsInit(WPARAM wParam, LPARAM lParam)
{
BBButton bbd = {0};
-
+
bbd.cbSize = sizeof(BBButton);
bbd.pszModuleName = MOD_NAME;
bbd.dwDefPos = 5000;
@@ -706,7 +706,7 @@ static int TabsrmmButtonsInit(WPARAM wParam, LPARAM lParam) CallService (MS_BB_ADDBUTTON, 0, (LPARAM)&bbd);
return 0;
-}
+}
static TCHAR *VariablesBossKey(ARGUMENTSINFO *ai) {
if (ai->cbSize < sizeof(ARGUMENTSINFO)) return NULL;
@@ -740,7 +740,7 @@ int MirandaLoaded(WPARAM wParam,LPARAM lParam) RegisterCoreHotKeys();
- g_hWinHook = SetWinEventHook(EVENT_OBJECT_CREATE, EVENT_OBJECT_SHOW,
+ g_hWinHook = SetWinEventHook(EVENT_OBJECT_CREATE, EVENT_OBJECT_SHOW,
NULL, WinEventProc, GetCurrentProcessId(), 0, 0);
HookEvent(ME_TTB_MODULELOADED, ModernToolbarInit);
@@ -756,7 +756,7 @@ int MirandaLoaded(WPARAM wParam,LPARAM lParam) {
MessageBox(NULL,_T("Can't get CLIST_INTERFACE!"),_T("BossKey+"),MB_ICONERROR);
return 1;
- }else
+ }else
#endif
GetWindowThreadProcessId(pcli->hwndContactList,&g_dwMirandaPID);
@@ -780,7 +780,7 @@ int MirandaLoaded(WPARAM wParam,LPARAM lParam) hWTS = LoadLibrary(_T("wtsapi32.dll"));
g_hListenWindow = CreateWindow(BOSSKEY_LISTEN_INFO,BOSSKEY_LISTEN_INFO,WS_POPUP,0,0,5,5,pcli->hwndContactList,NULL,g_hInstance,NULL);
-
+
if (hWTS)
{
wtsRegisterSessionNotification = (PWTSRegisterSessionNotification)GetProcAddress(hWTS, "WTSRegisterSessionNotification");
@@ -826,7 +826,7 @@ int MirandaLoaded(WPARAM wParam,LPARAM lParam) if (g_bOldSetting && !(g_wMaskAdv & OPT_RESTORE)) // Restore settings if Miranda was crushed or killed in hidden mode and "Restore hiding on startup after failure" option is disabled
RestoreOldSettings();
- if (g_wMaskAdv & OPT_HIDEONSTART ||
+ if (g_wMaskAdv & OPT_HIDEONSTART ||
(g_wMaskAdv & OPT_RESTORE && g_bOldSetting))
BossKeyHideMiranda(0, 0);
@@ -867,7 +867,7 @@ extern "C" int __declspec(dllexport) Unload(void) {
UninitIdleTimer();
- if(g_hmGenMenuInit)
+ if(g_hmGenMenuInit)
UnhookEvent(g_hmGenMenuInit);
if (g_hWinHook != 0)
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 1c0646c628..be864b115f 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -251,20 +251,20 @@ bool isContactGoneFor(HANDLE hContact, int days) int daysSinceMessage = -1;
if (lastInputMsg != -1) daysSinceMessage = (int)((currentTime - lastInputMsg)/(60*60*24));
-
+
if (options.hideInactive)
{
if (daysSinceMessage >= options.iSilencePeriod)
if (!DBGetContactSettingByte(hContact, "CList", "Hidden", 0) && !DBGetContactSettingByte(hContact, MODULE_NAME, "NeverHide", 0))
{
TCHAR szInfo[200];
-
+
POPUPDATAT_V2 ppd = {0};
ppd.cbSize = sizeof(POPUPDATAT_V2);
-
+
ppd.lchContact = hContact;
- ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"enabled_icon");
-
+ ppd.lchIcon = Skin_GetIcon("enabled_icon");
+
mir_sntprintf(szInfo, 200, TranslateT("Hiding %s (%S)"), (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR), (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0));
_tcsncpy(ppd.lptzContactName, szInfo, MAX_CONTACTNAME);
mir_sntprintf(szInfo, 200, TranslateT("%d days since last message"), daysSinceMessage);
@@ -277,11 +277,11 @@ bool isContactGoneFor(HANDLE hContact, int days) ppd.PluginWindowProc = HidePopupDlgProc;
ppd.PluginData = NULL;
ppd.iSeconds = -1;
-
+
hideactions[0].flags = hideactions[1].flags = PAF_ENABLED;
ppd.lpActions = hideactions;
ppd.actionCount = 2;
-
+
CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &ppd, APF_NEWDATA);
SkinPlaySound("buddyExpectatorHide");
@@ -295,7 +295,7 @@ void ReturnNotify(HANDLE hContact, TCHAR *message) {
if (DBGetContactSettingByte(hContact, "CList", "NotOnList", 0) == 1 || DBGetContactSettingByte(hContact, "CList", "Hidden", 0) == 1)
return;
-
+
SkinPlaySound("buddyExpectatorReturn");
if (options.iShowPopUp > 0)
@@ -362,7 +362,7 @@ void GoneNotify(HANDLE hContact, TCHAR *message) ppd.PluginWindowProc = PopupDlgProcNoSet;
ppd.PluginData = NULL;
ppd.iSeconds = options.iPopUpDelay;
-
+
PUAddPopUpT(&ppd);
}
@@ -473,7 +473,7 @@ INT_PTR ContactStillAbsentAction(WPARAM wParam, LPARAM lParam) */
int onIconsChanged(WPARAM wParam, LPARAM lParam)
{
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"main_icon");
+ hIcon = Skin_GetIcon("main_icon");
return 0;
}
@@ -506,7 +506,7 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) CLISTMENUITEM mi = {0};
mi.cbSize = sizeof(CLISTMENUITEM);
-
+
if (DBGetContactSettingByte((HANDLE)wParam, proto, "ChatRoom", 0) || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
mi.flags = CMIM_FLAGS | CMIF_HIDDEN;
else
@@ -524,7 +524,7 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) mi.ptszName = LPGENT("Enable Miss You");
mi.icolibItem = hDisabledIcon;
}
-
+
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenu, (LPARAM)&mi);
return 0;
@@ -534,17 +534,17 @@ int onExtraImageApplying(WPARAM wParam, LPARAM lParam) {
if (DBGetContactSettingByte((HANDLE)wParam,MODULE_NAME,"MissYou",0))
CallService(MS_CLIST_EXTRA_SET_ICON, (WPARAM) wParam, (LPARAM) &g_IECMissYou);
-
+
return 0;
}
-int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam)
+int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam)
{
g_IECMissYou.cbSize = sizeof(IconExtraColumn);
g_IECMissYou.ColumnType = options.MissYouIcon;
if (ServiceExists(MS_CLIST_EXTRA_ADD_ICON))
- g_IECMissYou.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"enabled_icon"), (LPARAM)0);
+ g_IECMissYou.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("enabled_icon"), 0);
return 0;
}
@@ -557,7 +557,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) HANDLE hContact = (HANDLE) wParam;
DBCONTACTWRITESETTING *inf = (DBCONTACTWRITESETTING *) lParam;
- if (hContact == NULL || inf->value.type == DBVT_DELETED || strcmp(inf->szSetting, "Status") != 0)
+ if (hContact == NULL || inf->value.type == DBVT_DELETED || strcmp(inf->szSetting, "Status") != 0)
return 0;
if (DBGetContactSettingByte(hContact, "CList", "NotOnList", 0) == 1)
@@ -570,15 +570,15 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) int currentStatus = inf->value.wVal;
int prevStatus = DBGetContactSettingWord(hContact, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
-
+
if (currentStatus == prevStatus)
{
return 0;
}
-
+
// Last status
DBWriteContactSettingDword(hContact, MODULE_NAME, "LastStatus", prevStatus);
-
+
if (prevStatus == ID_STATUS_OFFLINE)
{
if (DBGetContactSettingByte(hContact, MODULE_NAME, "MissYou", 0))
@@ -586,9 +586,9 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) // Display PopUp
POPUPDATAT_V2 ppd = {0};
ppd.cbSize = sizeof(POPUPDATAT_V2);
-
+
ppd.lchContact = hContact;
- ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"enabled_icon");
+ ppd.lchIcon = Skin_GetIcon("enabled_icon");
_tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
if (!options.iUsePopupColors)
@@ -599,14 +599,14 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) ppd.PluginWindowProc = MissYouPopupDlgProc;
ppd.PluginData = NULL;
ppd.iSeconds = -1;
-
+
missyouactions[0].flags = PAF_ENABLED;
ppd.lpActions = missyouactions;
ppd.actionCount = 1;
CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &ppd, APF_NEWDATA);
-
- SkinPlaySound("buddyExpectatorMissYou");
+
+ SkinPlaySound("buddyExpectatorMissYou");
}
}
@@ -615,7 +615,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) setLastSeen(hContact);
return 0;
}
-
+
/*
if (CallService(MS_IGNORE_ISIGNORED, (WPARAM) hContact, (LPARAM) IGNOREEVENT_USERONLINE))
{
@@ -630,7 +630,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) setLastSeen(hContact);
}
-
+
unsigned int AbsencePeriod = DBGetContactSettingDword(hContact, MODULE_NAME, "iAbsencePeriod", options.iAbsencePeriod);
if (isContactGoneFor(hContact, AbsencePeriod))
{
@@ -652,7 +652,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) message = tmpBuf;
}
}
-
+
ReturnNotify(hContact, message);
if ((options.iShowMessageWindow == 0 && options.iShowUDetails == 0) || (options.iShowEvent == 0 && options.iShowPopUp == 0))
@@ -666,7 +666,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) }
void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
-{
+{
HANDLE hContact = db_find_first();
char *proto;
while (hContact != 0)
@@ -719,15 +719,15 @@ int ModulesLoaded2(WPARAM wParam, LPARAM lParam) int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
hEventUserInfoInit = HookEvent(ME_USERINFO_INITIALISE, UserinfoInit);
-
+
// add sounds support
SkinAddNewSoundExT("buddyExpectatorReturn", LPGENT("BuddyExpectator"), LPGENT("Contact returned"));
SkinAddNewSoundExT("buddyExpectatorStillAbsent", LPGENT("BuddyExpectator"), LPGENT("Contact still absent"));
SkinAddNewSoundExT("buddyExpectatorMissYou", LPGENT("BuddyExpectator"), LPGENT("Miss you event"));
SkinAddNewSoundExT("buddyExpectatorHide", LPGENT("BuddyExpectator"), LPGENT("Hide contact event"));
-
+
timer_id = SetTimer(0, 0, 1000 * 60 * 60 * 4, TimerProc); // check every 4 hours
-
+
hModulesLoaded2 = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded2);
if (options.MissYouIcon)
{
@@ -737,7 +737,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) g_IECClear.ColumnType = options.MissYouIcon;
g_IECClear.hImage = (HANDLE) -1;
}
-
+
TCHAR szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
@@ -747,32 +747,32 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) sid.cbSize = sizeof(sid);
sid.flags = SIDF_ALL_TCHAR;
sid.ptszSection = LPGENT("BuddyExpectator");
-
+
sid.ptszDescription = LPGENT("Tray/popup icon");
sid.pszName = "main_icon";
sid.iDefaultIndex = -IDI_MAINICON;
Skin_AddIcon(&sid);
-
+
sid.ptszDescription = LPGENT("Enabled");
sid.pszName = "enabled_icon";
sid.iDefaultIndex = -IDI_ENABLED;
hEnabledIcon = Skin_AddIcon(&sid);
-
+
sid.ptszDescription = LPGENT("Disabled");
sid.pszName = "disabled_icon";
sid.iDefaultIndex = -IDI_DISABLED;
hDisabledIcon = Skin_AddIcon(&sid);
-
+
sid.ptszDescription = LPGENT("Hide");
sid.pszName = "hide_icon";
sid.iDefaultIndex = -IDI_HIDE;
Skin_AddIcon(&sid);
-
+
sid.ptszDescription = LPGENT("NeverHide");
sid.pszName = "neverhide_icon";
sid.iDefaultIndex = -IDI_NEVERHIDE;
Skin_AddIcon(&sid);
-
+
hIcoLibIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, onIconsChanged);
onIconsChanged(0,0);
@@ -791,17 +791,17 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) }
missyouactions[0].cbSize = sizeof(POPUPACTION);
- missyouactions[0].lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"disabled_icon");
+ missyouactions[0].lchIcon = Skin_GetIcon("disabled_icon");
lstrcpyA(missyouactions[0].lpzTitle, LPGEN("Disable Miss You"));
missyouactions[0].wParam = missyouactions[0].lParam = 1;
hideactions[0].cbSize = sizeof(POPUPACTION);
- hideactions[0].lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"hide_icon");
+ hideactions[0].lchIcon = Skin_GetIcon("hide_icon");
lstrcpyA(hideactions[0].lpzTitle, LPGEN("Hide contact"));
hideactions[0].wParam = hideactions[0].lParam = 2;
hideactions[1].cbSize = sizeof(POPUPACTION);
- hideactions[1].lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"neverhide_icon");
+ hideactions[1].lchIcon = Skin_GetIcon("neverhide_icon");
lstrcpyA(hideactions[1].lpzTitle, LPGEN("Never hide this contact"));
hideactions[1].wParam = hideactions[1].lParam = 3;
@@ -840,11 +840,11 @@ int onSystemOKToExit(WPARAM wParam,LPARAM lParam) DeinitOptions();
if (hIcoLibIconsChanged)
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
else
DestroyIcon(hIcon);
- return 0;
+ return 0;
}
extern "C" int __declspec(dllexport) Load(void)
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp index f0a8e8cf7e..7ca92deeca 100644 --- a/plugins/BuddyExpectator/src/options.cpp +++ b/plugins/BuddyExpectator/src/options.cpp @@ -95,7 +95,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, {
switch (uMsg)
{
- case WM_INITDIALOG:
+ case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
if (!ServiceExists(MS_POPUP_ADDPOPUP))
@@ -104,84 +104,84 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, }
//iAbsencePeriod
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_RESETCONTENT, 0, 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_ADDSTRING, 0, (LPARAM) TranslateT("days"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_ADDSTRING, 0, (LPARAM) TranslateT("weeks"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_ADDSTRING, 0, (LPARAM) TranslateT("months"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_ADDSTRING, 0, (LPARAM) TranslateT("years"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_RESETCONTENT, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_ADDSTRING, 0, (LPARAM) TranslateT("days"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_ADDSTRING, 0, (LPARAM) TranslateT("weeks"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_ADDSTRING, 0, (LPARAM) TranslateT("months"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_ADDSTRING, 0, (LPARAM) TranslateT("years"));
if (options.iAbsencePeriod % 365 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_ABSENCE, options.iAbsencePeriod/365, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_SETCURSEL, 3, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_SETCURSEL, 3, 0);
}
else if (options.iAbsencePeriod % 30 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_ABSENCE, options.iAbsencePeriod/30, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_SETCURSEL, 2, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_SETCURSEL, 2, 0);
}
else if (options.iAbsencePeriod % 7 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_ABSENCE, options.iAbsencePeriod/7, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_SETCURSEL, 1, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_SETCURSEL, 1, 0);
}
else
{
SetDlgItemInt(hwndDlg, IDC_EDIT_ABSENCE, options.iAbsencePeriod, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_SETCURSEL, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD), CB_SETCURSEL, 0, 0);
}
//iAbsencePeriod2
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_RESETCONTENT, 0, 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_ADDSTRING, 0, (LPARAM) TranslateT("days"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_ADDSTRING, 0, (LPARAM) TranslateT("weeks"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_ADDSTRING, 0, (LPARAM) TranslateT("months"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_ADDSTRING, 0, (LPARAM) TranslateT("years"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_RESETCONTENT, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_ADDSTRING, 0, (LPARAM) TranslateT("days"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_ADDSTRING, 0, (LPARAM) TranslateT("weeks"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_ADDSTRING, 0, (LPARAM) TranslateT("months"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_ADDSTRING, 0, (LPARAM) TranslateT("years"));
if (options.iAbsencePeriod2 % 365 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_ABSENCE2, options.iAbsencePeriod2/365, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_SETCURSEL, 3, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_SETCURSEL, 3, 0);
}
else if (options.iAbsencePeriod2 % 30 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_ABSENCE2, options.iAbsencePeriod2/30, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_SETCURSEL, 2, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_SETCURSEL, 2, 0);
}
else if (options.iAbsencePeriod2 % 7 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_ABSENCE2, options.iAbsencePeriod2/7, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_SETCURSEL, 1, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_SETCURSEL, 1, 0);
}
else
{
SetDlgItemInt(hwndDlg, IDC_EDIT_ABSENCE2,options.iAbsencePeriod2, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_SETCURSEL, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD2), CB_SETCURSEL, 0, 0);
}
//iSilencePeriod
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_RESETCONTENT, 0, 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_ADDSTRING, 0, (LPARAM) TranslateT("days"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_ADDSTRING, 0, (LPARAM) TranslateT("weeks"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_ADDSTRING, 0, (LPARAM) TranslateT("months"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_ADDSTRING, 0, (LPARAM) TranslateT("years"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_RESETCONTENT, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_ADDSTRING, 0, (LPARAM) TranslateT("days"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_ADDSTRING, 0, (LPARAM) TranslateT("weeks"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_ADDSTRING, 0, (LPARAM) TranslateT("months"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_ADDSTRING, 0, (LPARAM) TranslateT("years"));
if (options.iSilencePeriod % 365 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_SILENTFOR, options.iSilencePeriod/365, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_SETCURSEL, 3, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_SETCURSEL, 3, 0);
}
else if (options.iSilencePeriod % 30 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_SILENTFOR, options.iSilencePeriod/30, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_SETCURSEL, 2, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_SETCURSEL, 2, 0);
}
else if (options.iSilencePeriod % 7 == 0)
{
SetDlgItemInt(hwndDlg, IDC_EDIT_SILENTFOR, options.iSilencePeriod/7, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_SETCURSEL, 1, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_SETCURSEL, 1, 0);
}
else
{
SetDlgItemInt(hwndDlg, IDC_EDIT_SILENTFOR,options.iSilencePeriod, FALSE);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_SETCURSEL, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_PERIOD3), CB_SETCURSEL, 0, 0);
}
SendMessage(GetDlgItem(hwndDlg, IDC_CHECK_POPUP), BM_SETCHECK, options.iShowPopUp > 0 ? BST_CHECKED : BST_UNCHECKED, 0);
@@ -194,18 +194,18 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, SendMessage(GetDlgItem(hwndDlg, IDC_CHECK_POPUP2), BM_SETCHECK, options.iShowPopUp2 > 0 ? BST_CHECKED : BST_UNCHECKED, 0);
SendMessage(GetDlgItem(hwndDlg, IDC_CHECK_FLASHICON2), BM_SETCHECK, options.iShowEvent2 > 0 ? BST_CHECKED : BST_UNCHECKED, 0);
-
-
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_RESETCONTENT, 0, 0);
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_ADDSTRING, 0, (LPARAM) TranslateT("Do nothing"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_ADDSTRING, 0, (LPARAM) TranslateT("Delete the contact"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_ADDSTRING, 0, (LPARAM) TranslateT("Open User Details"));
- SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_ADDSTRING, 0, (LPARAM) TranslateT("Open message window"));
+
+
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_RESETCONTENT, 0, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_ADDSTRING, 0, (LPARAM) TranslateT("Do nothing"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_ADDSTRING, 0, (LPARAM) TranslateT("Delete the contact"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_ADDSTRING, 0, (LPARAM) TranslateT("Open User Details"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_ADDSTRING, 0, (LPARAM) TranslateT("Open message window"));
SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_SETCURSEL, options.action2, 0);
return TRUE;
case WM_COMMAND:
- if ((HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == CBN_SELCHANGE)
+ if ((HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == CBN_SELCHANGE)
|| ((HIWORD(wParam) == EN_CHANGE) && (SendMessage(GetDlgItem(hwndDlg, IDC_EDIT_ABSENCE), EM_GETMODIFY, 0, 0)))
|| ((HIWORD(wParam) == EN_CHANGE) && (SendMessage(GetDlgItem(hwndDlg, IDC_EDIT_ABSENCE2), EM_GETMODIFY, 0, 0)))
|| ((HIWORD(wParam) == EN_CHANGE) && (SendMessage(GetDlgItem(hwndDlg, IDC_EDIT_SILENTFOR), EM_GETMODIFY, 0, 0))))
@@ -260,7 +260,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, options.iShowPopUp2 = SendMessage(GetDlgItem(hwndDlg, IDC_CHECK_POPUP2), BM_GETCHECK, 0, 0) == BST_CHECKED ? 1:0;
options.iShowEvent2 = SendMessage(GetDlgItem(hwndDlg, IDC_CHECK_FLASHICON2), BM_GETCHECK, 0, 0) == BST_CHECKED ? 1:0;
-
+
options.action2 = (GoneContactAction)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_ACTIONS), CB_GETCURSEL, 0, 0);
// save values to the DB
@@ -281,7 +281,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, timer_id = SetTimer(0, 0, 1000 * 60 * 60 * 4, TimerProc); // check every 4 hours
TimerProc(0, 0, 0, 0);
return TRUE;
- }
+ }
break;
}
}
@@ -296,8 +296,8 @@ static INT_PTR CALLBACK PopUpOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP static int ChangeLock = 0;
switch (uMsg)
{
- case WM_INITDIALOG:
-
+ case WM_INITDIALOG:
+
ChangeLock++;
TranslateDialogDefault(hwndDlg);
@@ -340,7 +340,7 @@ static INT_PTR CALLBACK PopUpOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP SendMessage(GetDlgItem(hwndDlg, IDC_DELAY_CUST), BM_SETCHECK, BST_CHECKED, 0);
SetDlgItemInt(hwndDlg, IDC_EDIT_POPUPDELAY, options.iPopUpDelay, FALSE);
}
-
+
ChangeLock--;
return TRUE;
case WM_COMMAND:
@@ -348,7 +348,7 @@ static INT_PTR CALLBACK PopUpOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP {
POPUPDATAT ppd;
ZeroMemory(&ppd, sizeof(ppd));
-
+
//iPopUpDelay
options.iPopUpDelay = GetDlgItemInt(hwndDlg, IDC_EDIT_POPUPDELAY, 0, FALSE);
if (SendMessage(GetDlgItem(hwndDlg, IDC_DELAY_PERM), BM_GETCHECK, 0, 0) == BST_CHECKED)
@@ -365,7 +365,7 @@ static INT_PTR CALLBACK PopUpOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP TCHAR szPreviewText[50];
mir_sntprintf(szPreviewText,50,TranslateT("has returned after being absent since %d days"),rand() % 30);
_tcsncpy(ppd.lptzText, szPreviewText, MAX_SECONDLINE);
-
+
// Get current popups colors options
if (IsDlgButtonChecked(hwndDlg, IDC_COLORS_POPUP))
{
@@ -385,10 +385,10 @@ static INT_PTR CALLBACK PopUpOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP ppd.iSeconds = options.iPopUpDelay;
CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &ppd, APF_NO_HISTORY);
-
+
_tcsncpy(ppd.lptzText, TranslateT("You awaited this contact!"), MAX_SECONDLINE);
- ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"enabled_icon");;
-
+ ppd.lchIcon = Skin_GetIcon("enabled_icon");;
+
CallService(MS_POPUP_ADDPOPUPT, (WPARAM) &ppd, APF_NO_HISTORY);
}
else
@@ -435,21 +435,21 @@ static INT_PTR CALLBACK PopUpOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP EnableWindow(GetDlgItem(hwndDlg, IDC_EDIT_POPUPDELAY), true);
}
}
-
+
break;
case WM_NOTIFY:{
NMHDR* nmhdr = (NMHDR*)lParam;
switch (nmhdr->code)
{
case PSN_APPLY:
-
+
if (IsDlgButtonChecked(hwndDlg, IDC_COLORS_POPUP))
- {
+ {
options.iUsePopupColors = 1;
options.iUseWinColors = 0;
}
else if (IsDlgButtonChecked(hwndDlg, IDC_COLORS_WIN))
- {
+ {
options.iUseWinColors = 1;
options.iUsePopupColors = 0;
options.iPopUpColorBack = GetSysColor(COLOR_BTNFACE);
@@ -461,7 +461,7 @@ static INT_PTR CALLBACK PopUpOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP options.iPopUpColorBack = SendDlgItemMessage(hwndDlg, IDC_COLOR_BGR, CPM_GETCOLOUR, 0, 0);
options.iPopUpColorFore = SendDlgItemMessage(hwndDlg, IDC_COLOR_FRG, CPM_GETCOLOUR, 0, 0);
}
-
+
//iPopUpDelay
options.iPopUpDelay = GetDlgItemInt(hwndDlg, IDC_EDIT_POPUPDELAY, 0, FALSE);
if (SendMessage(GetDlgItem(hwndDlg, IDC_DELAY_PERM), BM_GETCHECK, 0, 0) == BST_CHECKED)
@@ -477,7 +477,7 @@ static INT_PTR CALLBACK PopUpOptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wP SavePopupOptions();
return TRUE;
- }
+ }
break;
}
}
@@ -525,7 +525,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar {
/*
int status = DBGetContactSettingWord((HANDLE)lparam, MODULE_NAME, "LastStatus", ID_STATUS_OFFLINE);
- char *strptr = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, (LPARAM)0);
+ char *strptr = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, 0);
*/
_tcsftime(tmpBuf, 50, _T("%#x"), gmtime(&tmpTime));
SetDlgItemText(hdlg, IDC_EDIT_LASTSEEN, tmpBuf);
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index b8c4175b9b..2dbfabb240 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -403,10 +403,7 @@ void CSList::addProtoStatusMenuItem( char* protoName, void* arg ) CLISTMENUITEM mi = {0};
mi.cbSize = sizeof(mi);
mi.flags = CMIF_TCHAR;
- if (ServiceExists(MS_SKIN2_GETICON))
- mi.icolibItem = (HANDLE)LoadIconExEx("icon", IDI_CSLIST);
- else
- mi.hIcon = LoadIconExEx("icon", IDI_CSLIST);
+ mi.icolibItem = (HANDLE)LoadIconExEx("icon", IDI_CSLIST);
mi.ptszName = _T(MODULENAME);
mi.position = 2000040000;
mi.pszService = buf;
@@ -527,7 +524,7 @@ void CSWindow::initIcons() {
char szTemp[MAX_PATH];
mir_snprintf(szTemp, SIZEOF(szTemp), "%s_xstatus%d", protoName, i);
- ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ));
+ ImageList_AddIcon( this->icons, Skin_GetIcon(szTemp));
}
}
}
@@ -545,7 +542,7 @@ void CSWindow::initIcons() {
char szTemp[MAX_PATH];
mir_snprintf(szTemp, SIZEOF(szTemp), "%s_%s", protoName, moods_names[i].szTag);
- ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ));
+ ImageList_AddIcon( this->icons, Skin_GetIcon(szTemp));
}
}
}
@@ -1332,11 +1329,7 @@ INT_PTR CALLBACK CSOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l HICON LoadIconExEx( const char* IcoLibName, int NonIcoLibIcon )
{
- if ( ServiceExists( MS_SKIN2_GETICON )) {
- char szSettingName[64];
- mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", __INTERNAL_NAME, IcoLibName);
- return ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szSettingName );
- }
- else
- return ( HICON )LoadImage( cslist->handle, MAKEINTRESOURCE( NonIcoLibIcon ), IMAGE_ICON, 0, 0, 0 );
+ char szSettingName[64];
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", __INTERNAL_NAME, IcoLibName);
+ return Skin_GetIcon(szSettingName );
}
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 6acadc9aea..323e26ea85 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -94,8 +94,8 @@ void RegPopupActions() int OnIconsChanged(WPARAM wParam, LPARAM lParam)
{
- hPopupIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"ckl_popup_icon");
- hCopyIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"ckl_copy_icon");
+ hPopupIcon = Skin_GetIcon("ckl_popup_icon");
+ hCopyIcon = Skin_GetIcon("ckl_copy_icon");
RegPopupActions();
return 0;
}
@@ -127,26 +127,26 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) ptszLayStrings[i] = ptszCurrLayout;
mir_free(dbv.ptszVal);
}
- else
+ else
{
ptszLayStrings[i] = dbv.ptszVal;
if(_tcscmp(ptszCurrLayout, ptszLayStrings[i]) == 0)
DBDeleteContactSetting(NULL, ModuleName, ptszTemp);
mir_free(ptszCurrLayout);
- }
+ }
mir_free(ptszTemp);
}
// Ïðî÷èòàåì îñíîâíûå íàñòðîéêè
ReadMainOptions();
-
+
// Ïðî÷èòàåì íàñòðîéêè ïîïàïîâ
ReadPopupOptions();
-
+
// Çàðåãèì çâóê
SkinAddNewSoundEx(SND_ChangeLayout, ModuleName, LPGEN("Changing Layout"));
SkinAddNewSoundEx(SND_ChangeCase, ModuleName, LPGEN("Changing Case"));
-
+
// Õóê íà íàæàòèå êëàâèøè
kbHook_All = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)Keyboard_Hook, NULL, GetCurrentThreadId());
@@ -176,7 +176,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) OnIconsChanged(0, 0);
RegPopupActions();
-
+
DBWriteContactSettingDword(NULL, ModuleName, "CurrentVer", PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM));
return 0;
}
@@ -192,13 +192,13 @@ int OnOptionsInitialise(WPARAM wParam, LPARAM lParam) odp.pszGroup = LPGEN("Plugins");
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = DlgMainProcOptions;
- Options_AddPage(wParam, &odp);
-
+ Options_AddPage(wParam, &odp);
+
if (ServiceExists(MS_POPUP_ADDPOPUP)) {
odp.pszTemplate = MAKEINTRESOURCEA(IDD_POPUP_OPTION_FORM);
odp.pszGroup = LPGEN("PopUps");
odp.pfnDlgProc = DlgPopupsProcOptions;
- Options_AddPage(wParam, &odp);
+ Options_AddPage(wParam, &odp);
}
return 0;
}
@@ -217,7 +217,7 @@ LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam) if ((GetKeyState(VK_MENU)&0x8000)) lcode |= HOTKEYF_ALT;
if ((GetKeyState(VK_LWIN)&0x8000)||(GetKeyState(VK_RWIN)&0x8000)) lcode |= HOTKEYF_EXT;
lcode = lcode<<8;
-
+
if ((wParam != VK_SHIFT) && (wParam != VK_MENU) && (wParam != VK_CONTROL) && (wParam != VK_LWIN) && (wParam != VK_RWIN))
lcode += wParam;
@@ -237,7 +237,7 @@ LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam) else
if ((lcode == moOptions.dwHotkey_Case) && (!(lParam&0x40000000)))
{
- ChangeLayout(NULL, TOT_Case, moOptions.CurrentWordCase);
+ ChangeLayout(NULL, TOT_Case, moOptions.CurrentWordCase);
return 1;
}
}
@@ -247,28 +247,28 @@ LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam) int CALLBACK CKLPopupDlgProc(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lParam)
{
LPTSTR ptszPopupText;
-
+
ptszPopupText = (LPTSTR)CallService(MS_POPUP_GETPLUGINDATA, (WPARAM)hWnd, (LPARAM)&ptszPopupText);
switch(uiMessage)
{
case WM_COMMAND:
{
if (HIWORD(wParam) == STN_CLICKED)
- {
+ {
if (!IsBadStringPtr(ptszPopupText, MaxTextSize))
- CopyTextToClipboard(ptszPopupText);
+ CopyTextToClipboard(ptszPopupText);
PUDeletePopUp(hWnd);
-
+
}
break;
}
-
+
case WM_CONTEXTMENU:
{
PUDeletePopUp(hWnd);
break;
}
-
+
case UM_POPUPACTION:
{
if ((lParam == 0) && (!IsBadStringPtr(ptszPopupText, MaxTextSize)))
@@ -277,13 +277,13 @@ int CALLBACK CKLPopupDlgProc(HWND hWnd, UINT uiMessage, WPARAM wParam, LPARAM lP }
break;
}
-
+
case UM_FREEPLUGINDATA:
{
mir_free(ptszPopupText);
return TRUE;
- }
-
+ }
+
default:
break;
}
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 779885a383..0bcef386c2 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -321,7 +321,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) if (WindowType == WTYPE_Unknown)
{
SendMessage(hTextWnd, EM_GETSEL, (WPARAM)&crSelection.cpMin, (LPARAM)&crSelection.cpMax);
- if ((SendMessage(hTextWnd, WM_GETDLGCODE, (WPARAM)NULL, (LPARAM)NULL)&(DLGC_HASSETSEL)) && (crSelection.cpMin>=0))
+ if ((SendMessage(hTextWnd, WM_GETDLGCODE, 0, 0)&(DLGC_HASSETSEL)) && (crSelection.cpMin>=0))
WindowType = WTYPE_Edit;
}
@@ -606,7 +606,7 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) SendMessage(hTextWnd, WM_GETTEXT, (WPARAM)MaxTextSize, (LPARAM)ptszTemp);
for (i = crTemp.cpMin;i<crTemp.cpMax;i++)
ptszTemp[i] = ptszOutText[i-crTemp.cpMin];
- SendMessage(hTextWnd, WM_SETTEXT, (WPARAM)NULL, (LPARAM)ptszTemp);
+ SendMessage(hTextWnd, WM_SETTEXT, 0, (LPARAM)ptszTemp);
SendMessage(hTextWnd, EM_SETSEL, crSelection.cpMin, crSelection.cpMax);
mir_free(ptszTemp);
}
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 23d19e31c5..e5110ed332 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -140,7 +140,7 @@ static LRESULT CALLBACK PopupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPA if (pdata) {
switch (message) {
case WM_COMMAND:
- if (HIWORD(wParam) == STN_CLICKED) { // left mouse button
+ if (HIWORD(wParam) == STN_CLICKED) { // left mouse button
Popup_DoAction(hWnd, pdata->PopupLClickAction, pdata);
return true;
}
@@ -169,12 +169,12 @@ void ShowPopup(SHOWPOPUP_DATA *sd) if (sd->PopupOptPage->GetValue(IDC_POPUPOPTDLG_SHOWPREVCLIENT)) {
mir_sntprintf(PopupText.GetBuffer(MAX_MSG_LEN), MAX_MSG_LEN, TranslateT("changed client to %s (was %s)"), (const TCHAR*)sd->MirVer, (const TCHAR*)sd->OldMirVer);
PopupText.ReleaseBuffer();
- }
+ }
else {
mir_sntprintf(PopupText.GetBuffer(MAX_MSG_LEN), MAX_MSG_LEN, TranslateT("changed client to %s"), (const TCHAR*)sd->MirVer);
PopupText.ReleaseBuffer();
}
-
+
PLUGIN_DATA *pdata = (PLUGIN_DATA*)calloc(1, sizeof(PLUGIN_DATA));
POPUPDATAT ppd = {0};
ppd.lchContact = sd->hContact;
@@ -232,7 +232,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) PopupOptPage = g_PopupOptPage;
PopupOptPage.DBToMem();
}
-
+
HANDLE hContactOrMeta = (hContact && ServiceExists(MS_MC_GETMETACONTACT)) ? (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0) : hContact;
if (!hContactOrMeta)
hContactOrMeta = hContact;
@@ -281,7 +281,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) }
else ClientName = sd.MirVer;
- if (ServiceExists(MS_VARS_FORMATSTRING))
+ if (ServiceExists(MS_VARS_FORMATSTRING))
logservice_log(LOG_ID, hContact, ClientName);
else {
_ASSERT(szProto);
@@ -342,11 +342,11 @@ static int PrebuildMainMenu(WPARAM wParam, LPARAM lParam) mi.flags = CMIF_TCHAR | CMIM_NAME | CMIM_ICON;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY)) {
mi.ptszName = LPGENT("Disable c&lient change notification");
- mi.hIcon = ServiceExists(MS_SKIN2_GETICON) ? (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"popup_enabled") : NULL;
+ mi.hIcon = Skin_GetIcon("popup_enabled");
}
else {
mi.ptszName = LPGENT("Enable c&lient change notification");
- mi.hIcon = ServiceExists(MS_SKIN2_GETICON) ? (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"popup_disabled") : NULL;
+ mi.hIcon = Skin_GetIcon("popup_disabled");
}
mi.ptszPopupName = LPGENT("PopUps");
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hTogglePopupsMenuItem, (LPARAM)&mi);
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 88611fa1d0..23776b5d6f 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -420,7 +420,7 @@ int AniAva_SetAvatarPos(HANDLE hContact, RECT * rc, int overlayIdx, BYTE bAlpha) api->bAlpha = bAlpha;
api->idxOverlay = overlayIdx;
api->rcPos = *rc;
- SendNotifyMessage(pai->hWindow, AAM_SETPOSITION, (WPARAM)0, (LPARAM) api);
+ SendNotifyMessage(pai->hWindow, AAM_SETPOSITION, 0, (LPARAM) api);
// the AAM_SETPOSITION is responsible to destroy memory under api
pai->bInvalidPos = FALSE;
pai->bToBeDeleted = FALSE;
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 346fa70f2c..6ce417eef9 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -168,16 +168,16 @@ static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam) hAvatarOverlays = ImageList_Create(16,16,ILC_MASK|ILC_COLOR32,MAX_REGS(g_pAvatarOverlayIcons)*2,1);
for (i=0 ; i < MAX_REGS(g_pAvatarOverlayIcons) ; i++)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)g_pAvatarOverlayIcons[i].name);
+ HICON hIcon = Skin_GetIcon(g_pAvatarOverlayIcons[i].name);
g_pAvatarOverlayIcons[i].listID = ImageList_AddIcon(hAvatarOverlays,hIcon);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)g_pAvatarOverlayIcons[i].name);
+ Skin_ReleaseIcon(g_pAvatarOverlayIcons[i].name);
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)g_pStatusOverlayIcons[i].name);
+ hIcon = Skin_GetIcon(g_pStatusOverlayIcons[i].name);
g_pStatusOverlayIcons[i].listID = ImageList_AddIcon(hAvatarOverlays,hIcon);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)g_pStatusOverlayIcons[i].name);
+ Skin_ReleaseIcon(g_pStatusOverlayIcons[i].name);
}
- g_hListeningToIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"LISTENING_TO_ICON");
+ g_hListeningToIcon = Skin_GetIcon("LISTENING_TO_ICON");
pcli->pfnClcBroadcast( INTM_INVALIDATE,0,0);
AniAva_UpdateOptions();
@@ -1388,7 +1388,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w handle = (HANDLE)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hdest,0);
if ( !handle) return 0;
- CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
+ CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
@@ -1449,7 +1449,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if ( !handle) return 0;
- CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
+ CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
@@ -1497,7 +1497,7 @@ static LRESULT clcOnLButtonUp(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w if ( !handle) return 0;
- CallService(MS_MC_REMOVEFROMMETA,(WPARAM)0,(LPARAM)hcontact);
+ CallService(MS_MC_REMOVEFROMMETA,0,(LPARAM)hcontact);
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 01555535c5..ba4e787b02 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -36,7 +36,7 @@ INT_PTR CloseAction(WPARAM wParam,LPARAM lParam) int k;
g_CluiData.bSTATE = STATE_PREPEARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT
do
- { k = CallService(MS_SYSTEM_OKTOEXIT,(WPARAM)0,0);
+ { k = CallService(MS_SYSTEM_OKTOEXIT,0,0);
}
while (!k);
@@ -132,11 +132,12 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) op.Handle = hFavoriteContactMenu;
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)"ModernClistMenu_ContactRate";
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
}
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)mi.hIcon,0);
- if (mi.hIcon && NeedFree) DestroyIcon(mi.hIcon);
+ Skin_ReleaseIcon(mi.hIcon);
+ if (mi.hIcon && NeedFree)
+ DestroyIcon(mi.hIcon);
mi.pszPopupName = (char*)hFavoriteContactMenu;
if ( !hFavoriteContactMenuItems) {
@@ -155,8 +156,9 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) hFavoriteContactMenuItems[i], (LPARAM)&mi);
}
else hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)mi.hIcon,0);
- if (mi.hIcon && NeedFree) DestroyIcon(mi.hIcon);
+ Skin_ReleaseIcon(mi.hIcon);
+ if (mi.hIcon && NeedFree)
+ DestroyIcon(mi.hIcon);
}
mi.hIcon = NULL;
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index a93d9475fb..835dcbf101 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -435,7 +435,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) if ((GetAsyncKeyState(VK_CONTROL)&0x8000) && msg->lParam == WM_LBUTTONDOWN && !db_get_b(NULL,"CList","Tray1Click",SETTING_TRAY1CLICK_DEFAULT)) {
POINT pt;
HMENU hMenu;
- hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,(WPARAM)0,0);
+ hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
g_mutex_bOnTrayRightClick = 1;
IS_WM_MOUSE_DOWN_IN_TRAY = 1;
SetForegroundWindow(msg->hwnd);
@@ -453,7 +453,7 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) else if (msg->lParam == WM_RBUTTONUP) {
POINT pt;
HMENU hMenu;
- hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,(WPARAM)0,0);
+ hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,0,0);
g_mutex_bOnTrayRightClick = 1;
SetForegroundWindow(msg->hwnd);
@@ -537,7 +537,7 @@ static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hTrayMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)mi->pszService;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
// mainItemCount++;
@@ -622,23 +622,23 @@ void InitTrayMenus(void) tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSTRAY/ExecService";
tmp.name = "TrayMenu";
- hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle = hTrayMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hTrayMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSTRAY/FreeOwnerDataTrayMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hTrayMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSTRAY/TrayMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
@@ -651,7 +651,7 @@ void InitTrayMenus(void) mi.pszName = LPGEN("E&xit");
mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT);
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -661,7 +661,7 @@ void InitTrayMenus(void) mi.pszName = LPGEN("&Hide/Show");
mi.flags = CMIF_ICONFROMICOLIB;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE);
- hTrayHideShowMainMenuItem = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayHideShowMainMenuItem = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -671,7 +671,7 @@ void InitTrayMenus(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
@@ -682,7 +682,7 @@ void InitTrayMenus(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszService = "FakeService_1";
mi.pszName = LPGEN("&Main Menu");
- hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon); // eternity #004
memset(&mi,0,sizeof(mi));
@@ -692,7 +692,7 @@ void InitTrayMenus(void) mi.flags = CMIF_ICONFROMICOLIB; // eternity #004
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004
mi.pszName = LPGEN("&Status");
- hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon); // eternity #004
memset(&mi,0,sizeof(mi));
@@ -702,7 +702,7 @@ void InitTrayMenus(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -712,7 +712,7 @@ void InitTrayMenus(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
}
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index b86d2431e9..de295b0214 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -2,8 +2,8 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright 2000-2008 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -58,7 +58,7 @@ BOOL CLUI::m_fMainMenuInited = FALSE; HWND CLUI::m_hWnd = NULL;
void CLUI::cliOnCreateClc(void)
-{
+{
STATIC_METHOD;
_ASSERT( m_pCLUI );
m_pCLUI->CreateCluiFrames();
@@ -79,8 +79,8 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM wParam,LPARAM lParam) CLUIServices_ProtocolStatusChanged(0,0);
SleepEx(0,TRUE);
- g_flag_bOnModulesLoadedCalled = TRUE;
- ///pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_HANDLE_VALUE);
+ g_flag_bOnModulesLoadedCalled = TRUE;
+ ///pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_HANDLE_VALUE);
SendMessage(pcli->hwndContactList,UM_CREATECLC,0,0); //$$$
InitSkinHotKeys();
g_CluiData.bSTATE = STATE_NORMAL;
@@ -92,17 +92,17 @@ int CLUI::OnEvent_ModulesLoaded(WPARAM wParam,LPARAM lParam) int CLUI::OnEvent_FontReload(WPARAM wParam,LPARAM lParam)
{
STATIC_METHOD;
-
+
pcli->pfnClcBroadcast( INTM_RELOADOPTIONS, wParam, lParam );
g_CluiData.dwKeyColor = db_get_dw(NULL,"ModernSettings","KeyColor",(DWORD)SETTING_KEYCOLOR_DEFAULT);
CLUI__cliInvalidateRect( pcli->hwndContactList, 0, 0 );
-
+
return 0;
}
-int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam)
+int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam)
{
TCHAR cls[128];
HANDLE hItem;
@@ -173,7 +173,7 @@ INT_PTR CLUI::Service_ShowMainMenu(WPARAM wParam,LPARAM lParam) POINT pt;
hMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0);
GetCursorPos(&pt);
- TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL);
+ TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL);
return 0;
}
@@ -183,7 +183,7 @@ INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam,LPARAM lParam) POINT pt;
hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
GetCursorPos(&pt);
- TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL);
+ TrackPopupMenu(hMenu,TPM_TOPALIGN|TPM_LEFTALIGN|TPM_LEFTBUTTON,pt.x,pt.y,0,pcli->hwndContactList,NULL);
return 0;
}
@@ -225,9 +225,9 @@ HRESULT CLUI::CreateCluiFrames() CLUI_ChangeWindowMode();
- RegisterAvatarMenu();
+ RegisterAvatarMenu();
- CLUI_ReloadCLUIOptions();
+ CLUI_ReloadCLUIOptions();
CreateUIFrames();
@@ -260,7 +260,7 @@ m_hDwmapiDll( NULL ) nLastRequiredHeight = 0;
LoadCLUIFramesModule();
- ExtraImage_LoadModule();
+ ExtraImage_LoadModule();
g_CluiData.boldHideOffline = -1;
bOldHideOffline = db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT);
@@ -332,7 +332,7 @@ HRESULT CLUI::RegisterAvatarMenu() }
HRESULT CLUI::CreateCLCWindow(const HWND hwndClui)
-{
+{
ClcWnd() = CreateWindow(CLISTCONTROL_CLASS,_T(""),
WS_CHILD|WS_CLIPCHILDREN|CLS_CONTACTLIST
|(db_get_b(NULL,"CList","UseGroups",SETTING_USEGROUPS_DEFAULT)?CLS_USEGROUPS:0)
@@ -349,7 +349,7 @@ HRESULT CLUI::CreateUIFrames() {
EventArea_Create(pcli->hwndContactList);
CreateViewModeFrame();
- pcli->hwndStatus = StatusBar_Create(pcli->hwndContactList);
+ pcli->hwndStatus = StatusBar_Create(pcli->hwndContactList);
return S_OK;
}
@@ -375,7 +375,7 @@ HRESULT CLUI::FillAlphaChannel( HDC hDC, RECT * prcParent, BYTE bAlpha) RECT rcBounds;
GetRgnBox(hRgn,&rcBounds);
- if ( IsRectEmpty(&rcBounds))
+ if ( IsRectEmpty(&rcBounds))
{
DeleteObject(hRgn);
return S_FALSE;
@@ -409,18 +409,18 @@ HRESULT CLUI::CreateCLC() hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0);
CallService(MS_SKINENG_REGISTERPAINTSUB,(WPARAM)Frame.hWnd,(LPARAM)CLCPaint::PaintCallbackProc);
- CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_TBTIPNAME,hFrameContactTree),(LPARAM)Translate("My Contacts"));
+ CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_TBTIPNAME,hFrameContactTree),(LPARAM)Translate("My Contacts"));
ExtraImage_ReloadExtraIcons();
nLastRequiredHeight = 0;
if ( g_CluiData.current_viewmode[0] == '\0' )
{
- if (bOldHideOffline != (BYTE)-1)
+ if (bOldHideOffline != (BYTE)-1)
CallService( MS_CLIST_SETHIDEOFFLINE,(WPARAM)bOldHideOffline, 0);
else
- CallService( MS_CLIST_SETHIDEOFFLINE,(WPARAM)0, 0);
- if (bOldUseGroups != (BYTE)-1)
+ CallService( MS_CLIST_SETHIDEOFFLINE,0, 0);
+ if (bOldUseGroups != (BYTE)-1)
CallService( MS_CLIST_SETUSEGROUPS ,(WPARAM)bOldUseGroups, 0);
else
CallService( MS_CLIST_SETUSEGROUPS ,(WPARAM)bOldUseGroups, 0);
@@ -433,7 +433,7 @@ HRESULT CLUI::CreateCLC() };
HRESULT CLUI::SnappingToEdge( WINDOWPOS * lpWindowPos )
-{
+{
//by ZORG
if ( MyMonitorFromWindow == NULL || MyGetMonitorInfo == NULL )
return S_FALSE;
@@ -500,20 +500,20 @@ BOOL CLUI_CheckOwnedByClui(HWND hWnd) return FALSE;
}
-int CLUI_ShowWindowMod(HWND hWnd, int nCmd)
+int CLUI_ShowWindowMod(HWND hWnd, int nCmd)
{
int res = 0;
if (hWnd == pcli->hwndContactList && (nCmd == SW_HIDE || nCmd == SW_MINIMIZE))
- {
+ {
AniAva_InvalidateAvatarPositions(NULL);
AniAva_RemoveInvalidatedAvatars();
}
- if (hWnd == pcli->hwndContactList
+ if (hWnd == pcli->hwndContactList
&& !g_mutex_bChangingMode
- && nCmd == SW_HIDE
- && !g_CluiData.fLayered
+ && nCmd == SW_HIDE
+ && !g_CluiData.fLayered
&& IsWinVerXPPlus()
&& db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT))
{
@@ -523,12 +523,12 @@ int CLUI_ShowWindowMod(HWND hWnd, int nCmd) if (hWnd == pcli->hwndContactList
&& !g_mutex_bChangingMode
&& nCmd == SW_RESTORE
- && !g_CluiData.fLayered
- && IsWinVerXPPlus()
+ && !g_CluiData.fLayered
+ && IsWinVerXPPlus()
&& g_CluiData.fSmoothAnimation
- && !g_bTransparentFlag
- )
- {
+ && !g_bTransparentFlag
+ )
+ {
if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT))
{
CLUI_SmoothAlphaTransition(hWnd, 255, 1);
@@ -550,12 +550,12 @@ static BOOL CLUI_WaitThreadsCompletion(HWND hwnd) static const BYTE bcMAX_AWAITING_RETRY = 10; //repeat awaiting only 10 times
TRACE("CLUI_WaitThreadsCompletion Enter");
if (bEntersCount < bcMAX_AWAITING_RETRY
- && ( g_mutex_nCalcRowHeightLock ||
- g_CluiData.mutexPaintLock ||
- g_dwAwayMsgThreadID ||
- g_dwGetTextAsyncThreadID ||
- g_dwSmoothAnimationThreadID ||
- g_dwFillFontListThreadID)
+ && ( g_mutex_nCalcRowHeightLock ||
+ g_CluiData.mutexPaintLock ||
+ g_dwAwayMsgThreadID ||
+ g_dwGetTextAsyncThreadID ||
+ g_dwSmoothAnimationThreadID ||
+ g_dwFillFontListThreadID)
&& !Miranda_Terminated())
{
TRACE("Waiting threads");
@@ -574,7 +574,7 @@ static BOOL CLUI_WaitThreadsCompletion(HWND hwnd) }
void CLUI_UpdateLayeredMode()
-{
+{
g_CluiData.fDisableSkinEngine = db_get_b(NULL,"ModernData","DisableEngine", SETTING_DISABLESKIN_DEFAULT);
if (IsWinVer2000Plus())
{
@@ -588,16 +588,16 @@ void CLUI_UpdateLayeredMode() if (fWasVisible) ShowWindow(pcli->hwndContactList,SW_HIDE);
//change layered mode
exStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
- if (tLayeredFlag)
+ if (tLayeredFlag)
exStyle |= WS_EX_LAYERED;
else
exStyle &= ~WS_EX_LAYERED;
SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle&~WS_EX_LAYERED);
SetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE,exStyle);
g_CluiData.fLayered = tLayeredFlag;
- Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
+ Sync(CLUIFrames_SetLayeredMode, tLayeredFlag,pcli->hwndContactList);
CLUI_ChangeWindowMode();
- Sync(CLUIFrames_OnClistResize_mod, (WPARAM)0, 0 );
+ Sync(CLUIFrames_OnClistResize_mod, 0, 0 );
if (fWasVisible) ShowWindow(pcli->hwndContactList,SW_SHOW);
}
}
@@ -607,7 +607,7 @@ void CLUI_UpdateAeroGlass() {
BOOL tAeroGlass = db_get_b(NULL, "ModernData", "AeroGlass", SETTING_AEROGLASS_DEFAULT) && (g_CluiData.fLayered);
if (g_proc_DWMEnableBlurBehindWindow && (tAeroGlass != g_CluiData.fAeroGlass))
- {
+ {
if (g_CluiData.hAeroGlassRgn)
{
DeleteObject(g_CluiData.hAeroGlassRgn);
@@ -657,7 +657,7 @@ void CLUI_ChangeWindowMode() style = WS_CLIPCHILDREN| (db_get_b(NULL,"CList","ThinBorder",SETTING_THINBORDER_DEFAULT)?WS_BORDER:0);
styleEx = WS_EX_TOOLWINDOW;
styleMaskEx |= WS_EX_APPWINDOW;
- }
+ }
else if (db_get_b(NULL,"CLUI","ShowCaption",SETTING_SHOWCAPTION_DEFAULT) && db_get_b(NULL,"CList","ToolWindow",SETTING_TOOLWINDOW_DEFAULT))
{
styleEx = WS_EX_TOOLWINDOW/*|WS_EX_WINDOWEDGE*/;
@@ -668,14 +668,14 @@ void CLUI_ChangeWindowMode() {
style = WS_CAPTION|WS_SYSMENU|WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME|WS_MINIMIZEBOX;
}
- else
+ else
{
style = WS_POPUPWINDOW|WS_CLIPCHILDREN|WS_THICKFRAME;
styleEx = WS_EX_TOOLWINDOW/*|WS_EX_WINDOWEDGE*/;
styleMaskEx |= WS_EX_APPWINDOW;
}
}
- else
+ else
{
style = WS_CLIPCHILDREN;
styleEx = WS_EX_TOOLWINDOW;
@@ -691,7 +691,7 @@ void CLUI_ChangeWindowMode() DBVARIANT dbv = {0};
if (DBGetContactSettingTString(NULL,"CList","TitleText",&dbv))
lstrcpyn(titleText,_T(MIRANDANAME),SIZEOF(titleText));
- else
+ else
{
lstrcpyn(titleText,dbv.ptszVal,SIZEOF(titleText));
db_free(&dbv);
@@ -710,13 +710,13 @@ void CLUI_ChangeWindowMode() }
//5- TODO Apply Style
oldStyleEx = curStyleEx = GetWindowLongPtr(pcli->hwndContactList,GWL_EXSTYLE);
- oldStyle = curStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_STYLE);
+ oldStyle = curStyle = GetWindowLongPtr(pcli->hwndContactList,GWL_STYLE);
curStyleEx = (curStyleEx & ~styleMaskEx) | styleEx;
curStyle = (curStyle & ~styleMask) | style;
if (oldStyleEx != curStyleEx || oldStyle != curStyle)
{
- if (IsWindowVisible(pcli->hwndContactList))
+ if (IsWindowVisible(pcli->hwndContactList))
{
storedVisMode = TRUE;
mutex_bShowHideCalledFromAnimation = TRUE;
@@ -729,7 +729,7 @@ void CLUI_ChangeWindowMode() CLUI_UpdateAeroGlass();
- if (g_CluiData.fLayered || !db_get_b(NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT))
+ if (g_CluiData.fLayered || !db_get_b(NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT))
{
HMENU m = GetMenu(pcli->hwndContactList);
SetMenu(pcli->hwndContactList,NULL);
@@ -745,14 +745,14 @@ void CLUI_ChangeWindowMode() if (db_get_b(NULL,"CList","OnDesktop", SETTING_ONDESKTOP_DEFAULT))
{
HWND hProgMan = FindWindow(_T("Progman"),NULL);
- if (IsWindow(hProgMan))
+ if (IsWindow(hProgMan))
{
SetParent(pcli->hwndContactList,hProgMan);
Sync( CLUIFrames_SetParentForContainers, (HWND) hProgMan );
g_CluiData.fOnDesktop = 1;
}
- }
- else
+ }
+ else
{
// HWND parent = GetParent(pcli->hwndContactList);
// HWND progman = FindWindow(_T("Progman"),NULL);
@@ -765,7 +765,7 @@ void CLUI_ChangeWindowMode() }
//7- if it was visible - show
- if (storedVisMode)
+ if (storedVisMode)
{
ShowWindow(pcli->hwndContactList,SW_SHOW);
Sync(CLUIFrames_OnShowHide, pcli->hwndContactList,1);
@@ -786,15 +786,15 @@ void CLUI_ChangeWindowMode() h = (h < v)?h:v;
hRgn1 = CreateRoundRectRgn(0,0,(r.right-r.left+1),(r.bottom-r.top+1),h,h);
if ((db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0)))
- SetWindowRgn(pcli->hwndContactList,hRgn1,1);
- else
+ SetWindowRgn(pcli->hwndContactList,hRgn1,1);
+ else
{
DeleteObject(hRgn1);
SetWindowRgn(pcli->hwndContactList,NULL,1);
}
- RedrawWindow(pcli->hwndContactList,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
- }
+ RedrawWindow(pcli->hwndContactList,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
+ }
g_mutex_bChangingMode = FALSE;
flag_bFirstTimeCall = TRUE;
AniAva_UpdateParent();
@@ -802,8 +802,8 @@ void CLUI_ChangeWindowMode() struct _tagTimerAsync
{
HWND hwnd;
- int ID;
- int Timeout;
+ int ID;
+ int Timeout;
TIMERPROC proc;
};
static UINT_PTR SetTimerSync(WPARAM wParam , LPARAM lParam)
@@ -815,17 +815,17 @@ static UINT_PTR SetTimerSync(WPARAM wParam , LPARAM lParam) UINT_PTR CLUI_SafeSetTimer(HWND hwnd, int ID, int Timeout, TIMERPROC proc)
{
struct _tagTimerAsync param = { hwnd, ID, Timeout, proc };
- return Sync(SetTimerSync, (WPARAM) ¶m, (LPARAM) 0);
+ return Sync(SetTimerSync, (WPARAM) ¶m, (LPARAM) 0);
}
int CLUI_UpdateTimer(BYTE BringIn)
-{
+{
if (g_CluiData.nBehindEdgeState == 0)
{
KillTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT);
CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGOUTTIMEOUT,wBehindEdgeHideDelay*100,NULL);
}
- if (bShowEventStarted == 0 && g_CluiData.nBehindEdgeState>0 )
+ if (bShowEventStarted == 0 && g_CluiData.nBehindEdgeState>0 )
{
KillTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT);
bShowEventStarted = (BOOL)CLUI_SafeSetTimer(pcli->hwndContactList,TM_BRINGINTIMEOUT,wBehindEdgeShowDelay*100,NULL);
@@ -845,7 +845,7 @@ int CLUI_HideBehindEdge() int bordersize = 0;
//Need to be moved out of screen
bShowEventStarted = 0;
- //1. get work area rectangle
+ //1. get work area rectangle
Docking_GetMonitorRectFromWindow(pcli->hwndContactList,&rcScreen);
//SystemParametersInfo(SPI_GETWORKAREA,0,&rcScreen,FALSE);
//2. move out
@@ -880,7 +880,7 @@ int CLUI_ShowFromBehindEdge() {
int method = g_CluiData.bBehindEdgeSettings;
bShowEventStarted = 0;
- if (g_mutex_bOnTrayRightClick)
+ if (g_mutex_bOnTrayRightClick)
{
g_mutex_bOnTrayRightClick = 0;
return 0;
@@ -892,7 +892,7 @@ int CLUI_ShowFromBehindEdge() int bordersize = 0;
//Need to be moved out of screen
- //1. get work area rectangle
+ //1. get work area rectangle
//SystemParametersInfo(SPI_GETWORKAREA,0,&rcScreen,FALSE);
Docking_GetMonitorRectFromWindow(pcli->hwndContactList,&rcScreen);
//2. move out
@@ -953,7 +953,7 @@ static LPPROTOTICKS CLUI_GetProtoTicksByProto(char * szProto) {
CycleStartTick[i].szProto = mir_strdup(szProto);
CycleStartTick[i].nCycleStartTick = 0;
- CycleStartTick[i].nIndex = i;
+ CycleStartTick[i].nIndex = i;
CycleStartTick[i].bGlobal = ( szProto[0] == 0 );
CycleStartTick[i].himlIconList = NULL;
return(&CycleStartTick[i]);
@@ -973,7 +973,7 @@ static int CLUI_GetConnectingIconForProtoCount(char *szAccoName) {
char szRelativePath[MAX_PATH];
GetModuleFileNameA(GetModuleHandle(NULL), szRelativePath, MAX_PATH);
- char *str = strrchr( szRelativePath, '\\' );
+ char *str = strrchr( szRelativePath, '\\' );
if ( str != NULL ) *str = 0;
CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)szRelativePath, (LPARAM)szFolderPath);
}
@@ -1036,7 +1036,7 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,BOOL UseLibrary,bool re GetModuleFileNameA(g_hInst, szMyPath, MAX_PATH);
str = strrchr(szPath,'\\');
if (str != NULL) *str = 0;
- if (UseLibrary&2)
+ if (UseLibrary&2)
mir_snprintf(szMyPath, SIZEOF(szMyPath), "%s\\Icons\\%s", szPath, filename);
mir_snprintf(szFullPath, SIZEOF(szFullPath), "%s\\Icons\\%s,%d", szPath, filename, i);
if (str != NULL) *str = '\\';
@@ -1047,14 +1047,14 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,BOOL UseLibrary,bool re if (hi) has_proto_icon = TRUE;
if (hi && nf) DestroyIcon(hi);
}
- if ( !UseLibrary) {
+ if ( !UseLibrary) {
hIcon = CLUI_ExtractIconFromPath(szFullPath,needFree);
if (hIcon) return hIcon;
if (UseLibrary)
{
mir_snprintf(szFullPath, SIZEOF(szFullPath), "%s,%d", szMyPath, internalidx);
hIcon = CLUI_ExtractIconFromPath(szFullPath,needFree);
- if (hIcon) return hIcon;
+ if (hIcon) return hIcon;
}
}
else {
@@ -1062,7 +1062,7 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,BOOL UseLibrary,bool re sid.cbSize = sizeof(sid);
sid.cx = 16;
sid.cy = 16;
- sid.hDefaultIcon = (has_proto_icon || !(UseLibrary&2))?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,(WPARAM)NULL,(LPARAM)(-internalidx));
+ sid.hDefaultIcon = (has_proto_icon || !(UseLibrary&2))?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,0,(LPARAM)(-internalidx));
sid.pszSection = SectName;
sid.pszName = IconName;
sid.pszDescription = Description;
@@ -1071,12 +1071,9 @@ HICON CLUI_LoadIconFromExternalFile(char *filename,int i,BOOL UseLibrary,bool re sid.iDefaultIndex = (UseLibrary&2)?i:(internalidx < 0)?internalidx:-internalidx;
Skin_AddIcon(&sid);
}
- return ((HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IconName));
+ return Skin_GetIcon(IconName);
}
-
-
-
return (HICON)0;
}
@@ -1086,7 +1083,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int b) HICON hIcon = NULL;
BOOL needFree;
b = b-1;
-
+
if ( szAccoName )
{
mir_snprintf(szFullPath, SIZEOF(szFullPath), "proto_conn_%s.dll",szAccoName);
@@ -1117,7 +1114,7 @@ static HICON CLUI_GetConnectingIconForProto(char *szAccoName, int b) INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam)
{
- int b;
+ int b;
PROTOTICKS *pt = NULL;
HICON hIcon = NULL;
@@ -1136,8 +1133,8 @@ INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam) }
if (pt != NULL)
{
- if (pt->nCycleStartTick != 0 && pt->nIconsCount != 0)
- {
+ if (pt->nCycleStartTick != 0 && pt->nIconsCount != 0)
+ {
b = ((GetTickCount()-pt->nCycleStartTick)/(nAnimatedIconStep))%(pt->nIconsCount);
// if (lParam)
// hIcon = CLUI_GetConnectingIconForProto("Global",b);
@@ -1159,7 +1156,7 @@ static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam) {
int status = (int)wParam;
- char *szProto = (char *)lParam;
+ char *szProto = (char *)lParam;
if ( !szProto) return (0);
if ( !status) return (0);
@@ -1172,8 +1169,8 @@ static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam) pt = CLUI_GetProtoTicksByProto(szProto);
if (pt != NULL)
{
- if (pt->nCycleStartTick == 0)
- {
+ if (pt->nCycleStartTick == 0)
+ {
KillTimer(pcli->hwndContactList,TM_STATUSBARUPDATE+pt->nIndex);
cnt = CLUI_GetConnectingIconForProtoCount(szProto);
if (cnt != 0)
@@ -1200,7 +1197,7 @@ static int CLUI_CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam) return 0;
}
-static BOOL CALLBACK BroadcastEnumChildProc(HWND hwndChild, LPARAM lParam)
+static BOOL CALLBACK BroadcastEnumChildProc(HWND hwndChild, LPARAM lParam)
{
MSG * pMsg = (MSG*)lParam;
SendNotifyMessage( hwndChild, pMsg->message, pMsg->wParam, pMsg->lParam );
@@ -1233,16 +1230,16 @@ int CLUI_ReloadCLUIOptions() //window borders
if (g_CluiData.fDisableSkinEngine) {
g_CluiData.LeftClientMargin = 0;
- g_CluiData.RightClientMargin = 0;
+ g_CluiData.RightClientMargin = 0;
g_CluiData.TopClientMargin = 0;
g_CluiData.BottomClientMargin = 0;
} else {
//window borders
g_CluiData.LeftClientMargin = (int)db_get_b(NULL,"CLUI","LeftClientMargin",SETTING_LEFTCLIENTMARIGN_DEFAULT);
- g_CluiData.RightClientMargin = (int)db_get_b(NULL,"CLUI","RightClientMargin",SETTING_RIGHTCLIENTMARIGN_DEFAULT);
+ g_CluiData.RightClientMargin = (int)db_get_b(NULL,"CLUI","RightClientMargin",SETTING_RIGHTCLIENTMARIGN_DEFAULT);
g_CluiData.TopClientMargin = (int)db_get_b(NULL,"CLUI","TopClientMargin",SETTING_TOPCLIENTMARIGN_DEFAULT);
g_CluiData.BottomClientMargin = (int)db_get_b(NULL,"CLUI","BottomClientMargin",SETTING_BOTTOMCLIENTMARIGN_DEFAULT);
- }
+ }
BroadCastMessageToChild(pcli->hwndContactList, WM_THEMECHANGED, 0, 0);
NotifyEventHooks(g_CluiData.hEventBkgrChanged, 0, 0);
@@ -1279,10 +1276,10 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) mbi.cbSize = sizeof(MENUBARINFO);
fnGetMenuBarInfo(hwnd,OBJID_MENU, 0, &mbi);
if ( !(mbi.rcBar.right-mbi.rcBar.left>0 && mbi.rcBar.bottom-mbi.rcBar.top>0)) return 1;
- r1 = mbi.rcBar;
+ r1 = mbi.rcBar;
r1.bottom += !db_get_b(NULL,"CLUI","LineUnderMenu",SETTING_LINEUNDERMENU_DEFAULT);
if (item < 1)
- {
+ {
treg = CreateRectRgn(mbi.rcBar.left,mbi.rcBar.top,mbi.rcBar.right,r1.bottom);
if (item == 0) //should remove item clips
{
@@ -1292,7 +1289,7 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) fnGetMenuBarInfo(hwnd,OBJID_MENU, t, &mbi);
treg2 = CreateRectRgn(mbi.rcBar.left,mbi.rcBar.top,mbi.rcBar.right,mbi.rcBar.bottom);
CombineRgn(treg,treg,treg2,RGN_DIFF);
- DeleteObject(treg2);
+ DeleteObject(treg2);
}
}
@@ -1307,10 +1304,10 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) r1.top -= ra.top;
r1.bottom -= ra.top;
r1.right -= ra.left;
- }
+ }
//SelectClipRgn(hdc,NULL);
SelectClipRgn(hdc,treg);
- DeleteObject(treg);
+ DeleteObject(treg);
{
RECT rc;
HWND hwnd = pcli->hwndContactList;
@@ -1349,12 +1346,12 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) switch(dat->MenuBmpUse&CLBM_TYPE) {
case CLB_STRETCH:
if (dat->MenuBmpUse&CLBF_PROPORTIONAL) {
- if (clRect.right-clRect.left*bmp.bmHeight < clRect.bottom-clRect.top*bmp.bmWidth)
+ if (clRect.right-clRect.left*bmp.bmHeight < clRect.bottom-clRect.top*bmp.bmWidth)
{
desth = clRect.bottom-clRect.top;
destw = desth*bmp.bmWidth/bmp.bmHeight;
}
- else
+ else
{
destw = clRect.right-clRect.left;
desth = destw*bmp.bmHeight/bmp.bmWidth;
@@ -1387,7 +1384,7 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) break;
default: //clb_topleft
destw = bmp.bmWidth;
- desth = bmp.bmHeight;
+ desth = bmp.bmHeight;
break;
}
if (desth && destw)
@@ -1398,15 +1395,15 @@ static int CLUI_DrawMenuBackGround(HWND hwnd, HDC hdc, int item, int state) SelectObject(hdcBmp,oldbm);
DeleteDC(hdcBmp);
- }
+ }
else
{
hbr = CreateSolidBrush(dat->MenuBkColor);
FillRect(hdc,&r1,hbr);
- DeleteObject(hbr);
+ DeleteObject(hbr);
}
- if (item != 0 && state&(ODS_SELECTED))
+ if (item != 0 && state&(ODS_SELECTED))
{
hbr = CreateSolidBrush(dat->MenuBkHiColor);
FillRect(hdc,&r1,hbr);
@@ -1484,12 +1481,12 @@ void CLUI_cli_LoadCluiGlobalOpts() if (tLayeredFlag)
{
if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 1)
- db_set_b(NULL,"CList","WindowShadow",2);
+ db_set_b(NULL,"CList","WindowShadow",2);
}
else
{
if (db_get_b(NULL,"CList","WindowShadow",SETTING_WINDOWSHADOW_DEFAULT) == 2)
- db_set_b(NULL,"CList","WindowShadow",1);
+ db_set_b(NULL,"CList","WindowShadow",1);
}
corecli.pfnLoadCluiGlobalOpts();
}
@@ -1499,14 +1496,14 @@ int CLUI_TestCursorOnBorders() {
HWND hwnd = pcli->hwndContactList;
HCURSOR hCurs1 = NULL;
- RECT r;
+ RECT r;
POINT pt;
int k = 0, t = 0, fx,fy;
HWND hAux;
BOOL mouse_in_window = 0;
HWND gf = GetForegroundWindow();
GetCursorPos(&pt);
- hAux = WindowFromPoint(pt);
+ hAux = WindowFromPoint(pt);
if (CLUI_CheckOwnedByClui(hAux))
{
if (g_bTransparentFlag) {
@@ -1537,7 +1534,7 @@ int CLUI_TestCursorOnBorders() */
hAux = WindowFromPoint(pt);
- while(hAux != NULL)
+ while(hAux != NULL)
{
if (hAux == hwnd) {mouse_in_window = 1; break;}
hAux = GetParent(hAux);
@@ -1559,7 +1556,7 @@ int CLUI_TestCursorOnBorders() if (g_CluiData.nBehindEdgeState <= 0 && (!(db_get_b(NULL,"CLUI","LockSize",SETTING_LOCKSIZE_DEFAULT))))
switch(k)
{
- case 1:
+ case 1:
case 2:
if ( !g_CluiData.fDocked || (g_CluiData.fDocked == 2 && k == 1) || (g_CluiData.fDocked == 1 && k == 2)){hCurs1 = LoadCursor(NULL, IDC_SIZEWE); break;}
case 3: if ( !g_CluiData.fDocked) {hCurs1 = LoadCursor(NULL, IDC_SIZENS); break;}
@@ -1609,10 +1606,10 @@ int CLUI_SizingOnBorder(POINT pt, int PerformSize) if ( !(pt.x >= r.left && pt.x <= r.right && pt.y >= r.top && pt.y <= r.bottom)) sizeOnBorderFlag = SCF_NONE;
- if (sizeOnBorderFlag && PerformSize)
- {
+ if (sizeOnBorderFlag && PerformSize)
+ {
ReleaseCapture();
- SendMessage(hwnd, WM_SYSCOMMAND, SC_SIZE + sizeOnBorderFlag,MAKELPARAM(pt.x,pt.y));
+ SendMessage(hwnd, WM_SYSCOMMAND, SC_SIZE + sizeOnBorderFlag,MAKELPARAM(pt.x,pt.y));
return sizeOnBorderFlag;
}
else return sizeOnBorderFlag;
@@ -1623,7 +1620,7 @@ int CLUI_SyncSmoothAnimation(WPARAM wParam, LPARAM lParam); static void CLUI_SmoothAnimationThreadProc(HWND hwnd)
{
// return;
- if ( !mutex_bAnimationInProgress)
+ if ( !mutex_bAnimationInProgress)
{
g_dwSmoothAnimationThreadID = 0;
return; /// Should be some locked to avoid painting against contact deletion.
@@ -1633,9 +1630,9 @@ static void CLUI_SmoothAnimationThreadProc(HWND hwnd) if ( !g_mutex_bLockUpdating)
{
if ( !MirandaExiting())
- Sync(CLUI_SyncSmoothAnimation, (WPARAM)0, (LPARAM)hwnd );
+ Sync(CLUI_SyncSmoothAnimation, 0, (LPARAM)hwnd );
SleepEx(20,TRUE);
- if (MirandaExiting())
+ if (MirandaExiting())
{
g_dwSmoothAnimationThreadID = 0;
return;
@@ -1660,25 +1657,25 @@ static int CLUI_SmoothAlphaThreadTransition(HWND hwnd) mutex_bAnimationInProgress = 0;
g_CluiData.bCurrentAlpha = bAlphaEnd;
if (g_CluiData.bCurrentAlpha == 0)
- {
+ {
g_CluiData.bCurrentAlpha = 1;
ske_JustUpdateWindowImage();
- mutex_bShowHideCalledFromAnimation = 1;
+ mutex_bShowHideCalledFromAnimation = 1;
CLUI_ShowWindowMod(pcli->hwndContactList,0);
Sync(CLUIFrames_OnShowHide, hwnd,0);
mutex_bShowHideCalledFromAnimation = 0;
g_CluiData.bCurrentAlpha = 0;
if ( !g_CluiData.fLayered) RedrawWindow(pcli->hwndContactList,NULL,NULL,RDW_ERASE|RDW_FRAME);
- return 0;
+ return 0;
}
}
- else g_CluiData.bCurrentAlpha = a;
- ske_JustUpdateWindowImage();
+ else g_CluiData.bCurrentAlpha = a;
+ ske_JustUpdateWindowImage();
return 1;
}
int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam)
-{
+{
if ((!g_CluiData.fLayered
&& (!g_CluiData.fSmoothAnimation && !g_bTransparentFlag)) || !g_proc_SetLayeredWindowAttributesNew)
@@ -1721,14 +1718,14 @@ int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam) }
if (mutex_bShowHideCalledFromAnimation) return 0;
if (wParam != 2) //not from timer
- {
+ {
bAlphaEnd = GoalAlpha;
if ( !mutex_bAnimationInProgress)
{
if ((!IsWindowVisible(hwnd) || g_CluiData.bCurrentAlpha == 0) && bAlphaEnd>0 )
{
- mutex_bShowHideCalledFromAnimation = 1;
- CLUI_ShowWindowMod(pcli->hwndContactList,SW_SHOWNA);
+ mutex_bShowHideCalledFromAnimation = 1;
+ CLUI_ShowWindowMod(pcli->hwndContactList,SW_SHOWNA);
Sync(CLUIFrames_OnShowHide, hwnd,SW_SHOW);
mutex_bShowHideCalledFromAnimation = 0;
g_CluiData.bCurrentAlpha = 1;
@@ -1738,7 +1735,7 @@ int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam) {
mutex_bAnimationInProgress = 1;
if (g_CluiData.fSmoothAnimation)
- g_dwSmoothAnimationThreadID = (DWORD)mir_forkthread((pThreadFunc)CLUI_SmoothAnimationThreadProc,pcli->hwndContactList);
+ g_dwSmoothAnimationThreadID = (DWORD)mir_forkthread((pThreadFunc)CLUI_SmoothAnimationThreadProc,pcli->hwndContactList);
}
}
@@ -1753,11 +1750,11 @@ int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam) {
KillTimer(hwnd,TM_SMOTHALPHATRANSITION);
mutex_bAnimationInProgress = 0;
- if (bAlphaEnd == 0)
+ if (bAlphaEnd == 0)
{
g_CluiData.bCurrentAlpha = 1;
ske_UpdateWindowImage();
- mutex_bShowHideCalledFromAnimation = 1;
+ mutex_bShowHideCalledFromAnimation = 1;
CLUI_ShowWindowMod(pcli->hwndContactList,0);
Sync(CLUIFrames_OnShowHide, pcli->hwndContactList,0);
mutex_bShowHideCalledFromAnimation = 0;
@@ -1793,7 +1790,7 @@ BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase ) return 0;
}
}
- else
+ else
return InvalidateRect(hWnd,lpRect,bErase);
return 1;
}
@@ -1823,7 +1820,7 @@ HANDLE RegisterIcolibIconHandle(char * szIcoID, char *szSectionName, char * szD if (tszDefaultFile)
{
CallService( MS_UTILS_PATHTOABSOLUTET, ( WPARAM )tszDefaultFile, ( LPARAM )fileFull );
- if ( !FileExists(fileFull)) fileFull[0] = _T('\0');
+ if ( !FileExists(fileFull)) fileFull[0] = _T('\0');
}
if (fileFull[0] != _T('\0'))
{
@@ -1839,7 +1836,7 @@ HANDLE RegisterIcolibIconHandle(char * szIcoID, char *szSectionName, char * szD }
hIcolibItem = Skin_AddIcon(&sid);
if ( sid.hDefaultIcon ) DestroyIcon(sid.hDefaultIcon);
- return hIcolibItem;
+ return hIcolibItem;
}
// MAIN WINPROC MESSAGE HANDLERS
@@ -1858,7 +1855,7 @@ LRESULT CLUI::PreProcessWndProc( UINT msg, WPARAM wParam, LPARAM lParam, BOOL& b if it gets it, it tries to open a file mapping object and then maps it to this process space,
it expects 256 bytes of data (incl. NULL) it will then write back the profile it is using the DB to fill in the answer.
- The caller is expected to create this mapping object and tell us the ID we need to open ours.
+ The caller is expected to create this mapping object and tell us the ID we need to open ours.
*/
if (g_CluiData.bSTATE == STATE_EXITING && msg != WM_DESTROY)
{
@@ -1866,17 +1863,17 @@ LRESULT CLUI::PreProcessWndProc( UINT msg, WPARAM wParam, LPARAM lParam, BOOL& b return 0;
}
if (msg == uMsgGetProfile && wParam != 0) /* got IPC message */
- {
+ {
HANDLE hMap;
char szName[MAX_PATH];
int rc = 0;
mir_snprintf( szName, SIZEOF(szName), "Miranda::%u", wParam ); // caller will tell us the ID of the map
hMap = OpenFileMappingA( FILE_MAP_ALL_ACCESS,FALSE, szName );
- if ( hMap != NULL )
+ if ( hMap != NULL )
{
void *hView = NULL;
hView = MapViewOfFile( hMap, FILE_MAP_ALL_ACCESS, 0, 0, MAX_PATH );
- if (hView)
+ if (hView)
{
char szFilePath[MAX_PATH], szProfile[MAX_PATH];
CallService( MS_DB_GETPROFILEPATH,MAX_PATH,(LPARAM)&szFilePath );
@@ -1905,7 +1902,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) if (bNeedFixSizingRect && (rcCorrectSizeRect.bottom != 0 || rcCorrectSizeRect.top != 0))
{
if (wParam != WMSZ_BOTTOM) wp->bottom = rcCorrectSizeRect.bottom;
- if (wParam != WMSZ_TOP) wp->top = rcCorrectSizeRect.top;
+ if (wParam != WMSZ_TOP) wp->top = rcCorrectSizeRect.top;
}
bNeedFixSizingRect = 0;
rcSizingRect = *wp;
@@ -1924,13 +1921,13 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) wp = (WINDOWPOS *)lParam;
GetWindowRect(m_hWnd,&rcOldWindowRect);
- // Ïðèëèïàíèå ê êðàÿì by ZorG
+ // Ïðèëèïàíèå ê êðàÿì by ZorG
CLUI::SnappingToEdge(wp);
if ((rcOldWindowRect.bottom-rcOldWindowRect.top != wp->cy || rcOldWindowRect.right-rcOldWindowRect.left != wp->cx) && !(wp->flags&SWP_NOSIZE))
{
- {
- if ( !(wp->flags&SWP_NOMOVE))
+ {
+ if ( !(wp->flags&SWP_NOMOVE))
{
rcNewWindowRect.left = wp->x;
rcNewWindowRect.top = wp->y;
@@ -1940,7 +1937,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) rcNewWindowRect.left = rcOldWindowRect.left;
rcNewWindowRect.top = rcOldWindowRect.top;
}
- rcNewWindowRect.right = rcNewWindowRect.left+wp->cx;
+ rcNewWindowRect.right = rcNewWindowRect.left+wp->cx;
rcNewWindowRect.bottom = rcNewWindowRect.top+wp->cy;
work_rect = rcNewWindowRect;
}
@@ -1967,13 +1964,13 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) {
ModernSkinButton_ReposButtons( m_hWnd, SBRF_DO_NOT_DRAW, &work_rect );
ske_PrepeareImageButDontUpdateIt(&work_rect);
- g_CluiData.mutexPreventDockMoving = 0;
- ske_UpdateWindowImageRect(&work_rect);
+ g_CluiData.mutexPreventDockMoving = 0;
+ ske_UpdateWindowImageRect(&work_rect);
EndDeferWindowPos(PosBatch);
g_CluiData.mutexPreventDockMoving = 1;
- }
- Sleep(0);
- mutex_bDuringSizing = 0;
+ }
+ Sleep(0);
+ mutex_bDuringSizing = 0;
DefWindowProc(m_hWnd,msg,wParam,lParam);
return SendMessage(m_hWnd,WM_WINDOWPOSCHANGED,wParam,lParam);
}
@@ -1982,17 +1979,17 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) SetRect(&rcCorrectSizeRect,0,0,0,0);
// bNeedFixSizingRect = 0;
}
- return DefWindowProc(m_hWnd,msg,wParam,lParam);
- }
+ return DefWindowProc(m_hWnd,msg,wParam,lParam);
+ }
}
else if (msg == WM_WINDOWPOSCHANGING)
{
- // Snaping if it is not in LayeredMode
+ // Snaping if it is not in LayeredMode
WINDOWPOS * wp;
wp = (WINDOWPOS *)lParam;
CLUI::SnappingToEdge( wp );
- return DefWindowProc(m_hWnd,msg,wParam,lParam);
+ return DefWindowProc(m_hWnd,msg,wParam,lParam);
}
switch (msg)
{
@@ -2016,7 +2013,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) {
RECT rc;
CallWindowProc(DefWindowProc, m_hWnd, msg, wParam, lParam);
- mutex_bDuringSizing = 0;
+ mutex_bDuringSizing = 0;
GetWindowRect(m_hWnd, &rc);
CheckFramesPos(&rc);
Sync(CLUIFrames_OnMoving,m_hWnd,&rc);
@@ -2031,11 +2028,11 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) }
return TRUE;
}
- case WM_SIZE:
- {
+ case WM_SIZE:
+ {
RECT rc;
if (g_mutex_bSizing) return 0;
- if (wParam != SIZE_MINIMIZED /* && IsWindowVisible(m_hWnd)*/)
+ if (wParam != SIZE_MINIMIZED /* && IsWindowVisible(m_hWnd)*/)
{
if ( pcli->hwndContactList == NULL )
return 0;
@@ -2056,7 +2053,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) Sync(CLUIFrames_OnClistResize_mod,(WPARAM)m_hWnd,(LPARAM)1);
CLUIFrames_ApplyNewSizes(2);
CLUIFrames_ApplyNewSizes(1);
- SendMessage(m_hWnd,CLN_LISTSIZECHANGE,0,0);
+ SendMessage(m_hWnd,CLN_LISTSIZECHANGE,0,0);
g_mutex_bSizing = 0;
}
@@ -2068,7 +2065,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) db_set_dw(NULL,"CList","y",(DWORD)rc.top);
}
else SetWindowRgn(m_hWnd,NULL,0);
- db_set_dw(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
+ db_set_dw(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
if ( !g_CluiData.fLayered)
{
@@ -2082,14 +2079,14 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) h = (h < v)?h:v;
hRgn1 = CreateRoundRectRgn(0,0,(r.right-r.left+1),(r.bottom-r.top+1),h,h);
if ((db_get_b(NULL,"CLC","RoundCorners",SETTING_ROUNDCORNERS_DEFAULT)) && (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0)))
- SetWindowRgn(m_hWnd,hRgn1,FALSE);
+ SetWindowRgn(m_hWnd,hRgn1,FALSE);
else
{
DeleteObject(hRgn1);
SetWindowRgn(m_hWnd,NULL,FALSE);
}
- RedrawWindow(m_hWnd,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
- }
+ RedrawWindow(m_hWnd,NULL,NULL,RDW_INVALIDATE|RDW_ERASE|RDW_FRAME|RDW_UPDATENOW|RDW_ALLCHILDREN);
+ }
}
else {
if (db_get_b(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT)) {
@@ -2097,7 +2094,7 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) db_set_b(NULL,"CList","State",SETTING_STATE_HIDDEN);
}
else db_set_b(NULL,"CList","State",SETTING_STATE_MINIMIZED);
- if (MySetProcessWorkingSetSize != NULL)
+ if (MySetProcessWorkingSetSize != NULL)
MySetProcessWorkingSetSize(GetCurrentProcess(),-1,-1);
}
@@ -2105,9 +2102,9 @@ LRESULT CLUI::OnSizingMoving( UINT msg, WPARAM wParam, LPARAM lParam ) }
case WM_WINDOWPOSCHANGING:
{
- WINDOWPOS *wp = (WINDOWPOS *)lParam;
- if (wp->flags&SWP_HIDEWINDOW && mutex_bAnimationInProgress)
- return 0;
+ WINDOWPOS *wp = (WINDOWPOS *)lParam;
+ if (wp->flags&SWP_HIDEWINDOW && mutex_bAnimationInProgress)
+ return 0;
if (g_CluiData.fOnDesktop)
wp->flags |= SWP_NOACTIVATE|SWP_NOZORDER;
return DefWindowProc(m_hWnd, msg, wParam, lParam);
@@ -2186,10 +2183,10 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) HDC paintDC;
GetClientRect(m_hWnd,&w);
- if ( !(w.right>0 && w.bottom>0)) return DefWindowProc(m_hWnd, msg, wParam, lParam);
+ if ( !(w.right>0 && w.bottom>0)) return DefWindowProc(m_hWnd, msg, wParam, lParam);
if ( !g_CluiData.fDisableSkinEngine)
- {
+ {
paintDC = GetDC(m_hWnd);
w2 = w;
hdc = CreateCompatibleDC(paintDC);
@@ -2206,7 +2203,7 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) HDC hdc = BeginPaint(m_hWnd,&ps);
ske_BltBackImage(m_hWnd,hdc,&ps.rcPaint);
ps.fErase = FALSE;
- EndPaint(m_hWnd,&ps);
+ EndPaint(m_hWnd,&ps);
}
ValidateRect(m_hWnd,NULL);
@@ -2230,7 +2227,7 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) w2 = ps.rcPaint;
SkinDrawGlyph(ps.hdc,&w,&w2,"Main,ID=Background,Opt=Non-Layered");
ps.fErase = FALSE;
- EndPaint(m_hWnd,&ps);
+ EndPaint(m_hWnd,&ps);
}
}
}
@@ -2240,7 +2237,7 @@ LRESULT CLUI::OnPaint( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT CLUI::OnCreate( UINT msg, WPARAM wParam, LPARAM lParam )
{
TranslateMenu(GetMenu(m_hWnd));
- DrawMenuBar(m_hWnd);
+ DrawMenuBar(m_hWnd);
CLUIServices_ProtocolStatusChanged(0,0);
{ MENUITEMINFO mii;
@@ -2260,7 +2257,7 @@ LRESULT CLUI::OnCreate( UINT msg, WPARAM wParam, LPARAM lParam ) // mii.fMask = MIIM_TYPE;
mii.fType = MFT_OWNERDRAW;
mii.dwItemData = MENU_MINIMIZE;
- SetMenuItemInfo(GetMenu(m_hWnd),2,TRUE,&mii);
+ SetMenuItemInfo(GetMenu(m_hWnd),2,TRUE,&mii);
}
//PostMessage(m_hWnd, M_CREATECLC, 0, 0);
//pcli->hwndContactList = m_hWnd;
@@ -2277,7 +2274,7 @@ LRESULT CLUI::OnSetAllExtraIcons( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lPar LRESULT CLUI::OnCreateClc( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
{
CreateCLC();
- if ( db_get_b( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ))
+ if ( db_get_b( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ))
cliShowHide((WPARAM) m_hWnd, (LPARAM)TRUE );
PostMessage( pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0 );
return FALSE;
@@ -2305,13 +2302,13 @@ LRESULT CLUI::OnParentNotify( UINT msg, WPARAM wParam, LPARAM lParam ) {
POINT pt;
- pt.x = (short)LOWORD(lParam);
- pt.y = (short)HIWORD(lParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
ClientToScreen( m_hWnd, &pt );
wParam = 0;
lParam = 0;
- if ( CLUI_SizingOnBorder( pt,1 ))
+ if ( CLUI_SizingOnBorder( pt,1 ))
{
mutex_bIgnoreActivation = TRUE;
return 0;
@@ -2349,7 +2346,7 @@ LRESULT CLUI::OnStatusBarUpdateTimer( UINT msg, WPARAM wParam, LPARAM lParam ) status = CallProtoService(pt->szProto,PS_GETSTATUS,0,0);
if ( !(status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES))
- {
+ {
pt->nCycleStartTick = 0;
ImageList_Destroy(pt->himlIconList);
pt->himlIconList = NULL;
@@ -2363,8 +2360,8 @@ LRESULT CLUI::OnStatusBarUpdateTimer( UINT msg, WPARAM wParam, LPARAM lParam ) pt = &CycleStartTick[wParam-TM_STATUSBARUPDATE];
{
if (IsWindowVisible(pcli->hwndStatus)) pcli->pfnInvalidateRect(pcli->hwndStatus,NULL,0);//InvalidateRectZ(pcli->hwndStatus,NULL,TRUE);
- //if (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) != SETTING_TRAYICON_CYCLE)
- if (pt->bGlobal)
+ //if (DBGetContactSettingByte(NULL,"CList","TrayIcon",SETTING_TRAYICON_DEFAULT) != SETTING_TRAYICON_CYCLE)
+ if (pt->bGlobal)
cliTrayIconUpdateBase(g_szConnectingProto);
else
cliTrayIconUpdateBase(pt->szProto);
@@ -2383,7 +2380,7 @@ LRESULT CLUI::OnAutoAlphaTimer( UINT msg, WPARAM wParam, LPARAM lParam ) KillTimer(m_hWnd,TM_AUTOALPHA);
inwnd = 1;
}
- else
+ else
{
POINT pt;
HWND hwndPt;
@@ -2403,7 +2400,7 @@ LRESULT CLUI::OnAutoAlphaTimer( UINT msg, WPARAM wParam, LPARAM lParam ) hwn = hwn;
bTransparentFocus = inwnd;
if (bTransparentFocus) CLUI_SmoothAlphaTransition(m_hWnd, (BYTE)db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT), 1);
- else
+ else
{
CLUI_SmoothAlphaTransition(m_hWnd, (BYTE)(g_bTransparentFlag?db_get_b(NULL,"CList","AutoAlpha",SETTING_AUTOALPHA_DEFAULT):255), 1);
}
@@ -2435,20 +2432,20 @@ LRESULT CLUI::OnBringOutTimer( UINT msg, WPARAM wParam, LPARAM lParam ) POINT pt; GetCursorPos(&pt);
HWND hAux = WindowFromPoint(pt);
BOOL mouse_in_window = CLUI_CheckOwnedByClui(hAux);
- if ( !mouse_in_window && GetForegroundWindow() != m_hWnd )
- CLUI_HideBehindEdge();
+ if ( !mouse_in_window && GetForegroundWindow() != m_hWnd )
+ CLUI_HideBehindEdge();
return TRUE;
}
LRESULT CLUI::OnBringInTimer( UINT msg, WPARAM wParam, LPARAM lParam )
{
- //show
+ //show
KillTimer(m_hWnd,TM_BRINGINTIMEOUT);
bShowEventStarted = 0;
KillTimer(m_hWnd,TM_BRINGOUTTIMEOUT);
POINT pt; GetCursorPos(&pt);
HWND hAux = WindowFromPoint(pt);
BOOL mouse_in_window = FALSE;
- while(hAux != NULL)
+ while(hAux != NULL)
{
if (hAux == m_hWnd) { mouse_in_window = TRUE; break;}
hAux = GetParent(hAux);
@@ -2494,7 +2491,7 @@ LRESULT CLUI::OnActivate( UINT msg, WPARAM wParam, LPARAM lParam ) SendMessage(pcli->hwndContactTree, WM_ACTIVATE, wParam, lParam);
if (db_get_b(NULL, "ModernData", "HideBehind", SETTING_HIDEBEHIND_DEFAULT))
{
- if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && GetParent((HWND)lParam) != m_hWnd && !IsOption)
+ if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && GetParent((HWND)lParam) != m_hWnd && !IsOption)
{
if ( !g_bCalledFromShowHide) CLUI_UpdateTimer(0);
}
@@ -2504,12 +2501,12 @@ LRESULT CLUI::OnActivate( UINT msg, WPARAM wParam, LPARAM lParam ) }
}
- if ( !IsWindowVisible(m_hWnd) || mutex_bShowHideCalledFromAnimation)
+ if ( !IsWindowVisible(m_hWnd) || mutex_bShowHideCalledFromAnimation)
{
KillTimer(m_hWnd,TM_AUTOALPHA);
return 0;
}
- if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && !CLUI_CheckOwnedByClui((HWND)lParam) && !IsOption)
+ if (wParam == WA_INACTIVE && ((HWND)lParam != m_hWnd) && !CLUI_CheckOwnedByClui((HWND)lParam) && !IsOption)
{
if (g_bTransparentFlag)
if (bTransparentFocus)
@@ -2530,11 +2527,11 @@ LRESULT CLUI::OnActivate( UINT msg, WPARAM wParam, LPARAM lParam ) {
BYTE alpha;
if (wParam != WA_INACTIVE || CLUI_CheckOwnedByClui((HWND)lParam) || IsOption || ((HWND)lParam == m_hWnd) || GetParent((HWND)lParam) == m_hWnd) alpha = db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT);
- else
+ else
alpha = g_bTransparentFlag?db_get_b(NULL,"CList","AutoAlpha",SETTING_AUTOALPHA_DEFAULT):255;
CLUI_SmoothAlphaTransition(m_hWnd, alpha, 1);
if (IsOption) DefWindowProc(m_hWnd,msg,wParam,lParam);
- else return 1;
+ else return 1;
}
return DefWindowProc(m_hWnd,msg,wParam,lParam);
}
@@ -2550,15 +2547,15 @@ LRESULT CLUI::OnSetCursor( UINT msg, WPARAM wParam, LPARAM lParam ) bTransparentFocus = 1;
CLUI_SafeSetTimer(m_hWnd, TM_AUTOALPHA,250,NULL);
}
- }
- int k = CLUI_TestCursorOnBorders();
+ }
+ int k = CLUI_TestCursorOnBorders();
return k ? k : 1;
}
LRESULT CLUI::OnMouseActivate( UINT msg, WPARAM wParam, LPARAM lParam )
{
- if ( mutex_bIgnoreActivation )
+ if ( mutex_bIgnoreActivation )
{
mutex_bIgnoreActivation = 0;
return( MA_NOACTIVATEANDEAT );
@@ -2571,8 +2568,8 @@ LRESULT CLUI::OnMouseActivate( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT CLUI::OnNcLButtonDown( UINT msg, WPARAM wParam, LPARAM lParam )
{
POINT pt;
- pt.x = (short)LOWORD(lParam);
- pt.y = (short)HIWORD(lParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
int k = CLUI_SizingOnBorder(pt,1);
return k ? k : DefWindowProc( m_hWnd, msg, wParam, lParam );
}
@@ -2584,8 +2581,8 @@ LRESULT CLUI::OnNcLButtonDblClk( UINT msg, WPARAM wParam, LPARAM lParam ) RECT rc;
GetWindowRect(m_hWnd, &rc);
POINT pt;
- pt.x = (short)LOWORD(lParam);
- pt.y = (short)HIWORD(lParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
if ( pt.x > rc.right - 16 && pt.x < rc.right )
return CallService(MS_CLIST_SHOWHIDE, 0, 0);
}
@@ -2597,13 +2594,13 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT result;
result = DefWindowProc(m_hWnd,WM_NCHITTEST,wParam,lParam);
- if ((g_CluiData.fAutoSize) && ( result == HTSIZE || result == HTTOP ||
- result == HTTOPLEFT || result == HTTOPRIGHT ||
- result == HTBOTTOM || result == HTBOTTOMRIGHT ||
+ if ((g_CluiData.fAutoSize) && ( result == HTSIZE || result == HTTOP ||
+ result == HTTOPLEFT || result == HTTOPRIGHT ||
+ result == HTBOTTOM || result == HTBOTTOMRIGHT ||
result == HTBOTTOMLEFT))
return HTCLIENT;
- if (result == HTMENU)
+ if (result == HTMENU)
{
int t;
POINT pt;
@@ -2620,7 +2617,7 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam ) POINT pt;
int k;
pt.x = (short)LOWORD(lParam);
- pt.y = (short)HIWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
k = CLUI_SizingOnBorder(pt,0);
if ( !k && (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)))
return HTCAPTION;
@@ -2634,13 +2631,13 @@ LRESULT CLUI::OnShowWindow( UINT msg, WPARAM wParam, LPARAM lParam ) BYTE gAlpha;
if (lParam) return 0;
- if (mutex_bShowHideCalledFromAnimation) return 1;
+ if (mutex_bShowHideCalledFromAnimation) return 1;
{
if ( !wParam) gAlpha = 0;
- else
+ else
gAlpha = (db_get_b(NULL,"CList","Transparent",SETTING_TRANSPARENT_DEFAULT)?db_get_b(NULL,"CList","Alpha",SETTING_ALPHA_DEFAULT):255);
- if (wParam)
+ if (wParam)
{
g_CluiData.bCurrentAlpha = 0;
Sync(CLUIFrames_OnShowHide, pcli->hwndContactList,1);
@@ -2719,7 +2716,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) return FALSE;
if (mutex_bDuringSizing)
rcWindow = rcSizingRect;
- else
+ else
GetWindowRect(m_hWnd,&rcWindow);
if ( !g_CluiData.fAutoSize || pcli->hwndContactTree == 0 || CallService(MS_CLIST_DOCKINGISDOCKED,0,0))
return FALSE;
@@ -2730,7 +2727,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) GetWindowRect(pcli->hwndContactTree,&rcTree);
FRAMEWND* frm = FindFrameByItsHWND(pcli->hwndContactTree);
- if (frm)
+ if (frm)
rcTree2 = frm->wndSize;
else
SetRect(&rcTree2,0,0,0,0);
@@ -2748,7 +2745,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) }
- if (pnmc->pt.y>(rcWorkArea.bottom-rcWorkArea.top))
+ if (pnmc->pt.y>(rcWorkArea.bottom-rcWorkArea.top))
{
pnmc->pt.y = (rcWorkArea.bottom-rcWorkArea.top);
@@ -2779,10 +2776,10 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) nRequiredHeight = 1;
if (mutex_bDuringSizing)
{
- bNeedFixSizingRect = 1;
+ bNeedFixSizingRect = 1;
rcSizingRect.top = rcWindow.top;
rcSizingRect.bottom = rcWindow.bottom;
- rcCorrectSizeRect = rcSizingRect;
+ rcCorrectSizeRect = rcSizingRect;
}
else
{
@@ -2815,7 +2812,7 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc ) if (hItem && !(hitFlags & CLCHT_NOWHERE))
return DefCluiWndProc( WM_NOTIFY, 0, (LPARAM)pnmc );
- if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
+ if ((hitFlags & (CLCHT_NOWHERE | CLCHT_INLEFTMARGIN | CLCHT_BELOWITEMS)) == 0)
return DefCluiWndProc( WM_NOTIFY, 0, (LPARAM)pnmc );
if (db_get_b(NULL,"CLUI","ClientAreaDrag",SETTING_CLIENTDRAG_DEFAULT)) {
@@ -2831,22 +2828,22 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc ) return ClcEnterDragToScroll(pcli->hwndContactTree,pnmc->pt.y);
return 0;
-}
+}
LRESULT CLUI::OnNotify( UINT msg, WPARAM wParam, LPARAM lParam )
{
LPNMHDR pnmhdr = (LPNMHDR)lParam;
- if ( pnmhdr->hwndFrom != pcli->hwndContactTree )
+ if ( pnmhdr->hwndFrom != pcli->hwndContactTree )
return DefCluiWndProc( msg, wParam, lParam );
- switch ( pnmhdr->code)
+ switch ( pnmhdr->code)
{
case CLN_NEWCONTACT: return OnNewContactNotify((NMCLISTCONTROL *)pnmhdr );
case CLN_LISTREBUILT: return OnListRebuildNotify((NMCLISTCONTROL *)pnmhdr );
case CLN_LISTSIZECHANGE: return OnListSizeChangeNotify((NMCLISTCONTROL *)pnmhdr );
case NM_CLICK: return OnClickNotify((NMCLISTCONTROL *)pnmhdr );
- }
+ }
return DefCluiWndProc( msg, wParam, lParam );
}
@@ -2857,7 +2854,7 @@ LRESULT CLUI::OnContextMenu( UINT msg, WPARAM wParam, LPARAM lParam ) pt.x = (short)LOWORD(lParam);
pt.y = (short)HIWORD(lParam);
- // x/y might be -1 if it was generated by a kb click
+ // x/y might be -1 if it was generated by a kb click
GetWindowRect(pcli->hwndContactTree,&rc);
if ( pt.x == -1 && pt.y == -1) {
// all this is done in screen-coords!
@@ -2865,7 +2862,7 @@ LRESULT CLUI::OnContextMenu( UINT msg, WPARAM wParam, LPARAM lParam ) // the mouse isnt near the window, so put it in the middle of the window
if ( !PtInRect(&rc,pt)) {
pt.x = rc.left + (rc.right - rc.left) / 2;
- pt.y = rc.top + (rc.bottom - rc.top) / 2;
+ pt.y = rc.top + (rc.bottom - rc.top) / 2;
}
}
if (PtInRect( &rc ,pt ))
@@ -2913,13 +2910,13 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) if (dis->CtlType == ODT_MENU) {
if (dis->itemData == MENU_MIRANDAMENU) {
if ( !g_CluiData.fLayered)
- {
- char buf[255];
- short offset = 1 + ( dis->itemState&ODS_SELECTED ? 1 : 0 )
+ {
+ char buf[255];
+ short offset = 1 + ( dis->itemState&ODS_SELECTED ? 1 : 0 )
- ( dis->itemState&ODS_HOTLIGHT ? 1 : 0 );
-
+
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MAINMENU);
-
+
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 1, dis->itemState);
mir_snprintf(buf,SIZEOF(buf),"Main,ID=MainMenu,Selected=%s,Hot=%s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
SkinDrawGlyph(dis->hDC,&dis->rcItem,&dis->rcItem,buf);
@@ -2927,10 +2924,10 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) int x = (dis->rcItem.right + dis->rcItem.left - GetSystemMetrics(SM_CXSMICON)) / 2 + offset;
int y = (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2 + offset;
- DrawState( dis->hDC, NULL, NULL, (LPARAM)hIcon, 0, x, y , 0 , 0 ,
+ DrawState( dis->hDC, NULL, NULL, (LPARAM)hIcon, 0, x, y , 0 , 0 ,
DST_ICON | ( dis->itemState & ODS_INACTIVE && (((FALSE))) ? DSS_DISABLED : DSS_NORMAL ));
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
nMirMenuState = dis->itemState;
} else {
nMirMenuState = dis->itemState;
@@ -2966,14 +2963,14 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) } else if (dis->itemData == MENU_MINIMIZE && !g_CluiData.fLayered)
{
//TODO check if caption is visible
- char buf[255] = {0};
+ char buf[255] = {0};
short dx = 1+(dis->itemState&ODS_SELECTED?1:0)-(dis->itemState&ODS_HOTLIGHT?1:0);
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 3, dis->itemState);
mir_snprintf(buf,SIZEOF(buf),"Main,ID=MainMenu,Selected=%s,Hot=%s",(dis->itemState&ODS_SELECTED)?"True":"False",(dis->itemState&ODS_HOTLIGHT)?"True":"False");
SkinDrawGlyph(dis->hDC,&dis->rcItem,&dis->rcItem,buf);
DrawState(dis->hDC,NULL,NULL,(LPARAM)hIcon,0,(dis->rcItem.right+dis->rcItem.left-GetSystemMetrics(SM_CXSMICON))/2+dx,(dis->rcItem.bottom+dis->rcItem.top-GetSystemMetrics(SM_CYSMICON))/2+dx,0,0,DST_ICON|(dis->itemState&ODS_INACTIVE && FALSE?DSS_DISABLED:DSS_NORMAL));
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
nMirMenuState = dis->itemState;
}
@@ -3006,7 +3003,7 @@ LRESULT CLUI::OnDestroy( UINT msg, WPARAM wParam, LPARAM lParam ) }
TRACE("CLUI.c: WM_DESTROY - WaitThreadsCompletion \n");
- while (CLUI_WaitThreadsCompletion(m_hWnd)); //stop all my threads
+ while (CLUI_WaitThreadsCompletion(m_hWnd)); //stop all my threads
TRACE("CLUI.c: WM_DESTROY - WaitThreadsCompletion DONE\n");
for (int i=0; i < 64; i++)
@@ -3022,9 +3019,9 @@ LRESULT CLUI::OnDestroy( UINT msg, WPARAM wParam, LPARAM lParam ) RemoveMenu(g_hMenuMain, 0, MF_BYPOSITION);
DestroyMenu(g_hMenuMain);
- pcli->pfnTrayIconDestroy(m_hWnd);
- mutex_bAnimationInProgress = 0;
- CallService(MS_CLIST_FRAMES_REMOVEFRAME,(WPARAM)hFrameContactTree,0);
+ pcli->pfnTrayIconDestroy(m_hWnd);
+ mutex_bAnimationInProgress = 0;
+ CallService(MS_CLIST_FRAMES_REMOVEFRAME,(WPARAM)hFrameContactTree,0);
TRACE("CLUI.c: WM_DESTROY - hFrameContactTree removed\n");
pcli->hwndContactTree = NULL;
pcli->hwndStatus = NULL;
@@ -3035,7 +3032,7 @@ LRESULT CLUI::OnDestroy( UINT msg, WPARAM wParam, LPARAM lParam ) GetWindowRect(pcli->hwndContactList,&r);
if (db_get_b(NULL,"CLUI","AutoSizeUpward",SETTING_AUTOSIZEUPWARD_DEFAULT))
r.top = r.bottom-CLUIFrames_GetTotalHeight();
- else
+ else
r.bottom = r.top+CLUIFrames_GetTotalHeight();
db_set_dw(NULL,"CList","y",r.top);
db_set_dw(NULL,"CList","Height",r.bottom-r.top);
diff --git a/plugins/Clist_modern/src/modern_cluiframes.cpp b/plugins/Clist_modern/src/modern_cluiframes.cpp index d031d33ec9..f08b600ce5 100644 --- a/plugins/Clist_modern/src/modern_cluiframes.cpp +++ b/plugins/Clist_modern/src/modern_cluiframes.cpp @@ -1236,7 +1236,7 @@ static int UpdateTBToolTip(int framepos) ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS ;
ti.uId = (UINT_PTR)g_pfwFrames[framepos].TitleBar.hwnd;
- return(SendMessage(g_pfwFrames[framepos].TitleBar.hwndTip,TTM_UPDATETIPTEXT ,(WPARAM)0,(LPARAM)&ti));
+ return(SendMessage(g_pfwFrames[framepos].TitleBar.hwndTip,TTM_UPDATETIPTEXT ,0,(LPARAM)&ti));
}
};
@@ -1292,7 +1292,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) return 0;
case FO_NAME:
- if (lParam == (LPARAM)NULL)
+ if (lParam == 0)
return -1;
mir_free(fw.Name);
@@ -1308,7 +1308,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) return 0;
case FO_TBNAME:
- if (lParam == (LPARAM)NULL) { return(-1);}
+ if (lParam == 0) { return(-1);}
mir_free(fw.TitleBar.tbname);
mir_free(fw.TitleBar.sztbname);
@@ -1326,7 +1326,7 @@ static int _us_DoSetFrameOptions(WPARAM wParam,LPARAM lParam) return 0;
case FO_TBTIPNAME:
- if (lParam == (LPARAM)NULL) { return(-1);}
+ if (lParam == 0) { return(-1);}
if (fw.TitleBar.tooltip != NULL) mir_free_and_nil(fw.TitleBar.tooltip);
if (fw.TitleBar.sztooltip != NULL) mir_free_and_nil(fw.TitleBar.sztooltip);
if (bUnicodeText)
@@ -1966,7 +1966,7 @@ static int _us_DoAddFrame(WPARAM wParam,LPARAM lParam) ti.hinst = g_hInst;
ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS ;
ti.uId = (UINT_PTR)g_pfwFrames[g_nFramesCount].TitleBar.hwnd;
- res = SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ADDTOOL,(WPARAM)0,(LPARAM)&ti);
+ res = SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ADDTOOL,0,(LPARAM)&ti);
}
SendMessageA(g_pfwFrames[g_nFramesCount].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)g_pfwFrames[g_nFramesCount].TitleBar.ShowTitleBarTip,0);
@@ -3700,7 +3700,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP memset(&minmax,0,sizeof(minmax));
- if (SendMessage(g_pfwFrames[framepos].hWnd,WM_GETMINMAXINFO,(WPARAM)0,(LPARAM)&minmax) == 0)
+ if (SendMessage(g_pfwFrames[framepos].hWnd,WM_GETMINMAXINFO,0,(LPARAM)&minmax) == 0)
{
RECT border;
int tbh = g_nTitleBarHeight*btoint(g_pfwFrames[framepos].TitleBar.ShowTitleBar);
diff --git a/plugins/Clist_modern/src/modern_extraimage.cpp b/plugins/Clist_modern/src/modern_extraimage.cpp index 98fe4f177e..05f0efc970 100644 --- a/plugins/Clist_modern/src/modern_extraimage.cpp +++ b/plugins/Clist_modern/src/modern_extraimage.cpp @@ -40,7 +40,7 @@ void SetNewExtraColumnCount() void ExtraImage_ReloadExtraIcons()
{
SendMessage(pcli->hwndContactTree,CLM_SETEXTRACOLUMNSSPACE,db_get_b(NULL,"CLUI","ExtraColumnSpace",18),0);
- SendMessage(pcli->hwndContactTree,CLM_SETEXTRAIMAGELIST,0,(LPARAM)NULL);
+ SendMessage(pcli->hwndContactTree,CLM_SETEXTRAIMAGELIST,0,0);
if (hExtraImageList)
ImageList_Destroy(hExtraImageList);
if (hWideExtraImageList)
diff --git a/plugins/Clist_modern/src/modern_groupmenu.cpp b/plugins/Clist_modern/src/modern_groupmenu.cpp index 2abef3c387..b1de089fbb 100644 --- a/plugins/Clist_modern/src/modern_groupmenu.cpp +++ b/plugins/Clist_modern/src/modern_groupmenu.cpp @@ -106,7 +106,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hGroupMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
}
@@ -291,23 +291,23 @@ void GroupMenus_Init(void) tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSGroup/ExecService";
tmp.name = LPGEN("GroupMenu");
- hGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle = hGroupMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSGroup/FreeOwnerDataGroupMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSGroup/GroupMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
@@ -321,7 +321,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT);
mi.pszName = LPGEN("E&xit");
mi.flags = CMIF_ICONFROMICOLIB;
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -331,7 +331,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.pszName = LPGEN("&Hide/Show");
mi.flags = CMIF_ICONFROMICOLIB;
- hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -341,7 +341,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
@@ -352,7 +352,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszName = LPGEN("&Main Menu");
mi.flags = CMIF_ICONFROMICOLIB; // eternity #004
- hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon); // eternity #004
memset(&mi,0,sizeof(mi));
@@ -362,7 +362,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004
mi.pszName = LPGEN("&Status");
mi.flags = CMIF_ICONFROMICOLIB; // eternity #004
- hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon); // eternity #004
memset(&mi,0,sizeof(mi));
@@ -372,7 +372,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -382,7 +382,7 @@ void GroupMenus_Init(void) mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -391,7 +391,7 @@ void GroupMenus_Init(void) mi.hIcon = ske_ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
mi.pszName = LPGEN("&New Group");
- hNewGroupMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hNewGroupMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
DestroyIcon_protect(mi.hIcon);
memset(&mi,0,sizeof(mi));
@@ -409,7 +409,7 @@ void GroupMenus_Init(void) mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
mi.pszName = LPGEN("Hide &Offline Users out here");
- hHideOfflineUsersOutHereMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideOfflineUsersOutHereMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -418,7 +418,7 @@ void GroupMenus_Init(void) mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
mi.pszName = LPGEN("Hide &Empty Groups");
- hHideEmptyGroupsMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideEmptyGroupsMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
@@ -428,7 +428,7 @@ void GroupMenus_Init(void) mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
mi.pszName = LPGEN("Disable &Groups");
- hDisableGroupsMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hDisableGroupsMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
HookEvent(ME_SKIN2_ICONSCHANGED,OnIconLibIconChanged);
@@ -551,7 +551,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hSubGroupMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
}
@@ -672,27 +672,27 @@ void InitSubGroupMenus(void) tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSSubGroup/ExecService";
tmp.name = LPGEN("SubGroupMenu");
- hSubGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hSubGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_CHECK_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuCheckService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
//add exit command to menu
CLISTMENUITEM mi;
diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index f3179c982c..2fb5444032 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -294,7 +294,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti) else
{
- tvpi.lParam = (LPARAM)NULL;
+ tvpi.lParam = 0;
rowOptTmplRoot = (pROWCELL)tvpi.lParam;
}
diff --git a/plugins/Clist_modern/src/modern_skineditor.cpp b/plugins/Clist_modern/src/modern_skineditor.cpp index b567fd59b9..0b1f0fe7f9 100644 --- a/plugins/Clist_modern/src/modern_skineditor.cpp +++ b/plugins/Clist_modern/src/modern_skineditor.cpp @@ -100,7 +100,7 @@ int TreeAddObject(HWND hwndDlg, int ID, OPT_OBJECT_DATA * data) tvis.hInsertAfter = TVI_SORT;
tvis.item.mask = TVIF_PARAM|TVIF_TEXT|TVIF_PARAM;
tvis.item.pszText = ptr;
- tvis.item.lParam = (LPARAM)NULL;
+ tvis.item.lParam = 0;
cItem = TreeView_InsertItemA(GetDlgItem(hwndDlg,ID),&tvis);
}
@@ -256,8 +256,8 @@ void SetControls(HWND hwndDlg, char * str) g = atoi(GetParamN(str,buf,SIZEOF(buf),3,',',TRUE));
b = atoi(GetParamN(str,buf,SIZEOF(buf),4,',',TRUE));
a = atoi(GetParamN(str,buf,SIZEOF(buf),5,',',TRUE));
- SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETCOLOUR,(WPARAM)0,(LPARAM)RGB(r,g,b));
- SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETDEFAULTCOLOUR,(WPARAM)0,(LPARAM)RGB(r,g,b));
+ SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETCOLOUR,0,(LPARAM)RGB(r,g,b));
+ SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_SETDEFAULTCOLOUR,0,(LPARAM)RGB(r,g,b));
SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_SETPOS,0,MAKELONG(a,0));
}
break;
@@ -369,7 +369,7 @@ int GetShortFileName(char * FullFile) char * MadeString(HWND hwndDlg)
{
char buf[MAX_PATH*2] = {0};
- int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,(WPARAM)0,0);
+ int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,0,0);
switch (i)
{
case 0:
@@ -380,7 +380,7 @@ char * MadeString(HWND hwndDlg) BYTE a;
DWORD col;
a = (BYTE)SendDlgItemMessage(hwndDlg,IDC_SPIN_ALPHA,UDM_GETPOS,0,0);
- col = (DWORD)SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_GETCOLOUR,(WPARAM)0,0);
+ col = (DWORD)SendDlgItemMessage(hwndDlg,IDC_COLOR,CPM_GETCOLOUR,0,0);
mir_snprintf(buf,SIZEOF(buf),"Glyph,Solid,%d,%d,%d,%d",GetRValue(col),GetGValue(col),GetBValue(col),a);
}
break;
@@ -591,7 +591,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
if (HIWORD(wParam) == CBN_SELCHANGE)
{
- int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,(WPARAM)0,0);
+ int i = SendDlgItemMessage(hwndDlg,IDC_TYPE,CB_GETCURSEL,0,0);
//if (IsWindowEnabled(GetDlgItem(hwndDlg,IDC_TYPE)))
SetAppropriateGroups(hwndDlg,i);
if (GetFocus() == GetDlgItem(hwndDlg,IDC_TYPE))
@@ -671,7 +671,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM res = GetOpenFileNameA(&ofn);
if (res) {
GetShortFileName(ofn.lpstrFile);
- SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT,(WPARAM)0,(LPARAM)ofn.lpstrFile);
+ SendDlgItemMessageA(hwndDlg,IDC_FILE,WM_SETTEXT,0,(LPARAM)ofn.lpstrFile);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
UpdateInfo(hwndDlg);
}
@@ -785,7 +785,7 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM pcli->pfnClcBroadcast( INTM_RELOADOPTIONS,0,0);
Sync(CLUIFrames_OnClistResize_mod,0,0);
ske_RedrawCompleteWindow();
- Sync(CLUIFrames_OnClistResize_mod, (WPARAM)0, 0);
+ Sync(CLUIFrames_OnClistResize_mod, 0, 0);
{
HWND hwnd = pcli->hwndContactList;
RECT rc = {0};
diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 29900cd471..505e27fd3f 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -543,13 +543,13 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) HICON hLockOverlay = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
if (hLockOverlay != NULL) {
mod_DrawIconEx_helper(hDC, x, iconY, hLockOverlay, GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0,NULL,DI_NORMAL | dim);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hLockOverlay, 0);
+ Skin_ReleaseIcon(hLockOverlay);
}
}
}
if (hxIcon) DestroyIcon_protect(hxIcon);
if (NeedDestroy) DestroyIcon_protect(hIcon);
- else CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ else Skin_ReleaseIcon(hIcon);
x += GetSystemMetrics(SM_CXSMICON)+1;
}
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 521a3a7eda..8d795092b8 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -719,7 +719,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
hIcon = LoadSkinnedProtoIcon(NULL, i);
ImageList_AddIcon(himlViewModes, hIcon);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_SMALLDOT), IMAGE_ICON, 16, 16, 0);
@@ -730,10 +730,10 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP tci.mask = TCIF_PARAM|TCIF_TEXT;
tci.lParam = 0;
tci.pszText = TranslateT("Sticky contacts");
- SendMessage(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEM, (WPARAM)0, (LPARAM)&tci);
+ SendMessage(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEM, 0, (LPARAM)&tci);
tci.pszText = TranslateT("Filtering");
- SendMessage(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEM, (WPARAM)0, (LPARAM)&tci);
+ SendMessage(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEM, 0, (LPARAM)&tci);
TabCtrl_SetCurSel(GetDlgItem(hwndDlg, IDC_TAB), 0);
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp index b8d21480e0..9e32704f03 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp @@ -1025,19 +1025,19 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam) if (flag&F_NOBORDER) {style &= (~WS_BORDER);}
SetWindowLongPtr(Frames[pos].hWnd,GWL_STYLE,(LONG)style);
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
case FO_NAME:
- if (lParam == (LPARAM)NULL) {ulockfrm(); return -1;}
+ if (lParam == 0) {ulockfrm(); return -1;}
mir_free(Frames[pos].name);
Frames[pos].name = mir_tstrdup((LPTSTR)lParam);
ulockfrm();
return 0;
case FO_TBNAME:
- if (lParam == (LPARAM)NULL) {ulockfrm(); return(-1);}
+ if (lParam == 0) {ulockfrm(); return(-1);}
mir_free(Frames[pos].TitleBar.tbname);
Frames[pos].TitleBar.tbname = mir_tstrdup((LPTSTR)lParam);
ulockfrm();
@@ -1045,7 +1045,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam) return 0;
case FO_TBTIPNAME:
- if (lParam == (LPARAM)NULL) {ulockfrm(); return(-1);}
+ if (lParam == 0) {ulockfrm(); return(-1);}
mir_free(Frames[pos].TitleBar.tooltip);
Frames[pos].TitleBar.tooltip = mir_tstrdup((LPTSTR)lParam);
UpdateTBToolTip(pos);
@@ -1106,7 +1106,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam,LPARAM lParam) return 0;
}
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return -1;
}
@@ -1115,7 +1115,7 @@ static INT_PTR CLUIFramesShowAll(WPARAM wParam,LPARAM lParam) {
for (int i = 0;i<nFramescount;i++)
Frames[i].visible = TRUE;
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1124,7 +1124,7 @@ INT_PTR CLUIFramesShowAllTitleBars(WPARAM wParam,LPARAM lParam) {
for (int i = 0;i<nFramescount;i++)
Frames[i].TitleBar.ShowTitleBar = TRUE;
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1133,7 +1133,7 @@ INT_PTR CLUIFramesHideAllTitleBars(WPARAM wParam,LPARAM lParam) {
for (int i = 0;i<nFramescount;i++)
Frames[i].TitleBar.ShowTitleBar = FALSE;
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1149,7 +1149,7 @@ INT_PTR CLUIFramesShowHideFrame(WPARAM wParam,LPARAM lParam) ulockfrm();
if (!Frames[pos].floating)
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1163,7 +1163,7 @@ INT_PTR CLUIFramesShowHideFrameTitleBar(WPARAM wParam,LPARAM lParam) ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
return 0;
}
@@ -1614,7 +1614,7 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam,LPARAM lParam) ti.hinst = g_hInst;
ti.uFlags = TTF_IDISHWND|TTF_SUBCLASS ;
ti.uId = (UINT_PTR)Frames[nFramescount].TitleBar.hwnd;
- SendMessage(Frames[nFramescount].TitleBar.hwndTip,TTM_ADDTOOL,(WPARAM)0,(LPARAM)&ti);
+ SendMessage(Frames[nFramescount].TitleBar.hwndTip,TTM_ADDTOOL,0,(LPARAM)&ti);
SendMessage(Frames[nFramescount].TitleBar.hwndTip,TTM_ACTIVATE,(WPARAM)Frames[nFramescount].TitleBar.ShowTitleBarTip,0);
@@ -1916,7 +1916,7 @@ int CLUIFramesResize(const RECT newsize) INT_PTR CLUIFramesUpdateFrame(WPARAM wParam,LPARAM lParam)
{
if (FramesSysNotStarted) return -1;
- if (wParam == -1) { CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0); return 0;}
+ if (wParam == -1) { CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0); return 0;}
if (lParam&FU_FMPOS) CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,1);
lockfrm();
wParam = id2pos(wParam);
@@ -2246,7 +2246,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA CLUIFrameSetFloat(Frameid,0);
break;
}
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
}
break;
@@ -2361,7 +2361,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA Frames[pos].FloatingSize.x,Frames[pos].FloatingSize.y,
Frames[pos].order);
- oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS,MAKEWPARAM(FO_FLAGS,Frames[pos].id),(LPARAM)0);
+ oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS,MAKEWPARAM(FO_FLAGS,Frames[pos].id),0);
if ( !(oldflags & F_SHOWTBTIP))
oldflags |= F_SHOWTBTIP;
}
@@ -2664,7 +2664,7 @@ LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
memset(&minmax,0,sizeof(minmax));
- if (SendMessage(Frames[framepos].hWnd,WM_GETMINMAXINFO,(WPARAM)0,(LPARAM)&minmax) == 0) {
+ if (SendMessage(Frames[framepos].hWnd,WM_GETMINMAXINFO,0,(LPARAM)&minmax) == 0) {
RECT border;
int tbh = TitleBarH*btoint(Frames[framepos].TitleBar.ShowTitleBar);
GetBorderSize(hwnd,&border);
diff --git a/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp b/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp index 49cc833397..d84b30a9fa 100644 --- a/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp @@ -193,7 +193,7 @@ void ReloadExtraIcons() HICON hicon;
SendMessage(pcli->hwndContactTree,CLM_SETEXTRACOLUMNSSPACE,DBGetContactSettingByte(NULL,"CLUI","ExtraColumnSpace",18),0);
- SendMessage(pcli->hwndContactTree,CLM_SETEXTRAIMAGELIST,0,(LPARAM)NULL);
+ SendMessage(pcli->hwndContactTree,CLM_SETEXTRAIMAGELIST,0,0);
if (hExtraImageList){ImageList_Destroy(hExtraImageList);};
hExtraImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,1,256);
diff --git a/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp index 7ce6bdd2a1..d3c0480cd1 100644 --- a/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/framesmenu.cpp @@ -212,7 +212,7 @@ int InitFramesMenus(void) op.Handle = hFrameMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"FrameMenuFreeService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
}
}
return 0;
diff --git a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp index 319f4f8f63..ba6c8e4304 100644 --- a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp @@ -265,7 +265,7 @@ void DrawBackGround(HWND hwnd,HDC mhdc) for (nPanel = 0;nPanel<nParts;nPanel++)
{
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD == NULL){
continue;
}
@@ -408,7 +408,7 @@ LRESULT CALLBACK StatusHelperProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa for (i = 0;i<nParts;i++) {
SendMessage(pcli->hwndStatus,SB_GETRECT,i,(LPARAM)&rc);
if (PtInRect(&rc,pt)) {
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,i,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,i,0);
if (PD == NULL){return 0;}
NotifyEventHooks(hStatusBarShowToolTipEvent,(WPARAM)PD->RealName,0);
@@ -553,7 +553,7 @@ HANDLE CreateStatusBarFrame() Frame.tname = _T("Status");
Frame.TBtname = TranslateT("Status Bar");
- hFrameHelperStatusBar = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,(LPARAM)0);
+ hFrameHelperStatusBar = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0);
return hFrameHelperStatusBar;
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index 24c37b102e..718a238cb8 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -140,7 +140,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group _snprintf(AdvancedService,sizeof(AdvancedService),"%s%s",cacheEntry->szProto,"/GetAdvancedStatusIcon");
if (ServiceExists(AdvancedService))
- img = CallService(AdvancedService,(WPARAM)hContact, (LPARAM)0);
+ img = CallService(AdvancedService,(WPARAM)hContact, 0);
if (img == -1 || !(LOWORD(img)))
img = CallService(MS_CLIST_GETCONTACTICON,(WPARAM)hContact,0);
diff --git a/plugins/Clist_mw/src/clistmenus.cpp b/plugins/Clist_mw/src/clistmenus.cpp index db84dca927..423e58bb26 100644 --- a/plugins/Clist_mw/src/clistmenus.cpp +++ b/plugins/Clist_mw/src/clistmenus.cpp @@ -40,7 +40,7 @@ void DestroyTrayMenu(HMENU hMenu) 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/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index ff096bb96c..35653a6553 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -64,7 +64,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) _snprintf(AdvancedService,sizeof(AdvancedService),"%s%s",szActProto,"/GetAdvancedStatusIcon");
if (ServiceExists(AdvancedService))
- result = CallService(AdvancedService,(WPARAM)hActContact, (LPARAM)0);
+ result = CallService(AdvancedService,(WPARAM)hActContact, 0);
if (result == -1 || !(LOWORD(result)))
// result == -1 means no Advanced icon. LOWORD(result) == 0 happens when Advanced icon returned by ICQ (i.e. no transpot)
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index 2d9e657fb6..91c8cc155c 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -140,7 +140,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP DBGetContactSettingString(NULL,"CList","PrimaryStatus",&dbv);
ProtoEnumAccounts( &count, &accs );
item = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_ADDSTRING,0,(LPARAM)TranslateT("Global"));
- SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,(LPARAM)0);
+ SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETITEMDATA,item,0);
for ( i = 0; i < count; i++ ) {
if ( !IsAccountEnabled( accs[i] ) || CallProtoService( accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0 ) == 0 )
continue;
diff --git a/plugins/Clist_mw/src/clisttray.cpp b/plugins/Clist_mw/src/clisttray.cpp index d0e6e3ae93..10fadb3c92 100644 --- a/plugins/Clist_mw/src/clisttray.cpp +++ b/plugins/Clist_mw/src/clisttray.cpp @@ -43,7 +43,7 @@ INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam) if (msg->lParam == WM_RBUTTONUP)
{
POINT pt;
- HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,(WPARAM)0,(LPARAM)0);
+ HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDTRAY,0,0);
SetForegroundWindow(msg->hwnd);
SetFocus(msg->hwnd);
@@ -123,7 +123,7 @@ static INT_PTR AddTrayMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hTrayMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)mi->pszService;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
}
@@ -197,7 +197,7 @@ void InitTrayMenus(void) tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSTRAY/ExecService";
tmp.name = "TrayMenu";
- hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
CreateServiceFunction("CLISTMENUSTRAY/ExecService",TrayMenuExecService);
CreateServiceFunction("CLISTMENUSTRAY/FreeOwnerDataTrayMenu",FreeOwnerDataTrayMenu);
@@ -211,17 +211,17 @@ void InitTrayMenus(void) op.Handle = hTrayMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hTrayMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSTRAY/FreeOwnerDataTrayMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hTrayMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSTRAY/TrayMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
@@ -232,14 +232,14 @@ void InitTrayMenus(void) mi.position = 900000;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 100000;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.pszName = LPGEN("&Hide/Show");
- hHideShowMainMenuItem = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideShowMainMenuItem = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -247,21 +247,21 @@ void InitTrayMenus(void) mi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FINDUSER));
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 300000;
mi.pszService = "";
mi.pszName = LPGEN("&Main Menu");
- hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayMainMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 300100;
mi.pszService = "";
mi.pszName = LPGEN("&Status");
- hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ hTrayStatusMenuItemProxy = (HANDLE)AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -269,7 +269,7 @@ void InitTrayMenus(void) mi.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_OPTIONS));
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -277,5 +277,5 @@ void InitTrayMenus(void) mi.hIcon = LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_CLIENTMIRANDA));
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
- AddTrayMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddTrayMenuItem(0,(LPARAM)&mi);
} }
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp index 77f55e5789..89a1d9dfd5 100644 --- a/plugins/Clist_mw/src/clui.cpp +++ b/plugins/Clist_mw/src/clui.cpp @@ -1,21 +1,21 @@ /*
Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright 2000-2003 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
+
+ Copyright 2000-2003 Miranda ICQ/IM project,
+ all portions of this codebase are copyrighted to the people
listed in contributors.txt.
-
+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -52,7 +52,7 @@ int n; int TimerCreated;
} ProtoTicks,*pProtoTicks;
-ProtoTicks CycleStartTick[64];//max 64 protocols
+ProtoTicks CycleStartTick[64];//max 64 protocols
int CycleTimeInterval = 2000;
int CycleIconCount = 8;
@@ -103,8 +103,8 @@ static int CluiModulesLoaded(WPARAM wParam,LPARAM lParam) CluiProtocolStatusChanged(0,0);
Sleep(0);
PostMessage(pcli->hwndContactList,M_CREATECLC,0,0);
-
- OnModulesLoadedCalled = TRUE;
+
+ OnModulesLoadedCalled = TRUE;
pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_HANDLE_VALUE);
InitGroupMenus();
RegisterProtoIconsForAllProtoIconLib();
@@ -145,7 +145,7 @@ int GetConnectingIconForProtoCount(char *szProto) str = strrchr(szPath,'\\');
if (str != NULL) *str = 0;
_snprintf(szFullPath, SIZEOF(szFullPath), "%s\\Icons\\proto_conn_%s.dll", szPath, szProto);
-
+
lstrcpynA(file,szFullPath,SIZEOF(file));
CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
ret = ExtractIconExA(fileFull,-1,NULL,NULL,1);
@@ -169,7 +169,7 @@ static HICON ExtractIconFromPath(const char *path) if (comma == NULL) n = 0;
else {n = atoi(comma+1); *comma = 0;}
CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
-
+
#ifdef _DEBUG
{
// char buf[512];
@@ -201,7 +201,7 @@ HICON LoadIconFromExternalFile(char *filename,int i,boolean UseLibrary,boolean r _snprintf(szFullPath, SIZEOF(szFullPath), "%s\\Icons\\%s,%d", szPath, filename, i);
}
- if (!UseLibrary) {
+ if (!UseLibrary) {
hIcon = ExtractIconFromPath(szFullPath);
if (hIcon) return hIcon;
}
@@ -218,12 +218,8 @@ HICON LoadIconFromExternalFile(char *filename,int i,boolean UseLibrary,boolean r sid.hDefaultIcon = DefIcon;
Skin_AddIcon(&sid);
-
- char buf[256];
- sprintf(buf,"Registring Icon %s/%s hDefaultIcon: %p\r\n",SectName,IconName,DefIcon);
- OutputDebugStringA(buf);
}
- return ((HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IconName));
+ return Skin_GetIcon(IconName);
}
return (HICON)0;
@@ -231,7 +227,7 @@ HICON LoadIconFromExternalFile(char *filename,int i,boolean UseLibrary,boolean r void RegisterProtoIcons (char *protoname)
{
- if (ServiceExists(MS_SKIN2_GETICON)&&DBGetContactSettingByte(NULL,"CList","UseProtoIconFromIcoLib",1))
+ if ( DBGetContactSettingByte(NULL,"CList","UseProtoIconFromIcoLib",1))
{
int i;
char buf[256];
@@ -240,7 +236,7 @@ void RegisterProtoIcons (char *protoname) {
sprintf(buf,"%s #%d",protoname,i);
sprintf(buf2,"Contact List/Connection Icons %s",protoname);
-
+
LoadIconFromExternalFile(NULL,i,TRUE,TRUE,buf,buf2,buf,0,GetConnectingIconForProto_DLL(protoname,i));
}
}
@@ -250,11 +246,11 @@ void RegisterProtoIconsForAllProtoIconLib() {
int protoCount,i;
PROTOACCOUNT **accs;
-
+
ProtoEnumAccounts( &protoCount, &accs );
for ( i = 0; i < protoCount; i++ )
if ( IsAccountEnabled( accs[i] ) && CallProtoService( accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0 ))
- RegisterProtoIcons( accs[i]->szModuleName );
+ RegisterProtoIcons( accs[i]->szModuleName );
}
HICON GetConnectingIconForProto_DLL(char *szProto,int b)
@@ -294,7 +290,7 @@ HICON GetConnectingIconForProto_DLL(char *szProto,int b) HICON GetConnectingIconForProto(char *szProto,int b)
{
- if (ServiceExists(MS_SKIN2_GETICON)&&DBGetContactSettingByte(NULL,"CList","UseProtoIconFromIcoLib",1)) {
+ if ( DBGetContactSettingByte(NULL,"CList","UseProtoIconFromIcoLib",1)) {
HICON hIcon = 0;
char buf[256];
sprintf(buf,"%s #%d",szProto,b);
@@ -303,14 +299,14 @@ HICON GetConnectingIconForProto(char *szProto,int b) if (hIcon == NULL) return (GetConnectingIconForProto_DLL(szProto,b));
return (CopyIcon(hIcon));
}
-
+
return GetConnectingIconForProto_DLL(szProto, b);
}
//wParam == szProto
INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam)
{
- int b;
+ int b;
ProtoTicks *pt = NULL;
HICON hIcon = NULL;
@@ -320,7 +316,7 @@ INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam) pt = GetProtoTicksByProto(szProto);
if (pt != NULL) {
- if (pt->CycleStartTick != 0&&pt->IconsCount != 0) {
+ if (pt->CycleStartTick != 0&&pt->IconsCount != 0) {
b = ((GetTickCount()-pt->CycleStartTick)/(DefaultStep))%pt->IconsCount;
hIcon = GetConnectingIconForProto(szProto,b);
}
@@ -332,20 +328,20 @@ INT_PTR GetConnectingIconService(WPARAM wParam,LPARAM lParam) int CreateTimerForConnectingIcon(WPARAM wParam,LPARAM lParam)
{
int status = (int)wParam;
- char *szProto = (char *)lParam;
+ char *szProto = (char *)lParam;
if (!szProto) return 0;
if (!status) return 0;
-
+
if (( DBGetContactSettingByte(NULL,"CLUI","UseConnectingIcon",1) == 1) && status >= ID_STATUS_CONNECTING && status <= ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES) {
ProtoTicks *pt = NULL;
int cnt;
pt = GetProtoTicksByProto(szProto);
if (pt != NULL) {
- if (pt->CycleStartTick == 0) {
+ if (pt->CycleStartTick == 0) {
KillTimer(pcli->hwndContactList,TM_STATUSBARUPDATE+pt->n);
cnt = GetConnectingIconForProtoCount(szProto);
- if (ServiceExists(MS_SKIN2_GETICON)&&DBGetContactSettingByte(NULL,"Clist","UseProtoIconFromIcoLib",1))
+ if ( DBGetContactSettingByte(NULL,"Clist","UseProtoIconFromIcoLib",1))
cnt = 8;
if (cnt != 0) {
@@ -369,13 +365,13 @@ int OnSettingChanging(WPARAM wParam,LPARAM lParam) DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING *)lParam;
if (wParam == 0) {
if ((dbcws->value.type == DBVT_BYTE)&&!strcmp(dbcws->szModule,"CLUI")) {
- if (!strcmp(dbcws->szSetting,"SBarShow")) {
- showOpts = dbcws->value.bVal;
+ if (!strcmp(dbcws->szSetting,"SBarShow")) {
+ showOpts = dbcws->value.bVal;
return 0;
}
}
}
- else {
+ else {
if (dbcws == NULL)
return 0;
@@ -384,25 +380,25 @@ int OnSettingChanging(WPARAM wParam,LPARAM lParam) SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
- if (dbcws->value.type == DBVT_ASCIIZ&&!strcmp(dbcws->szSetting,"Cellular")) {
+ if (dbcws->value.type == DBVT_ASCIIZ&&!strcmp(dbcws->szSetting,"Cellular")) {
SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
if (dbcws->value.type == DBVT_ASCIIZ&&strstr(dbcws->szModule,"ICQ")) {
- if ( !strcmp(dbcws->szSetting, "MirVer")) {
+ if ( !strcmp(dbcws->szSetting, "MirVer")) {
SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
}
-
+
if (dbcws->value.type == DBVT_ASCIIZ&&!strcmp(dbcws->szModule,"UserInfo")) {
- if ( !strcmp(dbcws->szSetting, "MyPhone0")) {
+ if ( !strcmp(dbcws->szSetting, "MyPhone0")) {
SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
- if (!strcmp(dbcws->szSetting, "Mye-mail0")) {
- SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
+ if (!strcmp(dbcws->szSetting, "Mye-mail0")) {
+ SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return 0;
}
}
@@ -430,7 +426,7 @@ HWND PreCreateCLC(HWND parent) int CreateCLC(HWND parent)
{
Sleep(0);
- {
+ {
// create contact list frame
CLISTFrame Frame;
memset(&Frame,0,sizeof(Frame));
@@ -442,11 +438,11 @@ int CreateCLC(HWND parent) Frame.Flags = F_VISIBLE|F_SHOWTB|F_SHOWTBTIP|F_TCHAR;
Frame.tname = _T("My Contacts");
Frame.TBtname = TranslateT("My Contacts");
- hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,(LPARAM)0);
+ hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&Frame,0);
//free(Frame.name);
- CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_TBTIPNAME,hFrameContactTree),(LPARAM)TranslateT("My Contacts"));
+ CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,MAKEWPARAM(FO_TBTIPNAME,hFrameContactTree),(LPARAM)TranslateT("My Contacts"));
}
-
+
ReloadExtraIcons();
{
lastreqh = 0;
@@ -458,10 +454,10 @@ int CreateCLC(HWND parent) if (state == SETTING_STATE_NORMAL) ShowWindow(pcli->hwndContactList, SW_SHOW);
else if (state == SETTING_STATE_MINIMIZED) ShowWindow(pcli->hwndContactList, SW_SHOWMINIMIZED);
}
-
+
lastreqh = 0;
disableautoupd = 0;
-
+
}
hSettingChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED,OnSettingChanging);
return 0;
@@ -472,7 +468,7 @@ int GetStatsuBarProtoRect(HWND hwnd,char *szProto,RECT *rc) int nParts,nPanel;
ProtocolData *PD;
int startoffset = DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
-
+
if (!UseOwnerDrawStatusBar) startoffset = 0;
nParts = SendMessage(hwnd,SB_GETPARTS,0,0);
@@ -480,10 +476,10 @@ int GetStatsuBarProtoRect(HWND hwnd,char *szProto,RECT *rc) for (nPanel = 0;nPanel<nParts;nPanel++)
{
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if ( PD == NULL )
return 0;
-
+
if (!strcmp(szProto,PD->RealName))
{
SendMessage(hwnd,SB_GETRECT,(WPARAM)nPanel,(LPARAM)rc);
@@ -498,15 +494,15 @@ int GetStatsuBarProtoRect(HWND hwnd,char *szProto,RECT *rc) extern LRESULT ( CALLBACK *saveContactListWndProc )(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
+{
/*
This registers a window message with RegisterWindowMessage() and then waits for such a message,
if it gets it, it tries to open a file mapping object and then maps it to this process space,
it expects 256 bytes of data (incl. NULL) it will then write back the profile it is using the DB to fill in the answer.
-
- The caller is expected to create this mapping object and tell us the ID we need to open ours.
+
+ The caller is expected to create this mapping object and tell us the ID we need to open ours.
*/
-
+
if (msg == hMsgGetProfile && wParam != 0) { /* got IPC message */
HANDLE hMap;
char szName[MAX_PATH];
@@ -533,14 +529,14 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l case WM_CREATE:
TranslateMenu(GetMenu(hwnd));
DrawMenuBar(hwnd);
- showOpts = DBGetContactSettingByte(NULL,"CLUI","SBarShow",1);
+ showOpts = DBGetContactSettingByte(NULL,"CLUI","SBarShow",1);
//create the status wnd
- //pcli->hwndStatus == CreateStatusWindow(WS_CHILD | (DBGetContactSettingByte(NULL,"CLUI","ShowSBar",1)?WS_VISIBLE:0), "", hwnd, 0);
+ //pcli->hwndStatus == CreateStatusWindow(WS_CHILD | (DBGetContactSettingByte(NULL,"CLUI","ShowSBar",1)?WS_VISIBLE:0), "", hwnd, 0);
CluiProtocolStatusChanged(0,0);
-
+
hMsgGetProfile = RegisterWindowMessageA( "Miranda::GetProfile" ); // don't localise
-
+
if ( DBGetContactSettingByte( NULL, "CList", "Transparent", 0 )) {
SetWindowLongPtr(hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
if ( MySetLayeredWindowAttributes )
@@ -561,16 +557,16 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l RECT rc;
if ( wParam != SIZE_MINIMIZED ) {
if ( pcli->hwndContactList != NULL )
- CLUIFramesOnClistResize((WPARAM)hwnd,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)hwnd,0);
- GetWindowRect(hwnd, &rc);
+ GetWindowRect(hwnd, &rc);
if (!CallService(MS_CLIST_DOCKINGISDOCKED,0,0)) {
//if docked, dont remember pos (except for width)
DBWriteContactSettingDword(NULL,"CList","Height",(DWORD)(rc.bottom - rc.top));
DBWriteContactSettingDword(NULL,"CList","x",(DWORD)rc.left);
DBWriteContactSettingDword(NULL,"CList","y",(DWORD)rc.top);
}
- DBWriteContactSettingDword(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
+ DBWriteContactSettingDword(NULL,"CList","Width",(DWORD)(rc.right - rc.left));
}
if ( wParam == SIZE_MINIMIZED ) {
if ( DBGetContactSettingByte(NULL,"CList","Min2Tray",SETTING_MIN2TRAY_DEFAULT )) {
@@ -581,11 +577,11 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l }
return 0;
}
-
+
case WM_SETFOCUS:
- {
+ {
boolean isfloating;
- if ( hFrameContactTree ) {
+ if ( hFrameContactTree ) {
isfloating = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS,MAKEWPARAM(FO_FLOATING,hFrameContactTree),0);
if ( isfloating == FALSE)
SetFocus(pcli->hwndContactTree);
@@ -602,7 +598,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l if (pt->szProto != NULL&&pt->TimerCreated == 1) {
status = CallProtoService(pt->szProto,PS_GETSTATUS,0,0);
if (!(status>=ID_STATUS_CONNECTING&&status<=ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES))
- {
+ {
pt->CycleStartTick = 0;
KillTimer(hwnd,TM_STATUSBARUPDATE+pt->n);
pt->TimerCreated = 0;
@@ -640,13 +636,13 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l if (wParam == VK_F5)
SendMessage(pcli->hwndContactTree,CLM_AUTOREBUILD,0,0);
return TRUE;
-
+
case WM_GETMINMAXINFO:
DefWindowProc(hwnd,msg,wParam,lParam);
((LPMINMAXINFO)lParam)->ptMinTrackSize.x = 18;
if (requr == 0){((LPMINMAXINFO)lParam)->ptMinTrackSize.y = CLUIFramesGetMinHeight();}
return 0;
-
+
//MSG FROM CHILD CONTROL
case WM_NOTIFY:
if (((LPNMHDR)lParam)->hwndFrom == pcli->hwndContactTree) {
@@ -689,9 +685,9 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l rcWindow.bottom = rcWindow.top+newHeight;
if (rcWindow.bottom>rcWorkArea.bottom) rcWindow.bottom = rcWorkArea.bottom;
}
-
+
if (requr == 0) {
- requr = 1;
+ requr = 1;
SetWindowPos(hwnd,0,rcWindow.left,rcWindow.top,rcWindow.right-rcWindow.left,rcWindow.bottom-rcWindow.top,SWP_NOZORDER|SWP_NOACTIVATE);
GetWindowRect(hwnd,&rcWindow);
requr = 0;
@@ -699,16 +695,16 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l return TRUE;
}
case NM_CLICK:
- {
+ {
NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam;
DWORD hitFlags;
HANDLE hItem = (HANDLE)SendMessage(pcli->hwndContactTree,CLM_HITTEST,(WPARAM)&hitFlags,MAKELPARAM(nm->pt.x,nm->pt.y));
- if (hitFlags&CLCHT_ONITEMEXTRA) {
+ if (hitFlags&CLCHT_ONITEMEXTRA) {
if (!IsHContactGroup(hItem)&&!IsHContactInfo(hItem))
{
int extra;
- pClcCacheEntry pdnce;
+ pClcCacheEntry pdnce;
pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry(nm->hItem);
if (pdnce == NULL) return 0;
@@ -733,8 +729,8 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l if (email) {
sprintf(buf,"mailto:%s",email);
ShellExecuteA(hwnd,"open",buf,NULL,NULL,SW_SHOW);
- }
- }
+ }
+ }
if (nm->iColumn == w) {
char *homepage;
homepage = DBGetStringA(pdnce->hContact,pdnce->szProto, "Homepage");
@@ -767,19 +763,19 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l int startoffset = DBGetContactSettingDword(NULL,"StatusBar","FirstIconOffset",0);
int extraspace = DBGetContactSettingDword(NULL,"StatusBar","BkExtraSpace",0);
boolean UseOwnerDrawStatusBar = DBGetContactSettingByte(NULL,"CLUI","UseOwnerDrawStatusBar",0);
-
+
hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
nParts = SendMessage(pcli->hwndStatus,SB_GETPARTS,0,0);
-
+
if (nm->dwItemSpec == 0xFFFFFFFE) {
nPanel = nParts-1;
SendMessage(pcli->hwndStatus,SB_GETRECT,nPanel,(LPARAM)&rc);
if (nm->pt.x < rc.left) return FALSE;
- }
- else {
+ }
+ else {
if (!((startoffset) != 0&&UseOwnerDrawStatusBar))
- {
- nPanel = nm->dwItemSpec;
+ {
+ nPanel = nm->dwItemSpec;
SendMessage(pcli->hwndStatus,SB_GETRECT,nPanel,(LPARAM)&rc);
}
else {
@@ -793,7 +789,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l sectwidth = clrc.right/nParts;
for (nPanel = 0;nPanel<nParts;nPanel++) {
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD == NULL)
continue;
@@ -807,10 +803,10 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l } } }
totcount = DBGetContactSettingDword(0,"Protocols","ProtoCount",0);
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD == NULL){return 0;}
menuid = nPanel;
-
+
if (menuid<0){break;}
hMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
{
@@ -819,9 +815,9 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l int mcnt = GetMenuItemCount(hMenu);
for (i = 0; i<mcnt; ++i) {
HMENU hMenus = GetSubMenu(hMenu, i);
- if (hMenus && cpnl++ == menuid) {
- hMenu = hMenus;
- break;
+ if (hMenus && cpnl++ == menuid) {
+ hMenu = hMenus;
+ break;
}
}
}
@@ -831,7 +827,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l OutputDebugStringA(buf);
}
- if (hMenu != NULL) {
+ if (hMenu != NULL) {
GetCursorPos(&pt);
TrackPopupMenu(hMenu,TPM_BOTTOMALIGN|TPM_LEFTALIGN,pt.x,pt.y,0,hwnd,NULL);
} }
@@ -843,19 +839,19 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l {
//saving state
int state = DBGetContactSettingByte(NULL,"CList","State",SETTING_STATE_NORMAL);
-
+
FreeProtocolData();
if ( hSettingChangedHook != 0 )
UnhookEvent(hSettingChangedHook);
-
+
if ( state == SETTING_STATE_NORMAL )
ShowWindow(hwnd,SW_HIDE);
- CallService(MS_CLIST_FRAMES_REMOVEFRAME,(WPARAM)hFrameContactTree,(LPARAM)0);
+ CallService(MS_CLIST_FRAMES_REMOVEFRAME,(WPARAM)hFrameContactTree,0);
DestroyWindow(pcli->hwndContactTree);
pcli->hwndContactList = NULL;
- UnLoadCLUIFramesModule();
+ UnLoadCLUIFramesModule();
DBWriteContactSettingByte(NULL,"CList","State",(BYTE)state);
PostQuitMessage(0);
}
@@ -900,7 +896,7 @@ int LoadCLUIModule(void) PreCreateCLC(pcli->hwndContactList);
// create status bar frame
- CreateStatusBarhWnd(pcli->hwndContactList);
+ CreateStatusBarhWnd(pcli->hwndContactList);
{ //int state = DBGetContactSettingByte(NULL,"CList","State",SETTING_STATE_NORMAL);
hMenuMain = GetMenu(pcli->hwndContactList);
diff --git a/plugins/Clist_mw/src/cluiservices.cpp b/plugins/Clist_mw/src/cluiservices.cpp index f75fbc9dac..38e19ee46d 100644 --- a/plugins/Clist_mw/src/cluiservices.cpp +++ b/plugins/Clist_mw/src/cluiservices.cpp @@ -34,9 +34,9 @@ void FreeProtocolData( void ) for (nPanel = 0;nPanel<nParts;nPanel++)
{
ProtocolData *PD;
- PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD = (ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD != NULL && !IsBadCodePtr(( FARPROC )PD)) {
- SendMessage(pcli->hwndStatus,SB_SETTEXT,(WPARAM)nPanel|SBT_OWNERDRAW,(LPARAM)0);
+ SendMessage(pcli->hwndStatus,SB_SETTEXT,(WPARAM)nPanel|SBT_OWNERDRAW,0);
if (PD->RealName) mir_free(PD->RealName);
if (PD) mir_free(PD);
} } }
diff --git a/plugins/Clist_mw/src/groupmenu.cpp b/plugins/Clist_mw/src/groupmenu.cpp index a92a2b4113..7053207a65 100644 --- a/plugins/Clist_mw/src/groupmenu.cpp +++ b/plugins/Clist_mw/src/groupmenu.cpp @@ -113,7 +113,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hGroupMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
// mainItemCount++;
@@ -280,23 +280,23 @@ void InitGroupMenus(void) tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSGroup/ExecService";
tmp.name = "Group Menu";
- hGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle = hGroupMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSGroup/FreeOwnerDataGroupMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSGroup/GroupMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
@@ -308,14 +308,14 @@ void InitGroupMenus(void) mi.position = 1900000;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.pszName = LPGEN("&Hide/Show");
- hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideShowMainMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -323,7 +323,7 @@ void InitGroupMenus(void) mi.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FINDUSER));
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/Add Contacts...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
@@ -332,14 +332,14 @@ void InitGroupMenus(void) mi.position = 300000;
mi.pszService = "";
mi.pszName = LPGEN("&Main Menu");
- hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupMainMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 300100;
mi.pszService = "";
mi.pszName = LPGEN("&Status");
- hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupStatusMenuItemProxy = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -348,7 +348,7 @@ void InitGroupMenus(void) mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -358,7 +358,7 @@ void InitGroupMenus(void) mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
- //AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ //AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -366,7 +366,7 @@ void InitGroupMenus(void) mi.hIcon = ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = MS_CLIST_GROUPCREATE;
mi.pszName = LPGEN("&New Group");
- hNewGroupMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hNewGroupMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
@@ -383,7 +383,7 @@ void InitGroupMenus(void) mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
mi.pszName = LPGEN("Hide &Offline Users out here");
- hHideOfflineUsersOutHereMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideOfflineUsersOutHereMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -392,7 +392,7 @@ void InitGroupMenus(void) mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
mi.pszName = LPGEN("Hide &Empty Groups");
- hHideEmptyGroupsMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideEmptyGroupsMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
@@ -402,7 +402,7 @@ void InitGroupMenus(void) mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
mi.pszName = LPGEN("Disable &Groups");
- hDisableGroupsMenuItem = (HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hDisableGroupsMenuItem = (HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
HookEvent(ME_SKIN2_ICONSCHANGED,OnIconLibIconChanged);
@@ -505,7 +505,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam) op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hSubGroupMenuObject,(LPARAM)&tmi);
op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
}
@@ -582,23 +582,23 @@ void InitSubGroupMenus(void) tmp.CheckService = NULL;
tmp.ExecService = "CLISTMENUSSubGroup/ExecService";
tmp.name = "SubGroupMenu";
- hSubGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hSubGroupMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_USERDEFINEDITEMS;
op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle = hSubGroupMenuObject;
op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value = (INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index d29a6272e9..dd1a660c5c 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -1095,13 +1095,13 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) SetWindowLongPtr(Frames[pos].TitleBar.hwnd, GWL_STYLE, (LONG)style & ~(WS_VSCROLL | WS_HSCROLL));
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
SetWindowPos(Frames[pos].TitleBar.hwnd, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
return 0;
}
case FO_NAME:
- if (lParam == (LPARAM)NULL) {
+ if (lParam == 0) {
ulockfrm();
return -1;
}
@@ -1111,7 +1111,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) return 0;
case FO_TBNAME:
- if (lParam == (LPARAM)NULL) {
+ if (lParam == 0) {
ulockfrm();
return(-1);
}
@@ -1123,7 +1123,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) return 0;
case FO_TBTIPNAME:
- if (lParam == (LPARAM)NULL) {
+ if (lParam == 0) {
ulockfrm();
return(-1);
}
@@ -1167,7 +1167,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) retval = Frames[pos].height;
if (Frames[pos].height != oldHeight) {
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,(LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList,0);
if (Frames[pos].Skinned)
RedrawWindow(Frames[pos].hWnd, 0, 0, RDW_FRAME|RDW_UPDATENOW|RDW_INVALIDATE);
}
@@ -1211,7 +1211,7 @@ INT_PTR CLUIFramesSetFrameOptions(WPARAM wParam, LPARAM lParam) return(0);
}
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
return -1;
}
@@ -1223,7 +1223,7 @@ static INT_PTR CLUIFramesShowAll(WPARAM wParam, LPARAM lParam) for (i = 0;i < nFramescount;i++)
Frames[i].visible = TRUE;
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
return 0;
}
@@ -1237,7 +1237,7 @@ INT_PTR CLUIFramesShowAllTitleBars(WPARAM wParam, LPARAM lParam) Frames[i].TitleBar.ShowTitleBar = TRUE;
SetWindowPos(Frames[i].hWnd, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
RedrawWindow(pcli->hwndContactList, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_UPDATENOW | RDW_ALLCHILDREN);
return 0;
}
@@ -1253,7 +1253,7 @@ INT_PTR CLUIFramesHideAllTitleBars(WPARAM wParam, LPARAM lParam) Frames[i].TitleBar.ShowTitleBar = FALSE;
SetWindowPos(Frames[i].hWnd, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
RedrawWindow(pcli->hwndContactList, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_UPDATENOW | RDW_ALLCHILDREN);
return 0;
}
@@ -1278,7 +1278,7 @@ INT_PTR CLUIFramesShowHideFrame(WPARAM wParam, LPARAM lParam) }
ulockfrm();
if (!Frames[pos].floating)
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
RedrawWindow(pcli->hwndContactList, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_UPDATENOW | RDW_ALLCHILDREN);
return 0;
}
@@ -1298,7 +1298,7 @@ INT_PTR CLUIFramesShowHideFrameTitleBar(WPARAM wParam, LPARAM lParam) SetWindowPos(Frames[pos].hWnd, 0, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
}
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
RedrawWindow(pcli->hwndContactList, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_UPDATENOW | RDW_ALLCHILDREN);
return 0;
}
@@ -1704,7 +1704,7 @@ static int UpdateTBToolTip(int framepos) ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS ;
ti.uId = (UINT_PTR)Frames[framepos].TitleBar.hwnd;
- return(SendMessage(Frames[framepos].TitleBar.hwndTip, TTM_UPDATETIPTEXT, (WPARAM)0, (LPARAM)&ti));
+ return(SendMessage(Frames[framepos].TitleBar.hwndTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti));
}
};
@@ -1971,7 +1971,7 @@ INT_PTR CLUIFramesAddFrame(WPARAM wParam, LPARAM lParam) ti.hinst = g_hInst;
ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS ;
ti.uId = (UINT_PTR)Frames[nFramescount].TitleBar.hwnd;
- res = SendMessageA(Frames[nFramescount].TitleBar.hwndTip, TTM_ADDTOOL, (WPARAM)0, (LPARAM) & ti);
+ res = SendMessageA(Frames[nFramescount].TitleBar.hwndTip, TTM_ADDTOOL, 0, (LPARAM) & ti);
}
SendMessage(Frames[nFramescount].TitleBar.hwndTip, TTM_ACTIVATE, (WPARAM)Frames[nFramescount].TitleBar.ShowTitleBarTip, 0);
@@ -2312,7 +2312,7 @@ INT_PTR CLUIFramesUpdateFrame(WPARAM wParam, LPARAM lParam) if (FramesSysNotStarted)
return -1;
if (wParam == -1) {
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
return 0;
}
if (lParam&FU_FMPOS)
@@ -2701,7 +2701,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA CLUIFrameSetFloat(Frameid, 0);
break;
}
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
}
break;
@@ -2831,7 +2831,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA Frames[pos].order
);
- oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, Frames[pos].id), (LPARAM)0);
+ oldflags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, Frames[pos].id), 0);
if (!(oldflags&F_SHOWTBTIP))
oldflags |= F_SHOWTBTIP;
}
@@ -3030,7 +3030,7 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA }
ulockfrm();
if (newh > 0) {
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
}
break;
}
@@ -3177,7 +3177,7 @@ LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
memset(&minmax, 0, sizeof(minmax));
- if (SendMessage(Frames[framepos].hWnd, WM_GETMINMAXINFO, (WPARAM)0, (LPARAM)&minmax) == 0) {
+ if (SendMessage(Frames[framepos].hWnd, WM_GETMINMAXINFO, 0, (LPARAM)&minmax) == 0) {
RECT border;
int tbh = TitleBarH * btoint(Frames[framepos].TitleBar.ShowTitleBar);
GetBorderSize(hwnd, &border);
@@ -3342,7 +3342,7 @@ INT_PTR CLUIFrameSetFloat(WPARAM wParam, LPARAM lParam) hwndtmp = Frames[wParam].ContainerWnd;
ulockfrm();
- CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, (LPARAM)0);
+ CLUIFramesOnClistResize((WPARAM)pcli->hwndContactList, 0);
SendMessage(hwndtmp, WM_SIZE, 0, 0);
SetWindowPos(hwndtooltiptmp, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
return 0;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp index 07b6ebc4e6..ac722ca5a6 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp @@ -216,7 +216,7 @@ int InitFramesMenus(void) op.Handle=hFrameMenuObject;
op.Setting=OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value=(INT_PTR)"FrameMenuFreeService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
}
}
return 0;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index 99d93d30fd..7c5251f823 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -113,7 +113,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam) op.Handle=(HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hGroupMenuObject,(LPARAM)&tmi);
op.Setting=OPT_MENUITEMSETUNIQNAME;
op.Value=(INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
}
@@ -311,23 +311,23 @@ void InitGroupMenus(void) tmp.CheckService=NULL;
tmp.ExecService="CLISTMENUSGroup/ExecService";
tmp.name="GroupMenu";
- hGroupMenuObject=(HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hGroupMenuObject=(HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle=hGroupMenuObject;
op.Setting=OPT_USERDEFINEDITEMS;
op.Value=TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle=hGroupMenuObject;
op.Setting=OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value=(INT_PTR)"CLISTMENUSGroup/FreeOwnerDataGroupMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle=hGroupMenuObject;
op.Setting=OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value=(INT_PTR)"CLISTMENUSGroup/GroupMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
@@ -339,14 +339,14 @@ void InitGroupMenus(void) mi.position=1900000;
mi.pszService="CloseAction";
mi.pszName=LPGEN("E&xit");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
mi.position=500;
mi.pszService=MS_CLIST_SHOWHIDE;
mi.pszName=LPGEN("&Hide/Show");
- hHideShowMainMenuItem=(HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideShowMainMenuItem=(HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
@@ -355,28 +355,28 @@ void InitGroupMenus(void) mi.icolibItem=LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER); //LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FINDUSER));
mi.pszService="FindAdd/FindAddCommand";
mi.pszName=LPGEN("&Find/Add Contacts...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
mi.position=300000;
mi.pszService="";
mi.pszName=LPGEN("&Main Menu");
- hGroupMainMenuItemProxy=(HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupMainMenuItemProxy=(HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
mi.position=300100;
mi.pszService="";
mi.pszName=LPGEN("&Status");
- hGroupStatusMenuItemProxy=(HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hGroupStatusMenuItemProxy=(HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
mi.position=390100;
mi.pszService="";
mi.pszName=LPGEN("Appearance");
- hAppearanceMenuItemProxy=(HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hAppearanceMenuItemProxy=(HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
@@ -386,7 +386,7 @@ void InitGroupMenus(void) mi.pszService="Options/OptionsCommand";
mi.pszName=LPGEN("&Options...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -397,7 +397,7 @@ void InitGroupMenus(void) mi.pszService="CLN/About";
mi.pszName=LPGEN("&About the contact list...");
- AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
mi.cbSize=sizeof(mi);
@@ -425,7 +425,7 @@ void InitGroupMenus(void) mi.hIcon=NULL;
mi.pszService="CLISTMENUSGroup/HideOfflineRootHelper";
mi.pszName=LPGEN("Hide &Offline Users out here");
- hHideOfflineUsersOutHereMenuItem=(HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideOfflineUsersOutHereMenuItem=(HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -434,7 +434,7 @@ void InitGroupMenus(void) mi.hIcon=NULL;
mi.pszService="CLISTMENUSGroup/HideGroupsHelper";
mi.pszName=LPGEN("Hide &Empty Groups");
- hHideEmptyGroupsMenuItem=(HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hHideEmptyGroupsMenuItem=(HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
@@ -444,7 +444,7 @@ void InitGroupMenus(void) mi.hIcon=NULL;
mi.pszService="CLISTMENUSGroup/UseGroupsHelper";
mi.pszName=LPGEN("Disable &Groups");
- hDisableGroupsMenuItem=(HANDLE)AddGroupMenuItem((WPARAM)0,(LPARAM)&mi);
+ hDisableGroupsMenuItem=(HANDLE)AddGroupMenuItem(0,(LPARAM)&mi);
//MS_CLIST_GROUPCREATE
@@ -534,7 +534,7 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam) op.Handle=(HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hSubGroupMenuObject,(LPARAM)&tmi);
op.Setting=OPT_MENUITEMSETUNIQNAME;
op.Value=(INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
}
@@ -638,23 +638,23 @@ void InitSubGroupMenus(void) tmp.CheckService=NULL;
tmp.ExecService="CLISTMENUSSubGroup/ExecService";
tmp.name="SubGroupMenu";
- hSubGroupMenuObject=(HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hSubGroupMenuObject=(HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
op.Handle=hSubGroupMenuObject;
op.Setting=OPT_USERDEFINEDITEMS;
op.Value=TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle=hSubGroupMenuObject;
op.Setting=OPT_MENUOBJECT_SET_FREE_SERVICE;
op.Value=(INT_PTR)"CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
op.Handle=hSubGroupMenuObject;
op.Setting=OPT_MENUOBJECT_SET_ONADD_SERVICE;
op.Value=(INT_PTR)"CLISTMENUSSubGroup/SubGroupMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,(WPARAM)0,(LPARAM)&op);
+ CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
{
//add exit command to menu
diff --git a/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp b/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp index 499c98ca1a..becee0c91c 100644 --- a/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp +++ b/plugins/Clist_nicer/src/Coolsb/coolscroll.cpp @@ -2515,7 +2515,7 @@ static LRESULT MouseMove(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam) //remember what size the USER set the button to
sbut->nSizeReserved = sbut->nSize;
- NCPaint(sw, hwnd, (WPARAM)1, (LPARAM)0);
+ NCPaint(sw, hwnd, (WPARAM)1, 0);
return 0;
}
}
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 5c70df5d48..190ffffba7 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -691,7 +691,7 @@ LBL_Def: if (column == 0) {
ci.dwFlag = CNF_EMAIL;
- if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)) {
char buf[4096];
mir_snprintf(buf, sizeof(buf), "mailto:%s", (LPCSTR)ci.pszVal);
mir_free(ci.pszVal);
@@ -701,7 +701,7 @@ LBL_Def: }
if (column == 1) {
ci.dwFlag = CNF_HOMEPAGE;
- if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)) {
ShellExecuteA(hwnd, "open", (LPCSTR)ci.pszVal, NULL, NULL, SW_SHOW);
mir_free(ci.pszVal);
}
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 8086fe7ebd..ebf7229ab9 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -490,25 +490,25 @@ void GetExtendedInfo(struct ClcContact *contact, struct ClcData *dat) ci.szProto = contact->proto;
ci.dwFlag = CNF_EMAIL;
- if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)) {
cfg::eCache[index].iExtraImage[EXTRA_ICON_EMAIL] = 0;
mir_free(ci.pszVal);
}
ci.dwFlag = CNF_HOMEPAGE;
- if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)) {
cfg::eCache[index].iExtraImage[EXTRA_ICON_WEB] = 1;
mir_free(ci.pszVal);
}
ci.dwFlag = CNF_CELLULAR;
- if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)) {
cfg::eCache[index].iExtraImage[EXTRA_ICON_SMS] = 2;
mir_free(ci.pszVal);
}
else {
ci.dwFlag = CNF_PHONE;
- if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)) {
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)) {
cfg::eCache[index].iExtraImage[EXTRA_ICON_SMS] = 2;
mir_free(ci.pszVal);
}
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index cc2f9c1bac..b4abce1084 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -48,7 +48,7 @@ INT_PTR CloseAction(WPARAM wParam,LPARAM lParam) {
int k;
cfg::shutDown = 1;
- k=CallService(MS_SYSTEM_OKTOEXIT,(WPARAM)0,(LPARAM)0);
+ k=CallService(MS_SYSTEM_OKTOEXIT,0,0);
if (k) {
DestroyWindow(pcli->hwndContactList);
PostQuitMessage(0);
@@ -218,7 +218,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, (LPARAM)0xffffffff);
return 0;
case IDC_IGN_NONE:
- SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, (LPARAM)0);
+ SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, 0);
return 0;
case IDC_IGN_ALWAYSONLINE:
if (IsDlgButtonChecked(hWnd, IDC_IGN_ALWAYSONLINE))
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index d07f079815..305d4aece1 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -75,7 +75,7 @@ int IconFromStatusMode(const char *szProto, int status, HANDLE hContact, HICON * if (szProto) {
char szBuf[128];
mir_snprintf(szBuf, 128, "%s_conn", szProto);
- *phIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szBuf);
+ *phIcon = Skin_GetIcon(szBuf);
}
}
return saveIconFromStatusMode(szFinalProto, finalStatus, hContact);
@@ -263,7 +263,7 @@ int ShowHide(WPARAM wParam, LPARAM lParam) GetWindowRect(pcli->hwndContactList, &rcWindow);
if (Utils_AssertInsideScreen(&rcWindow) == 1)
{
- MoveWindow(pcli->hwndContactList, rcWindow.left, rcWindow.top,
+ MoveWindow(pcli->hwndContactList, rcWindow.left, rcWindow.top,
rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, TRUE);
}
}
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index fb03c74075..1a238e5f9d 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -217,7 +217,7 @@ static int CreateCLC(HWND parent) frame.align = alBottom;
frame.hWnd = CreateWindowExA(0, "EventAreaClass", "evt", WS_VISIBLE | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, pcli->hwndContactList, (HMENU) 0, g_hInst, NULL);
g_hwndEventArea = frame.hWnd;
- hNotifyFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM) & frame, (LPARAM)0);
+ hNotifyFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM) & frame, 0);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)hNotifyFrame, FU_FMPOS);
HideShowNotifyFrame();
CreateViewModeFrame();
@@ -236,7 +236,7 @@ static int CreateCLC(HWND parent) Frame.tname = _T("My Contacts");
Frame.TBtname = TranslateT("My Contacts");
Frame.height = 200;
- hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM) & Frame, (LPARAM)0);
+ hFrameContactTree = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM) & Frame, 0);
//free(Frame.name);
CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME, hFrameContactTree), (LPARAM)Translate("My Contacts"));
@@ -292,17 +292,17 @@ static void CacheClientIcons() for (i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) {
mir_snprintf(szBuffer, sizeof(szBuffer), "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE));
- overlayicons[i - IDI_OVL_OFFLINE] = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) szBuffer);
+ overlayicons[i - IDI_OVL_OFFLINE] = Skin_GetIcon(szBuffer);
}
- ImageList_AddIcon(himlExtraImages, (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM) "core_main_14"));
+ ImageList_AddIcon(himlExtraImages, Skin_GetIcon("core_main_14"));
ImageList_AddIcon(himlExtraImages, (HICON)LoadSkinnedIcon(SKINICON_EVENT_URL));
- ImageList_AddIcon(himlExtraImages, (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM) "core_main_17"));
+ ImageList_AddIcon(himlExtraImages, Skin_GetIcon("core_main_17"));
if (hIconSaved != 0) {
ImageList_AddIcon(himlExtraImages, hIconSaved);
DestroyIcon(hIconSaved);
hIconSaved = 0;
} else
- ImageList_AddIcon(himlExtraImages, (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM) "core_main_17"));
+ ImageList_AddIcon(himlExtraImages, Skin_GetIcon("core_main_17"));
}
static void InitIcoLib()
@@ -324,7 +324,7 @@ static void InitIcoLib() sid.iDefaultIndex = myIcons[i].uId;
Skin_AddIcon(&sid);
}
-
+
sid.pszName = "CLN_visible";
sid.pszDescription = LPGEN("Contact on visible list");
sid.iDefaultIndex = -IDI_CLVISIBLE;
@@ -397,9 +397,9 @@ void CLN_LoadAllIcons(BOOL mode) if (mode) {
InitIcoLib();
hIcoLibChanged = HookEvent(ME_SKIN2_ICONSCHANGED, IcoLibChanged);
- cfg::dat.hIconVisible = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) "CLN_visible");
- cfg::dat.hIconInvisible = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) "CLN_invisible");
- cfg::dat.hIconChatactive = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) "CLN_chatactive");
+ cfg::dat.hIconVisible = Skin_GetIcon("CLN_visible");
+ cfg::dat.hIconInvisible = Skin_GetIcon("CLN_invisible");
+ cfg::dat.hIconChatactive = Skin_GetIcon("CLN_chatactive");
}
CacheClientIcons();
}
@@ -433,9 +433,9 @@ void ConfigureFrame() void IcoLibReloadIcons()
{
- cfg::dat.hIconVisible = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) "CLN_visible");
- cfg::dat.hIconInvisible = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) "CLN_invisible");
- cfg::dat.hIconChatactive = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) "CLN_chatactive");
+ cfg::dat.hIconVisible = Skin_GetIcon("CLN_visible");
+ cfg::dat.hIconInvisible = Skin_GetIcon("CLN_invisible");
+ cfg::dat.hIconChatactive = Skin_GetIcon("CLN_chatactive");
CacheClientIcons();
ReloadExtraIcons();
@@ -925,7 +925,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l //NotifyEventHooks(pcli->hPreBuildStatusMenuEvent, 0, 0);
SendMessage(hwnd, WM_SETREDRAW, FALSE, FALSE);
{
- LONG style;
+ LONG style;
BYTE windowStyle = cfg::getByte("CLUI", "WindowStyle", SETTING_WINDOWSTYLE_TOOLWINDOW);
ShowWindow(pcli->hwndContactList, SW_HIDE);
style = GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE);
@@ -1808,7 +1808,7 @@ buttons_done: if (status >= ID_STATUS_CONNECTING && status < ID_STATUS_OFFLINE) {
char szBuffer[128];
mir_snprintf(szBuffer, 128, "%s_conn", pd->RealName);
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szBuffer);
+ hIcon = Skin_GetIcon(szBuffer);
} else if (cfg::dat.bShowXStatusOnSbar && status > ID_STATUS_OFFLINE) {
ICQ_CUSTOM_STATUS cst = {0};
char szServiceName[128];
@@ -1832,14 +1832,14 @@ buttons_done: else if (pd->statusbarpos == nParts - 1)
x -= (cfg::dat.bCRight / 2);
DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - 16) >> 1, hIcon, 16, 16, 0, NULL, DI_NORMAL);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
if (cfg::getByte("CLUI", "sbar_showlocked", 1)) {
if (cfg::getByte(szProto, "LockMainStatus", 0)) {
hIcon = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
if (hIcon != NULL) {
DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - 16) >> 1, hIcon, 16, 16, 0, NULL, DI_NORMAL);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
}
}
@@ -1928,7 +1928,7 @@ buttons_done: */
if (!cfg::shutDown)
cfg::shutDown = 1;
- CallService(MS_CLIST_FRAMES_REMOVEFRAME, (WPARAM)hFrameContactTree, (LPARAM)0);
+ CallService(MS_CLIST_FRAMES_REMOVEFRAME, (WPARAM)hFrameContactTree, 0);
break;
}
return saveContactListWndProc(hwnd, msg, wParam, lParam);
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index 9572935020..093f950bbb 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -51,10 +51,10 @@ void FreeProtocolData( void ) for (nPanel=0;nPanel<nParts;nPanel++)
{
ProtocolData *PD;
- PD=(ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,(LPARAM)0);
+ PD=(ProtocolData *)SendMessage(pcli->hwndStatus,SB_GETTEXT,(WPARAM)nPanel,0);
if (PD!=NULL&&!IsBadCodePtr((FARPROC)PD))
{
- SendMessage(pcli->hwndStatus,SB_SETTEXT,(WPARAM)nPanel|SBT_OWNERDRAW,(LPARAM)0);
+ SendMessage(pcli->hwndStatus,SB_SETTEXT,(WPARAM)nPanel|SBT_OWNERDRAW,0);
if (PD->RealName) mir_free(PD->RealName);
if (PD) mir_free(PD);
} } }
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 17ee84f07a..2370350508 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -621,10 +621,10 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP tci.mask = TCIF_PARAM|TCIF_TEXT;
tci.lParam = 0;
tci.pszText = Translate("Sticky contacts");
- SendMessageA(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEMA, (WPARAM)0, (LPARAM)&tci);
+ SendMessageA(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEMA, 0, (LPARAM)&tci);
tci.pszText = Translate("Filtering");
- SendMessageA(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEMA, (WPARAM)0, (LPARAM)&tci);
+ SendMessageA(GetDlgItem(hwndDlg, IDC_TAB), TCM_INSERTITEMA, 0, (LPARAM)&tci);
TabCtrl_SetCurSel(GetDlgItem(hwndDlg, IDC_TAB), 0);
@@ -940,9 +940,9 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
}
case WM_USER + 100:
- SendMessage(GetDlgItem(hwnd, IDC_RESETMODES), BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"CLN_CLVM_reset"));
- SendMessage(GetDlgItem(hwnd, IDC_CONFIGUREMODES), BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"CLN_CLVM_options"));
- SendMessage(GetDlgItem(hwnd, IDC_SELECTMODE), BM_SETIMAGE, IMAGE_ICON, (LPARAM)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"CLN_CLVM_select"));
+ SendMessage(GetDlgItem(hwnd, IDC_RESETMODES), BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("CLN_CLVM_reset"));
+ SendMessage(GetDlgItem(hwnd, IDC_CONFIGUREMODES), BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("CLN_CLVM_options"));
+ SendMessage(GetDlgItem(hwnd, IDC_SELECTMODE), BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("CLN_CLVM_select"));
{
bool bSkinned = cfg::getByte("CLCExt", "bskinned", 0) != 0;
for (int i = 0; _buttons[i] != 0; i++ )
@@ -1097,7 +1097,7 @@ void CreateViewModeFrame() frame.align = alBottom;
frame.hWnd = CreateWindowEx(0, _T("CLVMFrameWindow"), _T("CLVM"), WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_CLIPCHILDREN, 0, 0, 20, 20, pcli->hwndContactList, (HMENU) 0, g_hInst, NULL);
g_hwndViewModeFrame = frame.hWnd;
- hCLVMFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&frame,(LPARAM)0);
+ hCLVMFrame = (HWND)CallService(MS_CLIST_FRAMES_ADDFRAME,(WPARAM)&frame,0);
CallService(MS_CLIST_FRAMES_UPDATEFRAME, (WPARAM)hCLVMFrame, FU_FMPOS);
}
@@ -1245,5 +1245,3 @@ void ApplyViewMode(const char *name) cfg::writeString(NULL, "CList", "LastViewMode", cfg::dat.current_viewmode);
}
-
-
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 9cf8c4c28a..7c633ef8d1 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -76,7 +76,7 @@ static void CALLBACK SetExtraImage(LPARAM lParam) HICON hIcon = LoadFlagIcon(countryNumber);
if (hIcon != NULL)
phExtraImages[index]=(HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON,(WPARAM)hIcon,0);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon,0); /* does NULL check */
+ Skin_ReleaseIcon(hIcon); /* does NULL check */
}
iec.hImage=phExtraImages[index];
}
@@ -170,7 +170,7 @@ static void FASTCALL SetStatusIcon(HANDLE hContact,int countryNumber) /* copy icon as status icon API will call DestroyIcon() on it */
hIcon = LoadFlagIcon(countryNumber);
sid.hIcon = (hIcon != NULL) ? CopyIcon(hIcon) : NULL;
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon,0); /* does NULL check */
+ Skin_ReleaseIcon(hIcon); /* does NULL check */
hIcon = sid.hIcon;
/* ensure status icon is registered */
sid.dwId = countryNumber;
diff --git a/plugins/CountryFlags/src/icons.cpp b/plugins/CountryFlags/src/icons.cpp index 74f7287f03..5fb6a54a6d 100644 --- a/plugins/CountryFlags/src/icons.cpp +++ b/plugins/CountryFlags/src/icons.cpp @@ -83,7 +83,7 @@ static int FASTCALL CountryNumberToBitmapIndex(int countryNumber) return i;
if (countryNumber >BitmapIndexMap[i])
- low=i+1;
+ low=i+1;
else
high=i-1;
}
@@ -152,7 +152,7 @@ HICON FASTCALL LoadFlagIcon(int countryNumber) char szId[20];
wsprintfA(szId, (countryNumber == 0xFFFF) ? "%s0x%X" : "%s%i", "flags_", countryNumber); /* buffer safe */
- return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szId);
+ return Skin_GetIcon(szId);
}
int FASTCALL CountryNumberToIndex(int countryNumber)
@@ -175,7 +175,7 @@ static INT_PTR ServiceLoadFlagIcon(WPARAM wParam,LPARAM lParam) if ((BOOL)lParam) {
if (phIconHandles == NULL)
return 0;
-
+
return (INT_PTR)phIconHandles[CountryNumberToIndex((int)wParam)];
}
/* return icon */
@@ -235,7 +235,7 @@ void InitIcons(void) /* register icons */
SKINICONDESC sid = { sizeof(sid) };
sid.pszName = szId;
- sid.cx = GetSystemMetrics(SM_CXSMICON);
+ sid.cx = GetSystemMetrics(SM_CXSMICON);
sid.cy = GetSystemMetrics(SM_CYSMICON);
sid.flags = SIDF_SORTED;
sid.pszSection = "Country Flags";
diff --git a/plugins/CrashDumper/src/crshdmp_icons.cpp b/plugins/CrashDumper/src/crshdmp_icons.cpp index 1f7106303f..766be7d8cc 100644 --- a/plugins/CrashDumper/src/crshdmp_icons.cpp +++ b/plugins/CrashDumper/src/crshdmp_icons.cpp @@ -49,21 +49,21 @@ void InitIcons(void) GetModuleFileNameA(hInst, szFile, MAX_PATH);
- for (unsigned i = 0; i < SIZEOF(iconList); i++)
+ for (unsigned i = 0; i < SIZEOF(iconList); i++)
{
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", PluginName, iconList[i].szName);
sid.pszDescription = (char*)iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
hIconLibItem[i] = Skin_AddIcon(&sid);
- }
+ }
}
HICON LoadIconEx(const char* name, bool big)
{
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", PluginName, name);
- return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName, big);
}
HANDLE GetIconHandle(const char* name)
@@ -79,10 +79,10 @@ void ReleaseIconEx(const char* name) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", PluginName, name);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ Skin_ReleaseIcon(szSettingName);
}
void ReleaseIconEx(HICON hIcon)
{
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index 7dad7a6934..4bc2b21f4c 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -131,7 +131,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara }
index = (int)SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_INSERTSTRING, 0, (LPARAM)(char*)Translate("Settings"));
- SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_SETITEMDATA, index, (LPARAM)0);
+ SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_SETITEMDATA, index, 0);
SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_SETCURSEL, index, 0);
SetWindowLongPtr(hwnd,GWLP_USERDATA,lParam);
diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp index c4a3fba820..e55845d7bb 100644 --- a/plugins/DbEditorPP/src/deletemodule.cpp +++ b/plugins/DbEditorPP/src/deletemodule.cpp @@ -142,7 +142,7 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM void deleteModuleGui()
{
if (!hwnd2Delete)
- hwnd2Delete = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_COPY_MOD), hwnd2mainWindow, DeleteModuleDlgProc, (LPARAM)0);
+ hwnd2Delete = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_COPY_MOD), hwnd2mainWindow, DeleteModuleDlgProc, 0);
else
SetForegroundWindow(hwnd2Delete);
}
\ No newline at end of file diff --git a/plugins/DbEditorPP/src/icons.cpp b/plugins/DbEditorPP/src/icons.cpp index 9ba200a923..d2902fce20 100644 --- a/plugins/DbEditorPP/src/icons.cpp +++ b/plugins/DbEditorPP/src/icons.cpp @@ -72,7 +72,7 @@ HICON LoadSkinnedDBEIcon(int icon) {
char name[32];
mir_snprintf(name, SIZEOF(name), "DBE++_%d", icon);
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON,0,(LPARAM)name);
+ HICON hIcon = Skin_GetIcon(name);
return (hIcon) ? hIcon : LoadIcon(hInst, MAKEINTRESOURCE(icon));
}
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index b7d2cf6b73..1e315451b8 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -227,7 +227,7 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) urd.cbSize=sizeof(urd);
urd.hInstance=hInst;
urd.hwndDlg=hwnd;
- urd.lParam=(LPARAM)0;
+ urd.lParam=0;
urd.lpTemplate=MAKEINTRESOURCE(IDD_WATCH_DIAG);
urd.pfnResizer=WatchDialogResize;
CallService(MS_UTILS_RESIZEDIALOG,0,(LPARAM)&urd);
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp index 3c38af7ed6..75d9f71614 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -47,7 +47,7 @@ INT_PTR BackupServiceTrgr(WPARAM wParam, LPARAM lParam) return 0;
}
-static int FoldersGetBackupPath(WPARAM wParam, LPARAM lParam)
+static int FoldersGetBackupPath(WPARAM wParam, LPARAM lParam)
{
FoldersGetCustomPathT(hFolder, options.folder, MAX_PATH, DIR SUB_DIR);
return 0;
@@ -85,7 +85,7 @@ static void MenuInit(void) CLISTMENUITEM mi = {0};
mi.cbSize = sizeof(mi);
mi.flags = CMIF_TCHAR;
- mi.hIcon=(HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"backup");
+ mi.hIcon = Skin_GetIcon("backup");
mi.ptszPopupName = LPGENT("Database");
mi.ptszName = LPGENT("Backup Profile");
@@ -93,7 +93,7 @@ static void MenuInit(void) mi.position = 500100000;
Menu_AddMainMenuItem(&mi);
- mi.hIcon=(HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"saveas");
+ mi.hIcon = Skin_GetIcon("saveas");
mi.ptszName = LPGENT("Save Profile As...");
mi.pszService = MS_AB_SAVEAS;
mi.position = 500100001;
@@ -115,7 +115,7 @@ static int ModulesLoad(WPARAM wParam, LPARAM lParam) profilePath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
IcoLibInit();
- if(ServiceExists(MS_FOLDERS_REGISTER_PATH))
+ if(ServiceExists(MS_FOLDERS_REGISTER_PATH))
FoldersInit();
LoadOptions();
MenuInit();
@@ -145,7 +145,7 @@ void SysInit() {
mir_getLP( &pluginInfo );
OleInitialize(0);
-
+
hServices[0] = CreateServiceFunction(MS_AB_BACKUP, ABService);
hServices[1] = CreateServiceFunction(MS_AB_BACKUPTRGR, BackupServiceTrgr);
hServices[2] = CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs);
@@ -180,12 +180,12 @@ extern "C" __declspec(dllexport) int Unload(void) for (i=0; i<SIZEOF(hHooks); ++i)
{
- if (hHooks[i])
+ if (hHooks[i])
UnhookEvent(hHooks[i]);
}
for (i=0; i<SIZEOF(hServices); ++i)
{
- if (hServices[i])
+ if (hServices[i])
DestroyServiceFunction(hServices[i]);
}
@@ -198,7 +198,7 @@ void ShowPopup(TCHAR* text, TCHAR* header) lstrcpy(ppd.lptzText, text);
lstrcpy(ppd.lptzContactName, header);
- ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"backup");
+ ppd.lchIcon = Skin_GetIcon("backup");
PUAddPopUpT(&ppd);
}
@@ -224,7 +224,7 @@ HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle) HWND hwndTT;
hwndTT = CreateWindowEx(WS_EX_TOPMOST,
TOOLTIPS_CLASS, NULL,
- WS_POPUP | TTS_NOPREFIX,
+ WS_POPUP | TTS_NOPREFIX,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
hwndParent, NULL, hInst, NULL);
diff --git a/plugins/Dbx_mmap_SA/src/dialogs.cpp b/plugins/Dbx_mmap_SA/src/dialogs.cpp index ce7c43167e..c54acaa597 100644 --- a/plugins/Dbx_mmap_SA/src/dialogs.cpp +++ b/plugins/Dbx_mmap_SA/src/dialogs.cpp @@ -127,7 +127,7 @@ int InitDialogs() int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, char* name)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON, (WPARAM)NULL, (LPARAM)name);
+ HICON hIcon = Skin_GetIcon(name);
int res = ImageList_AddIcon(hIml, hIcon);
return res;
}
diff --git a/plugins/Dbx_mmap_SA/src/security.cpp b/plugins/Dbx_mmap_SA/src/security.cpp index 172c1ff2f6..ca351d60bc 100644 --- a/plugins/Dbx_mmap_SA/src/security.cpp +++ b/plugins/Dbx_mmap_SA/src/security.cpp @@ -272,7 +272,7 @@ void CDdxMmapSA::EncryptDB() bEncProcess = 1;
- action = DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_NEWPASS), NULL, DlgStdNewPass, (LPARAM)NULL);
+ action = DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_NEWPASS), NULL, DlgStdNewPass, 0);
if (action != IDOK || !strlen(encryptKey)) {
bEncProcess = 0;
db_set_b(NULL, "SecureMMAP", "CryptoModule", 0);
diff --git a/plugins/ExternalAPI/m_HTTPServer.h b/plugins/ExternalAPI/m_HTTPServer.h index c8de071838..a8fa139bfb 100644 --- a/plugins/ExternalAPI/m_HTTPServer.h +++ b/plugins/ExternalAPI/m_HTTPServer.h @@ -44,7 +44,7 @@ typedef struct { /// Service MS_HTTP_ADD_CHANGE_REMOVE ///
/////////////////////////////////////////////
//
-// wParam = (WPARAM)0
+// wParam = 0
// lParam = (LPARAM)LPSTFileShareInfo;
// Server path is the key when working with FileShareInfo.
// Two files can not be shared with the same "Server path" in the HTTP server.
@@ -62,7 +62,7 @@ typedef struct { ////// Service MS_HTTP_GET_SHARE //////
/////////////////////////////////////////////
//
-// wParam = (WPARAM)0;
+// wParam = 0;
// lParam = (LPARAM)LPSTFileShareInfo;
// Returns the information for a share
// Server path must be set the the share you wish information for.
@@ -78,7 +78,7 @@ typedef struct { /////////////////////////////////////////////
//
// wParam = (WPARAM)boolean(true/false);
-// lParam = (LPARAM)0;
+// lParam = 0;
// Toggles the HTTP server state if wParam is FALSE
// Force enable HTTP server if wParam is TRUE
// returns 0 on success, nonzero on failure
@@ -89,7 +89,7 @@ typedef struct { //// Service MS_HTTP_GET_ALL_SHARES /////
/////////////////////////////////////////////
//
-// wParam = (WPARAM)0;
+// wParam = 0;
// lParam = (LPARAM)&LPSTFileShareInfo;
// Returns an array of all currently shared files in the HTTP Server
// LPSTFileShareInfo points to the first share.
diff --git a/plugins/ExternalAPI/m_account.h b/plugins/ExternalAPI/m_account.h index 35c841d54a..ec28f02438 100644 --- a/plugins/ExternalAPI/m_account.h +++ b/plugins/ExternalAPI/m_account.h @@ -222,8 +222,8 @@ typedef void (WINAPI *YAMN_GETSTATUSFCN)(HACCOUNT,TCHAR *); //
//then you have to fill this structure with pointers...
//
-// pYAMNFcn->SetStatusFcn=(YAMN_SETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETSTATUSID,(LPARAM)0);
-// pYAMNFcn->GetStatusFcn=(YAMN_GETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_GETSTATUSID,(LPARAM)0);
+// pYAMNFcn->SetStatusFcn=(YAMN_SETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETSTATUSID,0);
+// pYAMNFcn->GetStatusFcn=(YAMN_GETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_GETSTATUSID,0);
//
//and in your plugin just simply use e.g.:
//
diff --git a/plugins/ExternalAPI/m_autoreplacer.h b/plugins/ExternalAPI/m_autoreplacer.h index 57271a7163..a169edb10c 100644 --- a/plugins/ExternalAPI/m_autoreplacer.h +++ b/plugins/ExternalAPI/m_autoreplacer.h @@ -19,7 +19,7 @@ */
#define MS_AUTOREPLACER_ADDWINHANDLE "AutoReplacer/AddWinHandle"
static int __inline autoreplacer_AddWinHandle(HWND hwnd) {
- return (int)CallService(MS_AUTOREPLACER_ADDWINHANDLE, (WPARAM)0, (LPARAM)hwnd);
+ return (int)CallService(MS_AUTOREPLACER_ADDWINHANDLE, 0, (LPARAM)hwnd);
}
/*
@@ -33,7 +33,7 @@ static int __inline autoreplacer_AddWinHandle(HWND hwnd) { */
#define MS_AUTOREPLACER_REMWINHANDLE "AutoReplacer/RemWinHandle"
static int __inline autoreplacer_RemWinHandle(HWND hwnd) {
- return (int)CallService(MS_AUTOREPLACER_REMWINHANDLE, (WPARAM)0, (LPARAM)hwnd);
+ return (int)CallService(MS_AUTOREPLACER_REMWINHANDLE, 0, (LPARAM)hwnd);
}
#endif
\ No newline at end of file diff --git a/plugins/ExternalAPI/m_filterplugin.h b/plugins/ExternalAPI/m_filterplugin.h index 5c39ac9397..cd81c4254c 100644 --- a/plugins/ExternalAPI/m_filterplugin.h +++ b/plugins/ExternalAPI/m_filterplugin.h @@ -121,11 +121,11 @@ typedef int (WINAPI *YAMN_SETFILTERPLUGINFCNIMPORTFCN)(HYAMNFILTERPLUGIN Plugin, //
//then you have to fill this structure with pointers... If you use Miranda services, you will do it like this
//
-// pYAMNFcn->SetFilterPluginFcnImportFcn=(YAMN_SETFILTERPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETFILTERPLUGINFCNIMPORTID,(LPARAM)0);
+// pYAMNFcn->SetFilterPluginFcnImportFcn=(YAMN_SETFILTERPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETFILTERPLUGINFCNIMPORTID,0);
//
//If you do not use Miranda services, call service MS_YAMN_GETFCNPTR directly. The address to the MS_YAMN_GETFCNPTR is sent to you in LoadFilter function:
//
-// pYAMNFcn->SetFilterPluginFcnImportFcn=(YAMN_SETFILTERPLUGINFCNIMPORTFCN)YAMN_GetFcnPtr((WPARAM)YAMN_SETFILTERPLUGINFCNIMPORTID,(LPARAM)0);
+// pYAMNFcn->SetFilterPluginFcnImportFcn=(YAMN_SETFILTERPLUGINFCNIMPORTFCN)YAMN_GetFcnPtr((WPARAM)YAMN_SETFILTERPLUGINFCNIMPORTID,0);
//
//and in your plugin just simply use e.g.:
//
diff --git a/plugins/ExternalAPI/m_ftpfile.h b/plugins/ExternalAPI/m_ftpfile.h index 6575fd9e3b..b5e49a0766 100644 --- a/plugins/ExternalAPI/m_ftpfile.h +++ b/plugins/ExternalAPI/m_ftpfile.h @@ -60,7 +60,7 @@ typedef struct //
// Send file(s) or folder in selected mode to the FTP server
-// wParam = (WPARAM)0; not used
+// wParam = 0; not used
// lParam = (LPARAM)(FTPUPLOAD*)&ftpu; pointer to FTPUPLOAD
// returns 0 if upload started with no errors, nonzero otherwise
//
@@ -75,7 +75,7 @@ __inline static INT_PTR FTPFileUploadA(HANDLE hContact, BYTE ftpNum, BYTE mode, ftpu.mode = mode;
ftpu.pszObjects = pszObjects;
ftpu.objectCount = objCount;
- return CallService(MS_FTPFILE_UPLOAD, (WPARAM)0, (LPARAM)&ftpu);
+ return CallService(MS_FTPFILE_UPLOAD, 0, (LPARAM)&ftpu);
}
__inline static INT_PTR FTPFileUploadW(HANDLE hContact, BYTE ftpNum, BYTE mode, wchar_t **pswzObjects, int objCount)
@@ -88,7 +88,7 @@ __inline static INT_PTR FTPFileUploadW(HANDLE hContact, BYTE ftpNum, BYTE mode, ftpu.flags = FUPL_UNICODE;
ftpu.pswzObjects = pswzObjects;
ftpu.objectCount = objCount;
- return CallService(MS_FTPFILE_UPLOAD, (WPARAM)0, (LPARAM)&ftpu);
+ return CallService(MS_FTPFILE_UPLOAD, 0, (LPARAM)&ftpu);
}
#if defined _UNICODE || defined UNICODE
@@ -99,15 +99,15 @@ __inline static INT_PTR FTPFileUploadW(HANDLE hContact, BYTE ftpNum, BYTE mode, //
// Show a simple file manager
-// wParam = (WPARAM)0; not used
-// lParam = (LPARAM)0; not used
+// wParam = 0; not used
+// lParam = 0; not used
// returns 0 always
//
#define MS_FTPFILE_SHOWMANAGER "FTPFile/ShowManager"
__inline static INT_PTR FTPFileShowManager()
{
- return CallService(MS_FTPFILE_SHOWMANAGER, (WPARAM)0, (LPARAM)0);
+ return CallService(MS_FTPFILE_SHOWMANAGER, 0, 0);
}
//
diff --git a/plugins/ExternalAPI/m_mails.h b/plugins/ExternalAPI/m_mails.h index cb168e34e9..d597769b88 100644 --- a/plugins/ExternalAPI/m_mails.h +++ b/plugins/ExternalAPI/m_mails.h @@ -193,7 +193,7 @@ typedef struct CMimeMsgQueue //LPARAM- nothing yet
//returns nonzero if success
#define MS_YAMN_UNLOADMAILDATA "YAMN/Service/UnloadMailData"
-#define UnloadMailData(x) CallService(MS_YAMN_UNLOADMAILDATA,(WPARAM)x,(LPARAM)0)
+#define UnloadMailData(x) CallService(MS_YAMN_UNLOADMAILDATA,(WPARAM)x,0)
//SaveMailData Service
//This service saves mail to standard YAMN storage (when using now 1 book file, it does nothing, because save is done when
@@ -242,14 +242,14 @@ typedef void (WINAPI *YAMN_SETREMOVEQUEUEFLAGSFCN)(HYAMNMAIL,DWORD,DWORD,DWORD,i //you have to use YAMN service to get pointer, like this (I wrote here all functions you may need,
//you can copy to your sources only those you need):
//
-// pYAMNMailFcn->SynchroMessagesFcn=(YAMN_SYNCHROMIMEMSGSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SYNCHROMIMEMSGSID,(LPARAM)0);
-// pYAMNMailFcn->TranslateHeaderFcn=(YAMN_TRANSLATEHEADERFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_TRANSLATEHEADERID,(LPARAM)0);
-// pYAMNMailFcn->AppendQueueFcn=(YAMN_APPENDQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_APPENDQUEUEID,(LPARAM)0);
-// pYAMNMailFcn->DeleteMessagesToEndFcn=(YAMN_DELETEMIMEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_DELETEMIMEQUEUEID,(LPARAM)0);
-// pYAMNMailFcn->DeleteMessageFromQueueFcn=(YAMN_DELETEMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_DELETEMIMEMESSAGEID,(LPARAM)0);
-// pYAMNMailFcn->FindMessageByIDFcn=(YAMN_FINDMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_FINDMIMEMESSAGEID,(LPARAM)0);
-// pYAMNMailFcn->CreateNewDeleteQueueFcn=(YAMN_CREATENEWDELETEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_CREATENEWDELETEQUEUEID,(LPARAM)0);
-// pYAMNMailFcn->SetRemoveQueueFlagsFcn=(YAMN_SETREMOVEQUEUEFLAGSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETREMOVEQUEUEFLAGSID,(LPARAM)0);
+// pYAMNMailFcn->SynchroMessagesFcn=(YAMN_SYNCHROMIMEMSGSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SYNCHROMIMEMSGSID,0);
+// pYAMNMailFcn->TranslateHeaderFcn=(YAMN_TRANSLATEHEADERFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_TRANSLATEHEADERID,0);
+// pYAMNMailFcn->AppendQueueFcn=(YAMN_APPENDQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_APPENDQUEUEID,0);
+// pYAMNMailFcn->DeleteMessagesToEndFcn=(YAMN_DELETEMIMEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_DELETEMIMEQUEUEID,0);
+// pYAMNMailFcn->DeleteMessageFromQueueFcn=(YAMN_DELETEMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_DELETEMIMEMESSAGEID,0);
+// pYAMNMailFcn->FindMessageByIDFcn=(YAMN_FINDMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_FINDMIMEMESSAGEID,0);
+// pYAMNMailFcn->CreateNewDeleteQueueFcn=(YAMN_CREATENEWDELETEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_CREATENEWDELETEQUEUEID,0);
+// pYAMNMailFcn->SetRemoveQueueFlagsFcn=(YAMN_SETREMOVEQUEUEFLAGSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETREMOVEQUEUEFLAGSID,0);
//
//
//and in your plugin just simply use e.g.:
diff --git a/plugins/ExternalAPI/m_popup2.h b/plugins/ExternalAPI/m_popup2.h index 5ccf169a0e..d88607a155 100644 --- a/plugins/ExternalAPI/m_popup2.h +++ b/plugins/ExternalAPI/m_popup2.h @@ -352,7 +352,7 @@ typedef struct } POPUPNOTIFICATION, *LPPOPUPNOTIFICATION;
static HANDLE __inline PURegisterNotification(LPPOPUPNOTIFICATION notification) {
- return (HANDLE)CallService(MS_POPUP_REGISTERNOTIFICATION, (WPARAM)notification, (LPARAM)0);
+ return (HANDLE)CallService(MS_POPUP_REGISTERNOTIFICATION, (WPARAM)notification, 0);
}
/* PopUp/UnhookEventAsync
diff --git a/plugins/ExternalAPI/m_protoplugin.h b/plugins/ExternalAPI/m_protoplugin.h index 08e3e0efb9..77c9635625 100644 --- a/plugins/ExternalAPI/m_protoplugin.h +++ b/plugins/ExternalAPI/m_protoplugin.h @@ -354,7 +354,7 @@ typedef int (WINAPI *YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)(HYAMNPROTOPLUGIN Plugin //
//then you have to fill this structure with pointers...
//
-// pYAMNFcn->SetProtocolPluginFcnImportFcn=(YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETPROTOCOLPLUGINFCNIMPORTID,(LPARAM)0);
+// pYAMNFcn->SetProtocolPluginFcnImportFcn=(YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETPROTOCOLPLUGINFCNIMPORTID,0);
//
//and in your plugin just simply use e.g.:
//
diff --git a/plugins/ExternalAPI/m_synchro.h b/plugins/ExternalAPI/m_synchro.h index ff3e601ed9..429c791ca4 100644 --- a/plugins/ExternalAPI/m_synchro.h +++ b/plugins/ExternalAPI/m_synchro.h @@ -111,13 +111,13 @@ typedef DWORD (WINAPI *YAMN_SCMANAGEFCN)(PSCOUNTER); //you have to use YAMN service to get pointer, like this (I wrote here all functions you may need,
//you can copy to your sources only those you need):
//
-// pYAMNFcn->WaitToWriteFcn=(YAMN_WAITTOWRITEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOWRITEID,(LPARAM)0);
-// pYAMNFcn->WriteDoneFcn=(YAMN_WRITEDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WRITEDONEID,(LPARAM)0);
-// pYAMNFcn->WaitToReadFcn=(YAMN_WAITTOREADFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOREADID,(LPARAM)0);
-// pYAMNFcn->ReadDoneFcn=(YAMN_READDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_READDONEID,(LPARAM)0);
-// pYAMNFcn->SCGetNumberFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCGETNUMBERID,(LPARAM)0);
-// pYAMNFcn->SCIncFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCINCID,(LPARAM)0);
-// pYAMNFcn->SCDecFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCDECID,(LPARAM)0);
+// pYAMNFcn->WaitToWriteFcn=(YAMN_WAITTOWRITEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOWRITEID,0);
+// pYAMNFcn->WriteDoneFcn=(YAMN_WRITEDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WRITEDONEID,0);
+// pYAMNFcn->WaitToReadFcn=(YAMN_WAITTOREADFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOREADID,0);
+// pYAMNFcn->ReadDoneFcn=(YAMN_READDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_READDONEID,0);
+// pYAMNFcn->SCGetNumberFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCGETNUMBERID,0);
+// pYAMNFcn->SCIncFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCINCID,0);
+// pYAMNFcn->SCDecFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCDECID,0);
//
//and in your plugin just simply use e.g.:
//
diff --git a/plugins/ExternalAPI/m_text.h b/plugins/ExternalAPI/m_text.h index be1b3e4a0e..a87b7d36f0 100644 --- a/plugins/ExternalAPI/m_text.h +++ b/plugins/ExternalAPI/m_text.h @@ -263,7 +263,7 @@ __inline int MTextMeasure(HDC dc, SIZE *sz, HANDLE text) displayInfo.pos.x = displayInfo.pos.y = 0;
displayInfo.sz = *sz;
displayInfo.text = text;
- int result = (int)CallService(MS_TEXT_MEASURE, (WPARAM)&displayInfo, (LPARAM)0);
+ int result = (int)CallService(MS_TEXT_MEASURE, (WPARAM)&displayInfo, 0);
*sz = displayInfo.sz;
return result;
}
@@ -287,7 +287,7 @@ __inline int MTextDisplay(HDC dc, POINT pos, SIZE sz, HANDLE text) displayInfo.pos = pos;
displayInfo.sz = sz;
displayInfo.text = text;
- return (int)CallService(MS_TEXT_DISPLAY, (WPARAM)&displayInfo, (LPARAM)0);
+ return (int)CallService(MS_TEXT_DISPLAY, (WPARAM)&displayInfo, 0);
}
#endif // MTEXT_NOHELPERS
@@ -303,7 +303,7 @@ __inline int MTextSetParent(HANDLE text, HWND hwnd, RECT rect) info.text = text;
info.hwnd = hwnd;
info.rc = rect;
- return (int)CallService(MS_TEXT_SETPARENT, (WPARAM)&info, (LPARAM)0);
+ return (int)CallService(MS_TEXT_SETPARENT, (WPARAM)&info, 0);
}
#endif // MTEXT_NOHELPERS
@@ -325,7 +325,7 @@ __inline int MTextSendMessage(HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, L message.msg = msg;
message.wParam = wParam;
message.lParam = lParam;
- return (int)CallService(MS_TEXT_SENDMESSAGE, (WPARAM)&message, (LPARAM)0);
+ return (int)CallService(MS_TEXT_SENDMESSAGE, (WPARAM)&message, 0);
}
#endif // MTEXT_NOHELPERS
@@ -336,7 +336,7 @@ __inline int MTextSendMessage(HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, L #ifndef MTEXT_NOHELPERS
__inline HWND MTextCreateProxy(HANDLE text)
{
- return (HWND)CallService(MS_TEXT_CREATEPROXY, (WPARAM)text, (LPARAM)0);
+ return (HWND)CallService(MS_TEXT_CREATEPROXY, (WPARAM)text, 0);
}
#endif // MTEXT_NOHELPERS
@@ -347,7 +347,7 @@ __inline HWND MTextCreateProxy(HANDLE text) #ifndef MTEXT_NOHELPERS
__inline int MTextDestroy(HANDLE text)
{
- return (int)CallService(MS_TEXT_DESTROY, (WPARAM)text, (LPARAM)0);
+ return (int)CallService(MS_TEXT_DESTROY, (WPARAM)text, 0);
}
#endif // MTEXT_NOHELPERS
diff --git a/plugins/ExternalAPI/m_trigger.h b/plugins/ExternalAPI/m_trigger.h index e51294b83e..e2e60df103 100644 --- a/plugins/ExternalAPI/m_trigger.h +++ b/plugins/ExternalAPI/m_trigger.h @@ -28,7 +28,7 @@ // Parameters:
// ------------------------
-// wParam = (WPARAM)0
+// wParam = 0
// lParam = (LPARAM)(TRIGGERREGISTER *)&tr
// Pointer to a structure describing the trigger to add (see below).
@@ -219,7 +219,7 @@ typedef struct { // Parameters:
// ------------------------
-// wParam = (WPARAM)0
+// wParam = 0
// lParam = (LPARAM)(ACTIONREGISTER *)&ar
// Pointer to a structure describing the action to add (see below).
@@ -343,7 +343,7 @@ typedef struct { // Parameters:
// ------------------------
-// wParam = (WPARAM)0
+// wParam = 0
// lParam = (LPARAM)(CONDITIONREGISTER *)&cr
// Pointer to a structure describing the condition to add (see below).
@@ -503,7 +503,7 @@ typedef struct { // Parameters:
// ------------------------
-// wParam = (WPARAM)0
+// wParam = 0
// lParam = (LPARAM)(REMOVETRIGGERSETTINGS *)&rts
// Pointer to a structure describing the settings to remove (see below).
diff --git a/plugins/ExternalAPI/m_variables.h b/plugins/ExternalAPI/m_variables.h index 52c3081d08..77b3407291 100644 --- a/plugins/ExternalAPI/m_variables.h +++ b/plugins/ExternalAPI/m_variables.h @@ -534,7 +534,7 @@ __inline static int variables_showhelp(HWND hwndDlg, UINT uIDEdit, int flags, ch // Parameters:
// ------------------------
-// wParam = (WPARAM)0
+// wParam = 0
// lParam = (LPARAM)VSI_* (see below)
// Return Value:
diff --git a/plugins/FTPFileYM/src/utils.cpp b/plugins/FTPFileYM/src/utils.cpp index 4757a4d183..7d257d4e98 100644 --- a/plugins/FTPFileYM/src/utils.cpp +++ b/plugins/FTPFileYM/src/utils.cpp @@ -20,11 +20,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. extern Options &opt;
extern UploadDialog *uDlg;
-extern LibCurl &curl;
+extern LibCurl &curl;
int Utils::getDeleteTimeMin()
{
- switch (opt.timeRange)
+ switch (opt.timeRange)
{
case (Options::TR_MINUTES): return (opt.iDeleteTime);
case (Options::TR_HOURS): return (opt.iDeleteTime * 60);
@@ -50,7 +50,7 @@ HICON Utils::loadIconEx(char *szName) {
char buff[100];
mir_snprintf(buff, sizeof(buff), "%s_%s", MODULE, szName);
- return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)buff);
+ return Skin_GetIcon(buff);
}
TCHAR *Utils::getFileNameFromPath(TCHAR *stzPath)
@@ -75,16 +75,16 @@ TCHAR *Utils::getTextFragment(TCHAR *stzText, size_t length, TCHAR *buff) void Utils::copyToClipboard(char *szText)
{
- if (szText)
+ if (szText)
{
- if (OpenClipboard(NULL))
+ if (OpenClipboard(NULL))
{
EmptyClipboard();
HGLOBAL hClipboardData = GlobalAlloc(GMEM_DDESHARE, 1024);
char *pchData = (char *)GlobalLock(hClipboardData);
strcpy(pchData, szText);
GlobalUnlock(hClipboardData);
- SetClipboardData(CF_TEXT, hClipboardData);
+ SetClipboardData(CF_TEXT, hClipboardData);
CloseClipboard();
}
}
@@ -98,11 +98,11 @@ char* Utils::makeSafeString(TCHAR *input, char *output) char *buff = mir_t2a(input);
size_t length = strlen(buff);
- for (UINT i = 0; i < length; i++)
+ for (UINT i = 0; i < length; i++)
{
- for (int j = 0; from_chars[j] != 0; j++)
+ for (int j = 0; from_chars[j] != 0; j++)
{
- if (buff[i] == from_chars[j])
+ if (buff[i] == from_chars[j])
{
buff[i] = to_chars[j];
break;
@@ -133,7 +133,7 @@ void Utils::curlSetOpt(CURL *hCurl, ServerList::FTP *ftp, char *url, struct curl curl.easy_setopt(hCurl, CURLOPT_FTP_USE_EPRT, 0);
curl.easy_setopt(hCurl, CURLOPT_FTP_USE_EPSV, 0);
- if (ftp->bPassive)
+ if (ftp->bPassive)
curl.easy_setopt(hCurl, CURLOPT_FTPPORT, 0);
else if (!DB::getAString(0, MODULE, "LocalIP", buff))
curl.easy_setopt(hCurl, CURLOPT_FTPPORT, buff);
@@ -141,7 +141,7 @@ void Utils::curlSetOpt(CURL *hCurl, ServerList::FTP *ftp, char *url, struct curl curl.easy_setopt(hCurl, CURLOPT_FTPPORT, "-");
mir_snprintf(buff, sizeof(buff), "%s:%s", ftp->szUser, ftp->szPass);
- curl.easy_setopt(hCurl, CURLOPT_USERPWD, buff);
+ curl.easy_setopt(hCurl, CURLOPT_USERPWD, buff);
if (ftp->ftpProto == ServerList::FTP::FT_SSL_EXPLICIT || ftp->ftpProto == ServerList::FTP::FT_SSL_IMPLICIT)
{
@@ -149,18 +149,18 @@ void Utils::curlSetOpt(CURL *hCurl, ServerList::FTP *ftp, char *url, struct curl curl.easy_setopt(hCurl, CURLOPT_FTPSSLAUTH, CURLFTPAUTH_DEFAULT);
curl.easy_setopt(hCurl, CURLOPT_SSL_VERIFYPEER, 0);
curl.easy_setopt(hCurl, CURLOPT_SSL_VERIFYHOST, 2);
- }
+ }
else if (ftp->ftpProto == ServerList::FTP::FT_SSH)
{
curl.easy_setopt(hCurl, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_PASSWORD);
}
}
-INT_PTR CALLBACK Utils::DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK Utils::DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
TCHAR *fileName = (TCHAR *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg)
+ switch (msg)
{
case WM_INITDIALOG:
{
@@ -169,7 +169,7 @@ INT_PTR CALLBACK Utils::DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)fileName);
SetDlgItemText(hwndDlg, IDC_NAME, fileName);
- if (GetDlgCtrlID((HWND)wParam) != IDC_NAME)
+ if (GetDlgCtrlID((HWND)wParam) != IDC_NAME)
{
SetFocus(GetDlgItem(hwndDlg, IDC_NAME));
SendDlgItemMessage(hwndDlg, IDC_NAME, EM_SETSEL, 0, _tcslen(fileName) - 4);
@@ -180,7 +180,7 @@ INT_PTR CALLBACK Utils::DlgProcSetFileName(HWND hwndDlg, UINT msg, WPARAM wParam }
case WM_COMMAND:
{
- if (HIWORD(wParam) == BN_CLICKED)
+ if (HIWORD(wParam) == BN_CLICKED)
{
if (LOWORD(wParam) == IDOK)
{
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index f49df5b5c5..6decf57e96 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -175,8 +175,8 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam) sid.cbSize = sizeof(sid);
sid.szModule = "FavContacts";
sid.szTooltip = "Favourite Contacts";
- sid.hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_icoFavourite);
- sid.hIconDisabled = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_icoRegular);
+ sid.hIcon = Skin_GetIconByHandle(g_icoFavourite);
+ sid.hIconDisabled = Skin_GetIconByHandle(g_icoRegular);
CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid);
HookEvent(ME_MSG_ICONPRESSED, ProcessSrmmIconClick);
@@ -731,7 +731,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL) if (options->wMaxRecent && DBGetContactSettingByte(hContact, "FavContacts", "IsFavourite", 0))
{
DrawIconEx(hdcTemp, lpdis->rcItem.right - 18, (lpdis->rcItem.top + lpdis->rcItem.bottom - 16) / 2,
- (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_icoFavourite), 16, 16, 0, NULL, DI_NORMAL);
+ Skin_GetIconByHandle(g_icoFavourite), 16, 16, 0, NULL, DI_NORMAL);
lpdis->rcItem.right -= 20;
}
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp index f038b87a33..125952db8b 100644 --- a/plugins/FileAsMessage/src/dialog.cpp +++ b/plugins/FileAsMessage/src/dialog.cpp @@ -193,7 +193,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM case WM_COMMAND:
{
PUDeletePopUp(hWnd);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)0);
+ CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, 0);
if(IsWindow(hDlg))
{
@@ -665,7 +665,7 @@ void FILEECHO::onRecvTimer() if(DBGetContactSettingByte(NULL,"SRFile","AutoClose",0))
{
PostMessage(hDlg, WM_CLOSE, 0,0);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)0);
+ CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, 0);
}
SkinPlaySound("FileDone");
destroyTransfer();
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 681cd4f02a..41505dabf8 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -62,21 +62,8 @@ int iIconId[5] = {3,2,4,1,0}; //
int OnSkinIconsChanged(WPARAM wParam,LPARAM lParam)
{
- int indx;
-/*
- if(lParam == NULL)
- return 0;
- for(indx = 0; indx < ARRAY_SIZE(hIcons); indx++)
- {
- if(strcmp((char*)lParam, szIconId[indx]) == 0)
- {
- hIcons[indx] = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szIconId[indx]);
- break;
- }
- }
-*/
- for(indx = 0; indx < SIZEOF(hIcons); indx++)
- hIcons[indx] = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szIconId[indx]);
+ for(int indx = 0; indx < SIZEOF(hIcons); indx++)
+ hIcons[indx] = Skin_GetIcon(szIconId[indx]);
WindowList_Broadcast(hFileList, WM_FE_SKINCHANGE, 0,0);
@@ -234,7 +221,7 @@ int OnModulesLoaded(WPARAM wparam,LPARAM lparam) Skin_AddIcon(&sid);
}
for(indx = 0; indx < SIZEOF(hIcons); indx++)
- hIcons[indx] = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szIconId[indx]);
+ hIcons[indx] = Skin_GetIcon(szIconId[indx]);
hHookSkinIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, OnSkinIconsChanged);
@@ -261,7 +248,7 @@ extern "C" __declspec(dllexport) int Load(void) // for(int indx = 0; indx < ARRAY_SIZE(hIcons); indx++)
// hIcons[indx] = (HICON)LoadImage(hInst,MAKEINTRESOURCE(idIcons[indx]),IMAGE_ICON,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0);
-
+
hFileList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
//CreateServiceFunction( SERVICE_NAME PS_GETCAPS, FEGetCaps );
diff --git a/plugins/FirstRun/src/main.cpp b/plugins/FirstRun/src/main.cpp index 03448bd193..3fe9131092 100644 --- a/plugins/FirstRun/src/main.cpp +++ b/plugins/FirstRun/src/main.cpp @@ -29,7 +29,7 @@ int ModulesLoaded(WPARAM wParam,LPARAM lParam) if (ptszDllName!=NULL)
ptszDllName=ptszDllName + 1;
- CallService(MS_PROTO_SHOWACCMGR, (WPARAM) NULL, (LPARAM)NULL);
+ CallService(MS_PROTO_SHOWACCMGR, (WPARAM) NULL, 0);
DBWriteContactSettingByte(NULL, "PluginDisable", _T2A(ptszDllName), 1);
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index e7b8c054bb..5faf1c177b 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -573,7 +573,7 @@ static void ShowContactMenu( HWND hwnd, POINT pt ) if ( pThumb != NULL )
{
- hContactMenu = (HMENU)CallService( MS_CLIST_MENUBUILDCONTACT, (WPARAM)pThumb->hContact, (LPARAM)0 );
+ hContactMenu = (HMENU)CallService( MS_CLIST_MENUBUILDCONTACT, (WPARAM)pThumb->hContact, 0 );
if ( hContactMenu == NULL ) return;
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index 0195ff0717..77daa3107a 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -844,7 +844,7 @@ void ThumbInfo::UpdateContent() void ThumbInfo::PopUpMessageDialog( )
{
- CallService( MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, (LPARAM)0 );
+ CallService( MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0 );
}
void ThumbInfo::OnTimer(BYTE idTimer)
diff --git a/plugins/Gender/src/main.cpp b/plugins/Gender/src/main.cpp index f778fa11f6..9f8c46f623 100644 --- a/plugins/Gender/src/main.cpp +++ b/plugins/Gender/src/main.cpp @@ -141,9 +141,9 @@ int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam) {
if(hIcoLibIconsChanged)
{
- g_IECMale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMale), (LPARAM)0);
- g_IECFemale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconFemale), (LPARAM)0);
- g_IECUndef.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMenu), (LPARAM)0);
+ g_IECMale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIconByHandle(g_hIconMale), 0);
+ g_IECFemale.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIconByHandle(g_hIconFemale), 0);
+ g_IECUndef.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIconByHandle(g_hIconMenu), 0);
}
}
@@ -156,10 +156,11 @@ INT_PTR GetIcon(WPARAM wParam, LPARAM lParam) char *proto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
unsigned short gender = DBGetContactSettingByte((HANDLE)wParam, "UserInfo", "Gender", DBGetContactSettingByte((HANDLE)wParam, proto, "Gender", 0));
- if (gender > 0)
- {
- if (gender == 77) return CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconMale);
- else if (gender == 70) return CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)g_hIconFemale);
+ if (gender > 0) {
+ if (gender == 77)
+ return (INT_PTR)Skin_GetIconByHandle(g_hIconMale);
+ if (gender == 70)
+ return (INT_PTR)Skin_GetIconByHandle(g_hIconFemale);
}
return 0;
@@ -376,19 +377,18 @@ int onSystemOKToExit(WPARAM wParam,LPARAM lParam) UnhookEvent(hHookPrebuildContactMenu);
UnhookEvent(hOptInitialise);
UnhookEvent(hSystemOKToExit);
- if (hIcoLibIconsChanged) UnhookEvent(hIcoLibIconsChanged);
-
+ if (hIcoLibIconsChanged)
+ UnhookEvent(hIcoLibIconsChanged);
DestroyServiceFunction(hSetMale);
DestroyServiceFunction(hSetFemale);
DestroyServiceFunction(hSetUndef);
DestroyServiceFunction(hGenderGetIcon);
- if (hIcoLibIconsChanged)
- {
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"menu_icon");
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"male_icon");
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"female_icon");
+ if (hIcoLibIconsChanged) {
+ Skin_ReleaseIcon("menu_icon");
+ Skin_ReleaseIcon("male_icon");
+ Skin_ReleaseIcon("female_icon");
}
return 0;
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index 4e99d30a9d..ea039e276e 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -579,7 +579,7 @@ int WriteOptionExample(HWND hDlg, DWORD InColourSel, DWORD OutColourSel, DWORD B SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK));
SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_AUTOURLDETECT, TRUE, 0);
SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, EM_SETBKGNDCOLOR, FALSE, BGColourSel);
- SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, WM_SETTEXT , 0, (LPARAM)NULL);
+ SendDlgItemMessage(hDlg, IDC_OPTIONS_RE, WM_SETTEXT , 0, 0);
ZeroMemory(&cf, sizeof(cf));
cf.cbSize = sizeof(cf);
@@ -686,7 +686,7 @@ void WriteMessage(HWND hDlg, LISTELEMENT *listStart, int actLinePos) CallService(MS_DB_EVENT_GET,(WPARAM)hEvent,(LPARAM)&dbe);
dbe.pBlob[dbe.cbBlob] = 0;
msg = DbGetEventTextT(&dbe, CP_ACP);
- SendDlgItemMessage(hDlg, IDC_MESSAGE, WM_SETTEXT , 0, (LPARAM)NULL);
+ SendDlgItemMessage(hDlg, IDC_MESSAGE, WM_SETTEXT , 0, 0);
SendDlgItemMessage(hDlg, IDC_MESSAGE, EM_REPLACESEL, FALSE, (LPARAM)msg);
mir_free((void*)msg);
free(dbe.pBlob);
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index a49cf77684..68731558f0 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "historysweeperlight.h"
// Time Stamps strings
-const char* time_stamp_strings[] =
+const char* time_stamp_strings[] =
{
"Delete older than 1 day",
"Delete older than 3 days",
@@ -34,7 +34,7 @@ const char* time_stamp_strings[] = "Delete older than 1 year (365 days)"
};
-const char* keep_strings[] =
+const char* keep_strings[] =
{
"Keep 1 last event",
"Keep 2 last events",
@@ -73,21 +73,21 @@ void InitIcons(void) sid.flags = SIDF_PATH_TCHAR;
for (int i=0; i < SIZEOF(iconList); i++) {
- char szSettingName[100];
+ char szSettingName[100];
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", ModuleName, iconList[i].szName);
sid.pszName = szSettingName;
sid.pszDescription = (char*)iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
hIconLibItem[i] = Skin_AddIcon(&sid);
- }
+ }
}
HICON LoadIconEx(const char* name)
{
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", ModuleName, name);
- return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName);
}
HANDLE GetIconHandle(const char* name)
@@ -105,10 +105,10 @@ void ReleaseIconEx(const char* name) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", ModuleName, name);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ Skin_ReleaseIcon(szSettingName);
}
-HANDLE hAllContacts, hSystemHistory;
+HANDLE hAllContacts, hSystemHistory;
void ResetListOptions(HWND hwndList)
{
@@ -127,17 +127,17 @@ void ResetListOptions(HWND hwndList) static void ShowAllContactIcons(HWND hwndList)
{
HANDLE hContact, hItem;
-
- SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hAllContacts,
+
+ SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hAllContacts,
MAKELPARAM(0, DBGetContactSettingByte(NULL, ModuleName, "SweepHistory", 0)));
- SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hSystemHistory,
+ SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hSystemHistory,
MAKELPARAM(0, DBGetContactSettingByte(NULL, ModuleName, "SweepSHistory", 0)));
-
+
for (hContact=db_find_first(); hContact;
hContact=db_find_next(hContact))
{
hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
- SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem,
+ SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem,
MAKELPARAM(0, DBGetContactSettingByte(hContact, ModuleName, "SweepHistory", 0)));
}
}//ShowAllContactIcons
@@ -160,20 +160,20 @@ void LoadSettings(HWND hwndDlg) SendDlgItemMessage(hwndDlg, IDC_SSOLDER, CB_RESETCONTENT, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_SSKEEP, CB_RESETCONTENT, 0, 0);
- for (i = 0; i < SIZEOF(time_stamp_strings); i++)
+ for (i = 0; i < SIZEOF(time_stamp_strings); i++)
{
TCHAR* ptszTimeStr = (TCHAR*)CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)time_stamp_strings[i]);
SendDlgItemMessage(hwndDlg, IDC_SSOLDER, CB_ADDSTRING, 0, (LPARAM)ptszTimeStr);
mir_free(ptszTimeStr);
}
- for (i = 0; i < SIZEOF(keep_strings); i++)
+ for (i = 0; i < SIZEOF(keep_strings); i++)
{
TCHAR* ptszTimeStr = (TCHAR*)CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)keep_strings[i]);
SendDlgItemMessage(hwndDlg, IDC_SSKEEP, CB_ADDSTRING, 0, (LPARAM)ptszTimeStr);
mir_free(ptszTimeStr);
}
-
+
SendDlgItemMessage(hwndDlg, IDC_SSOLDER, CB_SETCURSEL, DBGetContactSettingByte(NULL, ModuleName, "StartupShutdownOlder", 0), 0);
SendDlgItemMessage(hwndDlg, IDC_SSKEEP, CB_SETCURSEL, DBGetContactSettingByte(NULL, ModuleName, "StartupShutdownKeep", 0), 0);
@@ -196,11 +196,11 @@ void SaveSettings(HWND hwndDlg) sid.cbSize = sizeof(sid);
sid.szModule = ModuleName;
- DBWriteContactSettingByte(NULL, ModuleName, "SweepHistory",
+ DBWriteContactSettingByte(NULL, ModuleName, "SweepHistory",
(BYTE)SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hAllContacts, 0));
- DBWriteContactSettingByte(NULL, ModuleName, "SweepSHistory",
+ DBWriteContactSettingByte(NULL, ModuleName, "SweepSHistory",
(BYTE)SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hSystemHistory, 0));
-
+
for (hContact=db_find_first(); hContact;
hContact=db_find_next(hContact))
{
@@ -246,25 +246,25 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa {
HIMAGELIST hIml = ImageList_Create( GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
ILC_MASK | (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16 ), 2, 2 );
-
+
HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT);
ImageList_AddIcon(hIml, hIcon);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
- hIcon = LoadIconEx("act1");
+ hIcon = LoadIconEx("act1");
ImageList_AddIcon(hIml, hIcon);
SendDlgItemMessage(hwndDlg, IDC_ACT1, STM_SETICON, (WPARAM)hIcon, 0);
- hIcon = LoadIconEx("act2");
+ hIcon = LoadIconEx("act2");
ImageList_AddIcon(hIml, hIcon);
SendDlgItemMessage(hwndDlg, IDC_ACT2, STM_SETICON, (WPARAM)hIcon, 0);
-
- hIcon = LoadIconEx("actDel");
+
+ hIcon = LoadIconEx("actDel");
ImageList_AddIcon(hIml, hIcon);
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hIml);
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRACOLUMNS, 1, 0);
-
+
TranslateDialogDefault(hwndDlg);
ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
LoadSettings(hwndDlg);
@@ -294,7 +294,7 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa }
else if (nmc->hdr.idFrom == IDC_LIST)
{
- switch (nmc->hdr.code)
+ switch (nmc->hdr.code)
{
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
@@ -329,7 +329,7 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
break;
- }
+ }
}
}
break;
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 08d3139304..bbc81f8d03 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -338,7 +338,7 @@ static void RefreshProtoIcons() { if (hIcon == NULL) {
hIcon=(HICON)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
ImageList_AddIcon(hProtocolImageList, hIcon);
- CallService(MS_SKIN2_RELEASEICON,(WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
}
}
@@ -505,7 +505,7 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w TCHAR* size[] = { LPGENT("320 x 205"), LPGENT("480 x 385") , LPGENT("560 x 349"), LPGENT("640 x 390")};
for (i = 0; i < SIZEOF(size); ++i){
int item=SendDlgItemMessage(hwndDlg,IDC_EMBED_SIZE,CB_ADDSTRING,0,(LPARAM)TranslateTS(size[i]));
- SendDlgItemMessage(hwndDlg,IDC_EMBED_SIZE,CB_SETITEMDATA,item,(LPARAM)0);
+ SendDlgItemMessage(hwndDlg,IDC_EMBED_SIZE,CB_SETITEMDATA,item,0);
}
SendDlgItemMessage(hwndDlg,IDC_EMBED_SIZE,CB_SETCURSEL,Options::getEmbedsize(),0);
return TRUE;
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 36ecb5c353..d070a8aa76 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -49,9 +49,9 @@ char *TemplateHTMLBuilder::getAvatar(HANDLE hContact, const char * szProto) { if (Options::getAvatarServiceFlags() == Options::AVATARSERVICE_PRESENT) {
struct avatarCacheEntry *ace = NULL;
if (hContact == NULL) {
- ace = (struct avatarCacheEntry *)CallService(MS_AV_GETMYAVATAR, (WPARAM)0, (LPARAM)szProto);
+ ace = (struct avatarCacheEntry *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)szProto);
} else {
- ace = (struct avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, (LPARAM)0);
+ ace = (struct avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
}
if (ace!=NULL) {
if ( ace->cbSize == sizeof(avatarCacheEntry))
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp index fef1056cac..813a6e67f1 100644 --- a/plugins/IEView/src/Utils.cpp +++ b/plugins/IEView/src/Utils.cpp @@ -408,7 +408,7 @@ wchar_t *Utils::urlEncode(const wchar_t *text) { }
wchar_t *Utils::urlEncode(const char *text) {
- char *pszReturnString = (char *)CallService(MS_NETLIB_URLENCODE, (WPARAM)0, (LPARAM)text);
+ char *pszReturnString = (char *)CallService(MS_NETLIB_URLENCODE, 0, (LPARAM)text);
wchar_t *result = convertToWCS(pszReturnString);
HeapFree(GetProcessHeap(), 0, pszReturnString);
return result;
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index 2cea928f09..9249c85ca8 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -171,9 +171,9 @@ int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam) if (ServiceExists(MS_CLIST_EXTRA_ADD_ICON))
{
- g_IECIgnoreMess.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"ignore_mess"), (LPARAM)0);
- g_IECIgnorePart.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"ignore_part"), (LPARAM)0);
- g_IECIgnoreFull.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"ignore_full"), (LPARAM)0);
+ g_IECIgnoreMess.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("ignore_mess"), 0);
+ g_IECIgnorePart.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("ignore_part"), 0);
+ g_IECIgnoreFull.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("ignore_full"), 0);
}
return 0;
}
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index d27907efcc..0265a719fb 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -127,7 +127,7 @@ static void ResetListOptions(HWND hwndList) {
int i;
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, (LPARAM)NULL);
+ SendMessage(hwndList, CLM_SETBKBITMAP, 0, 0);
SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
SendMessage(hwndList, CLM_SETLEFTMARGIN, 4, 0);
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index f8fa9e701c..6f0d89f20e 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -893,7 +893,7 @@ void SetListeningInfos(LISTENINGTOINFO *lti) if (fr) info = mir_t2a(fr);
}
- NotifyEventHooks(hListeningInfoChangedEvent, (WPARAM)info, (LPARAM)NULL);
+ NotifyEventHooks(hListeningInfoChangedEvent, (WPARAM)info, 0);
if (lti) {
if (fr) mir_free(fr);
diff --git a/plugins/ListeningTo/src/players/wa_ipc.h b/plugins/ListeningTo/src/players/wa_ipc.h index 60765736b9..a21b0eccac 100644 --- a/plugins/ListeningTo/src/players/wa_ipc.h +++ b/plugins/ListeningTo/src/players/wa_ipc.h @@ -429,7 +429,7 @@ do not use :) #define IPC_GET_HMENU 281
/* (requires Winamp 2.9+)
-** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0,IPC_GET_HMENU);
+** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_HMENU);
** values for data:
** 0 : main popup menu
** 1 : main menubar file menu
diff --git a/plugins/ListeningTo/src/players/winamp_mlt/wa_ipc.h b/plugins/ListeningTo/src/players/winamp_mlt/wa_ipc.h index 73082908c0..0c6c16d39e 100644 --- a/plugins/ListeningTo/src/players/winamp_mlt/wa_ipc.h +++ b/plugins/ListeningTo/src/players/winamp_mlt/wa_ipc.h @@ -588,7 +588,7 @@ typedef struct { #define IPC_GET_HMENU 281
/* (requires Winamp 2.9+)
-** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0,IPC_GET_HMENU);
+** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_HMENU);
** values for data:
** 0 : main popup menu
** 1 : main menubar file menu
@@ -974,7 +974,7 @@ typedef struct _prefsDlgRecW { #define IPC_GETDIALOGBOXPARENT 365
/* (requires Winamp 5.51+)
-** HWND hwndParent = SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0, IPC_GETDIALOGBOXPARENT);
+** HWND hwndParent = SendMessage(hwnd_winamp,WM_WA_IPC,0, IPC_GETDIALOGBOXPARENT);
** hwndParent can/must be passed to all modal dialogs (including MessageBox) thats uses winamp as a parent
*/
diff --git a/plugins/MenuItemEx/src/images.cpp b/plugins/MenuItemEx/src/images.cpp index 51903294bb..61d7b7750f 100644 --- a/plugins/MenuItemEx/src/images.cpp +++ b/plugins/MenuItemEx/src/images.cpp @@ -27,7 +27,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) for (y = 0; y < bmp.bmHeight; ++y) {
BYTE *px = p + bmp.bmWidth * 4 * y;
- for (x = 0; x < bmp.bmWidth; ++x)
+ for (x = 0; x < bmp.bmWidth; ++x)
{
px[3]>>=1;
px += 4;
@@ -90,9 +90,9 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force) for (y = 0; fixIt && y < bmp.bmHeight; ++y) {
BYTE *px = p + bmp.bmWidth * 4 * y;
- for (x = 0; fixIt && x < bmp.bmWidth; ++x)
+ for (x = 0; fixIt && x < bmp.bmWidth; ++x)
{
- if (px[3] != 0 && !force)
+ if (px[3] != 0 && !force)
{
fixIt = FALSE;
}
@@ -115,7 +115,7 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force) HBITMAP CopyBitmapTo32(HBITMAP hBitmap)
{
- BITMAPINFO RGB32BitsBITMAPINFO;
+ BITMAPINFO RGB32BitsBITMAPINFO;
BYTE * ptPixels;
HBITMAP hDirectBitmap;
@@ -138,10 +138,10 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) RGB32BitsBITMAPINFO.bmiHeader.biPlanes = 1;
RGB32BitsBITMAPINFO.bmiHeader.biBitCount = 32;
- hDirectBitmap = CreateDIBSection(NULL,
- (BITMAPINFO *)&RGB32BitsBITMAPINFO,
+ hDirectBitmap = CreateDIBSection(NULL,
+ (BITMAPINFO *)&RGB32BitsBITMAPINFO,
DIB_RGB_COLORS,
- (void **)&ptPixels,
+ (void **)&ptPixels,
NULL, 0);
// Copy data
@@ -149,7 +149,7 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) {
HDC hdcOrig, hdcDest;
HBITMAP oldOrig, oldDest;
-
+
hdcOrig = CreateCompatibleDC(NULL);
oldOrig = (HBITMAP) SelectObject(hdcOrig, hBitmap);
@@ -180,7 +180,7 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) //HBITMAP CreateBitmap32(int cx, int cy)
//{
-// BITMAPINFO RGB32BitsBITMAPINFO;
+// BITMAPINFO RGB32BitsBITMAPINFO;
// UINT * ptPixels;
// HBITMAP DirectBitmap;
//
@@ -191,10 +191,10 @@ HBITMAP CopyBitmapTo32(HBITMAP hBitmap) // RGB32BitsBITMAPINFO.bmiHeader.biPlanes=1;
// RGB32BitsBITMAPINFO.bmiHeader.biBitCount=32;
//
-// DirectBitmap = CreateDIBSection(NULL,
-// (BITMAPINFO *)&RGB32BitsBITMAPINFO,
+// DirectBitmap = CreateDIBSection(NULL,
+// (BITMAPINFO *)&RGB32BitsBITMAPINFO,
// DIB_RGB_COLORS,
-// (void **)&ptPixels,
+// (void **)&ptPixels,
// NULL, 0);
// return DirectBitmap;
//}
@@ -211,7 +211,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) HBITMAP hBmpTmp = CopyBitmapTo32(*hBitmap);
DeleteObject(*hBitmap);
*hBitmap = hBmpTmp;
- }
+ }
return TRUE;
}
@@ -233,7 +233,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) //
// dwLen = width * height * 4;
// p = (BYTE *)malloc(dwLen);
-// if (p == NULL)
+// if (p == NULL)
// {
// return FALSE;
// }
@@ -244,7 +244,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) // HBITMAP hBmpTmp = CopyBitmapTo32(*hBitmap);
// DeleteObject(*hBitmap);
// *hBitmap = hBmpTmp;
-// }
+// }
// GetBitmapBits(*hBitmap, dwLen, p);
//
// // Make grayscale
@@ -323,7 +323,7 @@ HICON BindOverlayIcon(HICON SourceIcon,LPCSTR OverlayIconName) CorrectBitmap32Alpha(TargetIconInfo.hbmColor, FALSE);
GetObject(TargetIconInfo.hbmColor, sizeof(BITMAP), &TargetBitmapInfo);
- OverlayIcon = (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)OverlayIconName);
+ OverlayIcon = Skin_GetIcon(OverlayIconName);
if ( !GetIconInfo(OverlayIcon, &OverlayIconInfo) || !GetObject(OverlayIconInfo.hbmColor, sizeof(BITMAP), &OverlayBitmapInfo))
return NULL;
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 28efa1bea9..c96512f956 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -602,9 +602,7 @@ void ModifyInvisSet(CLISTMENUITEM *cli,int mode,BOOL alpha) void ModifyHidden(CLISTMENUITEM *cli,int mode)
{
cli->flags |= CMIM_ICON | CMIM_NAME;
- cli->hIcon = (mode) ?
- (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_showil") :
- (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_hidefl");
+ cli->hIcon = Skin_GetIcon((mode) ? "miex_showil" : "miex_hidefl");
cli->ptszName = mode ? LPGENT("Show in list") : LPGENT("Hide from list");
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hmenuHide, (LPARAM)cli);
}
@@ -1103,7 +1101,7 @@ static int TabsrmmButtonsInit(WPARAM wParam, LPARAM lParam) bbd.dwDefPos = 1000;
bbd.ptszTooltip = _T("Browse Received Files");
bbd.bbbFlags = BBBF_ISLSIDEBUTTON | BBBF_CANBEHIDDEN;
- bbd.hIcon = (HANDLE)CallService(MS_SKIN2_GETICONHANDLE, 0, (LPARAM)"miex_recfiles");
+ bbd.hIcon = Skin_GetIconHandle("miex_recfiles");
CallService (MS_BB_ADDBUTTON, 0, (LPARAM)&bbd);
return 0;
@@ -1250,7 +1248,7 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) mi.ptszName = LPGENT("Ignore");
mi.pszService = 0;
mi.flags |= CMIF_ROOTHANDLE;
- mi.hIcon = (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_ignore" );
+ mi.hIcon = Skin_GetIcon("miex_ignore");
hmenuIgnore = Menu_AddContactMenuItem(&mi);
hIgnoreItem[0] = AddSubmenuItem(hmenuIgnore, ii[0].name, LoadSkinnedIcon(ii[0].icon), 0, MS_IGNORE, pos, ii[0].type );
@@ -1262,13 +1260,13 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) ood.cbSize = sizeof(ood);
ood.pszGroup = "Events";
ood.pszPage = "Ignore";
- AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), (HICON)CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_ignore"), 0, "Opt/OpenOptions", pos, (int)&ood );
+ AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), Skin_GetIcon("miex_ignore"), 0, "Opt/OpenOptions", pos, (int)&ood );
mi.pszPopupName = 0;
mi.position++;
mi.ptszName = LPGENT("Copy to Account");
mi.pszService = MS_PROTO;
- mi.hIcon = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_protocol");
+ mi.hIcon = Skin_GetIcon("miex_protocol");
hmenuProto = Menu_AddContactMenuItem(&mi);
EnumProtoSubmenu(0, 0);
@@ -1278,13 +1276,13 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) mi.position++;
mi.ptszName = LPGENT("Send 'You were added'");
mi.pszService = MS_ADDED;
- mi.hIcon = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_added");
+ mi.hIcon = Skin_GetIcon("miex_added");
hmenuAdded = Menu_AddContactMenuItem(&mi);
mi.position++;
mi.ptszName = LPGENT("Request authorization");
mi.pszService = MS_AUTHREQ;
- mi.hIcon = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_authorization");
+ mi.hIcon = Skin_GetIcon("miex_authorization");
hmenuAuthReq = Menu_AddContactMenuItem(&mi);
mi.position++;
@@ -1295,13 +1293,13 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) mi.position++;
mi.ptszName = LPGENT("Browse Received Files");
mi.pszService = MS_RECVFILES;
- mi.hIcon = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_recfiles");
+ mi.hIcon = Skin_GetIcon("miex_recfiles");
hmenuRecvFiles = Menu_AddContactMenuItem(&mi);
mi.position++;
mi.ptszName = LPGENT("Copy Status Message");
mi.pszService = MS_STATUSMSG;
- mi.hIcon = NULL;//LoadIcon(hinstance, MAKEINTRESOURCE(IDI_ICON5));
+ mi.hIcon = NULL;
hmenuStatusMsg = Menu_AddContactMenuItem(&mi);
mi.position++;
@@ -1314,9 +1312,9 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) mi.pszService = MS_COPYMIRVER;
hmenuCopyMirVer = Menu_AddContactMenuItem(&mi);
- hIcon[0] = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_copymver");
- hIcon[1] = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_vis");
- hIcon[2] = ( HICON )CallService( MS_SKIN2_GETICON, 0, (LPARAM)"miex_invis");
+ hIcon[0] = Skin_GetIcon("miex_copymver");
+ hIcon[1] = Skin_GetIcon("miex_vis");
+ hIcon[2] = Skin_GetIcon("miex_invis");
hIcon[3] = MakeHalfAlphaIcon(hIcon[1]);
hIcon[4] = MakeHalfAlphaIcon(hIcon[2]);
diff --git a/plugins/MetaContacts/src/edit.cpp b/plugins/MetaContacts/src/edit.cpp index a5866576dd..5980f905a4 100644 --- a/plugins/MetaContacts/src/edit.cpp +++ b/plugins/MetaContacts/src/edit.cpp @@ -91,11 +91,11 @@ void FillContactList(HWND hWndDlg, CHANGES *chg) { }
LvItemW.pszText = swzContactDisplayName;
- SendMessageW(hList, LVM_INSERTITEMW, (WPARAM)0, (LPARAM)&LvItemW);
+ SendMessageW(hList, LVM_INSERTITEMW, 0, (LPARAM)&LvItemW);
} else {
LvItem.iSubItem = 0; // clist display name
LvItem.pszText = szCDN;
- SendMessage(hList, LVM_INSERTITEM, (WPARAM)0, (LPARAM)&LvItem);
+ SendMessage(hList, LVM_INSERTITEM, 0, (LPARAM)&LvItem);
}
}
@@ -426,7 +426,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return TRUE;
else
{
- Meta_Delete((WPARAM)changes.hMeta,(LPARAM)NULL);
+ Meta_Delete((WPARAM)changes.hMeta,0);
DestroyWindow(hwndDlg);
return TRUE;
}
@@ -446,7 +446,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR {
return TRUE;
} else {
- Meta_Delete((WPARAM)changes.hMeta,(LPARAM)NULL);
+ Meta_Delete((WPARAM)changes.hMeta,0);
DestroyWindow(hwndDlg);
return TRUE;
}
diff --git a/plugins/MetaContacts/src/meta_menu.cpp b/plugins/MetaContacts/src/meta_menu.cpp index 9cb430f8d5..fe718ba95b 100644 --- a/plugins/MetaContacts/src/meta_menu.cpp +++ b/plugins/MetaContacts/src/meta_menu.cpp @@ -493,7 +493,6 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuContact[i], (LPARAM)&mi);
DestroyIcon(mi.hIcon);
- //CallService(MS_SKIN2_RELEASEICON, (WPARAM)mi.hIcon, 0);
} else {
mi.flags = CMIM_FLAGS | CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuContact[i], (LPARAM)&mi);
diff --git a/plugins/MirOTR/MirOTR/src/icons.cpp b/plugins/MirOTR/MirOTR/src/icons.cpp index c9dd1a10db..181c57e492 100644 --- a/plugins/MirOTR/MirOTR/src/icons.cpp +++ b/plugins/MirOTR/MirOTR/src/icons.cpp @@ -47,16 +47,19 @@ void DeinitIcons() { }
HICON LoadIcon(const char* name, int big) {
- return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)name );
+ return Skin_GetIcon(name, big);
}
HANDLE GetIconHandle(const char* name) {
- return ( HANDLE )CallService( MS_SKIN2_GETICONHANDLE, 0, (LPARAM)name );
+ return Skin_GetIconHandle(name);
}
-void ReleaseIcon(const char* name, int big) {
- CallService( big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)name );
+void ReleaseIcon(const char* name, int big)
+{
+ Skin_ReleaseIcon(name, big);
}
-void ReleaseIcon(HICON handle, int big) {
- CallService( big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, (WPARAM)handle, 0 );
+
+void ReleaseIcon(HICON handle, int big)
+{
+ Skin_ReleaseIcon(handle);
}
diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp index 07a874c425..8d6b8512f2 100644 --- a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp +++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp @@ -220,7 +220,7 @@ void InitMirOTRMenu(void) tmp.CheckService="MirOTRMenuCheckService";
tmp.ExecService="MirOTRMenuExecService";
tmp.name="MirOTRMenu";
- hMirOTRMenuObject=(HANDLE)CallService(MO_CREATENEWMENUOBJECT,(WPARAM)0,(LPARAM)&tmp);
+ hMirOTRMenuObject=(HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
}
OptParam params;
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 245011558b..690bd84a9d 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -1456,7 +1456,7 @@ void ShowGlobalStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto, | (opts.draw_text_align_right ? TPM_RIGHTALIGN : TPM_LEFTALIGN), p.x, p.y, 0, hwnd, NULL);
if (ret)
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(ret),MPCF_MAINMENU),(LPARAM)NULL);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(ret),MPCF_MAINMENU),0);
}
void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto, POINT &p)
@@ -1512,7 +1512,7 @@ void ShowProtocolStatusMenu(HWND hwnd, MyDetailsFrameData *data, Protocol *proto | (opts.draw_text_align_right ? TPM_RIGHTALIGN : TPM_LEFTALIGN), p.x, p.y, 0, hwnd, NULL);
if (ret)
- CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(ret),MPCF_MAINMENU),(LPARAM)NULL);
+ CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(ret),MPCF_MAINMENU),0);
/*
if (to_remove < 5)
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index 8dccbbd165..325e31e8ca 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -200,9 +200,8 @@ static int MainInit(WPARAM wparam,LPARAM lparam) InitFrames();
- if (CallService(MS_SKIN2_GETICON, 0, (LPARAM) "LISTENING_TO_ICON") == NULL) {
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ if ( Skin_GetIcon("LISTENING_TO_ICON") == NULL) {
+ SKINICONDESC sid = { sizeof(SKINICONDESC) };
sid.flags = SIDF_TCHAR;
sid.ptszSection = LPGENT("Contact List");
sid.ptszDescription = LPGENT("Listening to");
@@ -211,8 +210,7 @@ static int MainInit(WPARAM wparam,LPARAM lparam) Skin_AddIcon(&sid);
}
{
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(SKINICONDESC) };
sid.flags = SIDF_TCHAR;
sid.ptszSection = LPGENT("My Details");
sid.ptszDescription = LPGENT("Previous protocol");
@@ -221,8 +219,7 @@ static int MainInit(WPARAM wparam,LPARAM lparam) Skin_AddIcon(&sid);
}
{
- SKINICONDESC sid = {0};
- sid.cbSize = sizeof(SKINICONDESC);
+ SKINICONDESC sid = { sizeof(SKINICONDESC) };
sid.flags = SIDF_TCHAR;
sid.ptszSection = LPGENT("My Details");
sid.ptszDescription = LPGENT("Next protocol");
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 6e2059a39a..2da7db7fdd 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -79,7 +79,7 @@ int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata) if (pdata) {
// do MS_MSG_SENDMESSAGE instead if wanted to reply and not read!
if (pdata->pluginOptions->bMsgReplyWindow && pdata->eventType == EVENTTYPE_MESSAGE)
- CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)pdata->hContact, (LPARAM)NULL); // JK, use core (since 0.3.3+)
+ CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)pdata->hContact, 0); // JK, use core (since 0.3.3+)
else {
CLISTEVENT* cle;
int idx = 0;
@@ -92,7 +92,7 @@ int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata) if (cle && cle->hDbEvent == eventData->hEvent)
{
if (ServiceExists(cle->pszService))
- CallServiceSync(cle->pszService, (WPARAM)NULL, (LPARAM)cle); // JK, use core (since 0.3.3+)
+ CallServiceSync(cle->pszService, 0, (LPARAM)cle); // JK, use core (since 0.3.3+)
break;
}
idx++;
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 3c27a6bb6e..b3841fa4c0 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -346,7 +346,7 @@ int UserInfoInitialise(WPARAM wParam, LPARAM lParam) void ResetListOptions(HWND hwndList)
{
- SendMessage(hwndList, CLM_SETBKBITMAP, 0, (LPARAM)NULL);
+ SendMessage(hwndList, CLM_SETBKBITMAP, 0, 0);
SendMessage(hwndList, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
SendMessage(hwndList, CLM_SETGREYOUTFLAGS, 0, 0);
SendMessage(hwndList, CLM_SETLEFTMARGIN, 4, 0);
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index a75b04472d..ff58ca697f 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -89,7 +89,7 @@ HANDLE GetIconHandle(char *szIcon) {
char szSettingName[64];
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", MODULE, szIcon);
- return (HANDLE)CallService(MS_SKIN2_GETICONHANDLE, 0, (LPARAM)szSettingName);
+ return Skin_GetIconHandle(szSettingName);
}
bool IsNewExtraStatus(HANDLE hContact, char *szSetting, TCHAR *newStatusTitle)
@@ -633,7 +633,7 @@ int StatusModeChanged(WPARAM wParam, LPARAM lParam) void ShowStatusChangePopup(HANDLE hContact, char *szProto, WORD oldStatus, WORD newStatus)
{
TCHAR stzStatusText[MAX_SECONDLINE] = {0};
- WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, (WPARAM)0, (LPARAM)0);
+ WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
POPUPDATAT ppd = {0};
ppd.lchContact = hContact;
@@ -781,7 +781,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) return 0;
strcpy(szProto, hlpProto);
- WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, (WPARAM)0, (LPARAM)0);
+ WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
if (strcmp(szProto, szMetaModuleName) == 0) { //this contact is Meta
HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index 6fb0de5458..360261f8f9 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -389,7 +389,7 @@ INT_PTR CALLBACK DlgProcPopUpOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM WORD status = i <= ID_STATUS_MAX2 ? i : ID_STATUS_MIN;
ppd.lchIcon = LoadSkinnedIcon(StatusList[Index(status)].icon);
- _tcscpy(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)NULL, GSMDF_TCHAR));
+ _tcscpy(ppd.lptzContactName, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, 0, GSMDF_TCHAR));
_tcscpy(ppd.lptzText, _T(""));
if (opt.ShowStatus)
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index ee8dbbc150..b7362ae1a5 100644 --- a/plugins/NewXstatusNotify/src/utils.cpp +++ b/plugins/NewXstatusNotify/src/utils.cpp @@ -83,7 +83,7 @@ int ProtoServiceExists(const char *szModule, const char *szService) BOOL StatusHasAwayMessage(char *szProto, int status)
{
if (szProto != NULL) {
- unsigned long iSupportsSM = (unsigned long)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAGNUM_3, (LPARAM)0);
+ unsigned long iSupportsSM = (unsigned long)CallProtoService(szProto, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0);
return (iSupportsSM & Proto_Status2Flag(status)) ? TRUE : FALSE;
}
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index d99456abe9..f80caba2f1 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -143,7 +143,7 @@ void ShowPopup(XSTATUSCHANGE *xsc) case TYPE_JABBER_ACTIVITY:
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", xsc->szProto, (xsc->type == TYPE_JABBER_MOOD) ? "mood" : "activity", "icon");
if (!DBGetContactSettingString(xsc->hContact, "AdvStatus", szSetting, &dbv)) {
- ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)dbv.pszVal);
+ ppd.lchIcon = Skin_GetIcon(dbv.pszVal);
DBFreeVariant(&dbv);
}
break;
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp index 3f89da2e53..ec307666d1 100755 --- a/plugins/New_GPG/src/icons.cpp +++ b/plugins/New_GPG/src/icons.cpp @@ -44,8 +44,8 @@ HANDLE IconLibDefine(TCHAR* desc, TCHAR* section, char* ident, HICON icon, char* void InitIconLib()
{
extern HINSTANCE hInst;
- char lib[MAX_PATH];
- GetModuleFileNameA(hInst, lib, MAX_PATH);
+ char lib[MAX_PATH];
+ GetModuleFileNameA(hInst, lib, MAX_PATH);
TCHAR *module = mir_a2t(szGPGModuleName);
IconLibDefine(_T("Secured"), module, "secured", NULL, lib, -IDI_SECURED,0);
@@ -53,30 +53,21 @@ void InitIconLib() mir_free(module);
}
-
-
-
-
HICON IconLibGetIcon(const char* ident)
{
- return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)ident);
+ return Skin_GetIcon(ident);
}
-
-
void IconLibReleaseIcon(const char* ident)
{
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)ident);
+ Skin_ReleaseIcon(ident);
}
-
-
HANDLE IconLibHookIconsChanged(MIRANDAHOOK hook)
{
- return HookEvent(ME_SKIN2_ICONSCHANGED, hook);
+ return HookEvent(ME_SKIN2_ICONSCHANGED, hook);
}
-
void setClistIcon(HANDLE hContact)
{
bool enabled = isContactSecured(hContact);
@@ -91,7 +82,7 @@ void setClistIcon(HANDLE hContact) HICON icon = IconLibGetIcon("secured");
IconExtraColumn iec = {0};
iec.cbSize = sizeof(iec);
- iec.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)icon, (LPARAM)0);
+ iec.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)icon, 0);
ExtraIcon_SetIcon(g_hCLIcon, hContact, iec.hImage);
if(hMC)
ExtraIcon_SetIcon(g_hCLIcon, hMC, iec.hImage);
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 7eb598cc16..abc1a624ec 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -610,7 +610,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) mir_free(caps); if(str.find(_T("GPG_Key_Auto_Exchange:0")) != string::npos) { - CallContactService(ccs->hContact, PSS_MESSAGE, (WPARAM)0, (LPARAM)"-----PGP KEY REQUEST-----"); + CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----"); return 0; } } diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 8a503249ec..f0a8e7a387 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -1299,7 +1299,7 @@ bool isTabsrmmUsed() enm.lParam = (LPARAM)&found; enm.pfnEnumProc = (DBSETTINGENUMPROC)&handleEnum; enm.szModule = "PluginDisable"; - if(CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)NULL, (LPARAM)&enm) == -1) + if(CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&enm) == -1) return false; return found; diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 932e462333..268c589587 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -558,7 +558,7 @@ void LoadPopupClass() ppc.flags = PCF_TCHAR;
ppc.pszName = "Nudge";
ppc.ptszDescription = LPGENT("Show Nudge");
- ppc.hIcon = (HICON) CallService(MS_SKIN2_GETICONBYHANDLE,0,(LPARAM)g_hIcon);
+ ppc.hIcon = Skin_GetIconByHandle(g_hIcon);
ppc.colorBack = NULL;
ppc.colorText = NULL;
ppc.iSeconds = 0;
@@ -628,9 +628,8 @@ void Nudge_ShowPopup(CNudgeElement n, HANDLE hContact, TCHAR * Message) else if(ServiceExists(MS_POPUP_ADDPOPUPT))
{
POPUPDATAT NudgePopUp = {0};
-
NudgePopUp.lchContact = hContact;
- NudgePopUp.lchIcon = (HICON) CallService(MS_SKIN2_GETICON,0,(LPARAM) n.hIcoLibItem );
+ NudgePopUp.lchIcon = Skin_GetIconByHandle(n.hIcoLibItem);
NudgePopUp.colorBack = 0;
NudgePopUp.colorText = 0;
NudgePopUp.iSeconds = 0;
diff --git a/plugins/Nudge/src/options.cpp b/plugins/Nudge/src/options.cpp index 2d299f1290..306e79e6f1 100644 --- a/plugins/Nudge/src/options.cpp +++ b/plugins/Nudge/src/options.cpp @@ -124,9 +124,7 @@ void CreateImageList(HWND hWnd) {
INT_PTR res = CallProtoService(n->item.ProtocolName, PS_LOADICON,PLI_PROTOCOL | PLIF_SMALL | PLIF_ICOLIB, 0);
if(res==CALLSERVICE_NOTFOUND)
- {
- res = CallService(MS_SKIN2_GETICONBYHANDLE,0,(LPARAM)n->item.hIcoLibItem);
- }
+ res = (INT_PTR)Skin_GetIconByHandle(n->item.hIcoLibItem);
HICON hIcon = (HICON) res;
ImageList_AddIcon(hImList, hIcon);
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp index 5c336358a4..ea402b2373 100644 --- a/plugins/PackUpdater/Src/Notifications.cpp +++ b/plugins/PackUpdater/Src/Notifications.cpp @@ -115,19 +115,14 @@ static VOID MakePopupAction(POPUPACTION &pa, INT id) pa.flags = PAF_ENABLED;
pa.wParam = MAKEWORD(id, BN_CLICKED);
pa.lParam = 0;
- switch (id)
- {
+ switch (id) {
case IDYES:
- {
- pa.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"btn_ok");
- strncpy_s(pa.lpzTitle, MODNAME"/Yes", SIZEOF(pa.lpzTitle));
- }
+ pa.lchIcon = Skin_GetIcon("btn_ok");
+ strncpy_s(pa.lpzTitle, MODNAME"/Yes", SIZEOF(pa.lpzTitle));
break;
case IDNO:
- {
- pa.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"btn_cancel");
- strncpy_s(pa.lpzTitle, MODNAME"/No", SIZEOF(pa.lpzTitle));
- }
+ pa.lchIcon = Skin_GetIcon("btn_cancel");
+ strncpy_s(pa.lpzTitle, MODNAME"/No", SIZEOF(pa.lpzTitle));
break;
}
}
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp index 1d58853c1c..09ba638c9e 100644 --- a/plugins/PackUpdater/Src/PackUpdater.cpp +++ b/plugins/PackUpdater/Src/PackUpdater.cpp @@ -74,7 +74,7 @@ extern "C" __declspec(dllexport) int Load(void) mi.cbSize = sizeof(mi);
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"check_update");
+ mi.hIcon = Skin_GetIcon("check_update");
mi.ptszName = _T("Check for pack updates");
mi.pszService = MODNAME"/CheckUpdates";
Menu_AddMainMenuItem(&mi);
@@ -84,7 +84,7 @@ extern "C" __declspec(dllexport) int Load(void) mi.cbSize = sizeof(mi);
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"empty_folder");
+ mi.hIcon = Skin_GetIcon("empty_folder");
mi.ptszName = _T("Clear pack updates folder");
mi.pszService = MODNAME"/EmptyFolder";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Popup/src/icons.cpp b/plugins/Popup/src/icons.cpp index b92df47a6b..32594dd464 100644 --- a/plugins/Popup/src/icons.cpp +++ b/plugins/Popup/src/icons.cpp @@ -89,7 +89,7 @@ static ICODESC icoDesc[] = **/
HICON IcoLib_GetIcon(LPCSTR pszIcon, bool big)
{
- return (pszIcon) ? (HICON)CallService(MS_SKIN2_GETICON, (WPARAM)big, (LPARAM) pszIcon) : NULL;
+ return (pszIcon) ? Skin_GetIcon(pszIcon, big) : NULL;
}
void InitIcons()
@@ -108,7 +108,7 @@ void InitIcons() if(icoDesc[i].idResource==0){
//use icon from icon lib
- sid.hDefaultIcon = (HICON)CallService(MS_SKIN2_GETICON,0 , (LPARAM)icoDesc[i].pszIcon);
+ sid.hDefaultIcon = Skin_GetIcon(icoDesc[i].pszIcon);
sid.ptszDefaultFile = NULL;
sid.iDefaultIndex = 0;
}else{
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index c52ff490d2..9b5b953315 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -281,7 +281,7 @@ void FillNotificationData(POPUPDATA2 *ppd, DWORD *disableWhen) char setting[MAXMODULELABELLENGTH];
mir_snprintf(setting, sizeof(setting), "%s_%s_%s", MODULNAME, ptd->notification.lpzGroup, ptd->notification.lpzName);
- ppd->lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)setting);
+ ppd->lchIcon = Skin_GetIcon(setting);
}
bool IsValidNotification(HANDLE hNotification)
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index a6083564cc..50656f7239 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -477,8 +477,8 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR hwndDlg,
IDC_SKINLIST,
LB_GETITEMDATA,
- (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETCURSEL,(WPARAM)0,(LPARAM)0),
- (LPARAM)0));
+ (WPARAM)SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETCURSEL,0,0),
+ 0));
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopUpOptions.SkinPack)) {
mir_free(PopUpOptions.SkinPack);
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index 94fef144c4..2b98111794 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -649,7 +649,7 @@ LRESULT CALLBACK EditProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) sztext[1]=0;
}
- SendMessage(hdlg,EM_REPLACESEL,(WPARAM)0,(LPARAM)sztext);
+ SendMessage(hdlg,EM_REPLACESEL,0,(LPARAM)sztext);
SendMessage(hdlg,WM_GETTEXT,(WPARAM)MAX_REGS(sztext),(LPARAM)sztext);
}
@@ -834,9 +834,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA FillButton(hwndDlg, IDC_MESSAGE, LPGENT("Send message"), NULL, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
if (ServiceExists(MS_VOICESERVICE_CAN_CALL))
- {
- FillButton(hwndDlg, IDC_VOICE, LPGENT("Make a voice call"), hasNewHotkeyModule ? NULL : LPGENT("Ctrl+V"), (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) "vca_call"));
- }
+ FillButton(hwndDlg, IDC_VOICE, LPGENT("Make a voice call"), hasNewHotkeyModule ? NULL : LPGENT("Ctrl+V"), Skin_GetIcon("vca_call"));
else
{
GetWindowRect(GetDlgItem(hwndDlg, IDC_VOICE), &rc);
@@ -1066,8 +1064,8 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA HWND hEdit = GetWindow(GetWindow(hwndDlg,GW_CHILD),GW_CHILD);
TCHAR sztext[120] = _T("");
- if (SendMessage(hEdit, EM_GETSEL, (WPARAM)NULL, (LPARAM)NULL) != -1)
- SendMessage(hEdit, EM_REPLACESEL, (WPARAM)0, (LPARAM)_T(""));
+ if (SendMessage(hEdit, EM_GETSEL, 0, 0) != -1)
+ SendMessage(hEdit, EM_REPLACESEL, 0, (LPARAM)_T(""));
SendMessage(hEdit, WM_GETTEXT, (WPARAM)MAX_REGS(sztext), (LPARAM)sztext);
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp index 9531268524..28611d2c7c 100644 --- a/plugins/QuickMessages/src/Utils.cpp +++ b/plugins/QuickMessages/src/Utils.cpp @@ -540,7 +540,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ci.dwFlag =CNF_FIRSTNAME|CNF_UNICODE;
ci.szProto=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)&&ci.pszVal){
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)&&ci.pszVal){
NameLenght=(int)_tcslen(ci.pszVal);
ptszName=ci.pszVal;
}
@@ -577,7 +577,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ci.dwFlag =CNF_LASTNAME|CNF_UNICODE;
- if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)&&ci.pszVal){
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)&&ci.pszVal){
NameLenght=(int)_tcslen(ci.pszVal);
ptszName=ci.pszVal;
}
diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp index 10a6ca24bd..a430ef0123 100644 --- a/plugins/Rate/src/main.cpp +++ b/plugins/Rate/src/main.cpp @@ -156,9 +156,9 @@ int onExtraImageListRebuild(WPARAM wParam, LPARAM lParam) if (ServiceExists(MS_CLIST_EXTRA_ADD_ICON))
{
- g_IECRateHigh.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"rate_high"), (LPARAM)0);
- g_IECRateMedium.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"rate_medium"), (LPARAM)0);
- g_IECRateLow.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)(HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM)"rate_low"), (LPARAM)0);
+ g_IECRateHigh.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("rate_high"), 0);
+ g_IECRateMedium.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("rate_medium"), 0);
+ g_IECRateLow.hImage = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)Skin_GetIcon("rate_low"), 0);
}
return 0;
}
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index 797129a385..a22cff3b6a 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -463,7 +463,7 @@ int Create_MenuitemShowList(void) {
CLISTMENUITEM mi = { 0 };
mi.cbSize = sizeof(mi);
- mi.hIcon = ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )"recent_main" );
+ mi.hIcon = Skin_GetIcon("recent_main");
mi.pszName = msLastUC_ShowListName;
mi.pszService = msLastUC_ShowList;
Menu_AddMainMenuItem(&mi);
@@ -471,7 +471,7 @@ int Create_MenuitemShowList(void) ZeroMemory( &mi, sizeof( mi ));
mi.cbSize = sizeof( mi );
mi.position = 0xFFFFF;
- mi.hIcon = ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )"recent_main" );
+ mi.hIcon = Skin_GetIcon("recent_main");
mi.ptszName = _T("Toggle Ignore");
mi.pszService = V_RECENTCONTACTS_TOGGLE_IGNORE;
hMenuItemRemove = Menu_AddContactMenuItem(&mi);
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;
diff --git a/plugins/SecureIM/src/crypt_icons.cpp b/plugins/SecureIM/src/crypt_icons.cpp index 34263addc8..f48e94278e 100644 --- a/plugins/SecureIM/src/crypt_icons.cpp +++ b/plugins/SecureIM/src/crypt_icons.cpp @@ -66,9 +66,9 @@ IconExtraColumn mode2iec(int mode) { int i=1+m*IEC_CNT+IEC_CL_DIS+s;
if ( g_IEC[i].hImage==(HANDLE)-1 ) {
/* g_hIEC[i] = mode2icon(mode,1);
- g_IEC[i].hImage = (HANDLE) CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)g_hIEC[i], (LPARAM)0);*/
+ g_IEC[i].hImage = (HANDLE) CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)g_hIEC[i], 0);*/
HICON icon = mode2icon(mode,1);
- g_IEC[i].hImage = (HANDLE) CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)icon, (LPARAM)0);
+ g_IEC[i].hImage = (HANDLE) CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)icon, 0);
}
return g_IEC[i];
}
diff --git a/plugins/SecureIM/src/dbevent.cpp b/plugins/SecureIM/src/dbevent.cpp index 9b7d8f10c0..7b26631502 100644 --- a/plugins/SecureIM/src/dbevent.cpp +++ b/plugins/SecureIM/src/dbevent.cpp @@ -14,7 +14,7 @@ void HistoryLog(HANDLE hContact, LPCSTR szText) { dbei.cbBlob = (int)strlen(szText) + 1;
dbei.pBlob = (PBYTE)szText;
- CallService(MS_DB_EVENT_ADD, (WPARAM)0, (LPARAM)&dbei);
+ CallService(MS_DB_EVENT_ADD, 0, (LPARAM)&dbei);
}
diff --git a/plugins/SecureIM/src/loadicons.cpp b/plugins/SecureIM/src/loadicons.cpp index 3303424626..77bcb57168 100644 --- a/plugins/SecureIM/src/loadicons.cpp +++ b/plugins/SecureIM/src/loadicons.cpp @@ -27,7 +27,7 @@ int ReloadIcons(WPARAM wParam, LPARAM lParam) {
HICON hIcon;
for (int i=0; icons[i].key; i++) {
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)icons[i].name);
+ hIcon = Skin_GetIcon(icons[i].name);
if(icons[i].tbl == TBL_IEC)
g_hIEC[icons[i].idx]=hIcon;
else
@@ -78,7 +78,7 @@ void InitIcons(void) sid.iDefaultIndex = icons[i].key;
sid.hDefaultIcon = (HICON)LoadImage(g_hIconInst, MAKEINTRESOURCE(icons[i].key), IMAGE_ICON, 16, 16, LR_SHARED);
Skin_AddIcon(&sid);
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)icons[i].name);
+ hIcon = Skin_GetIcon(icons[i].name);
if(icons[i].tbl == TBL_IEC)
g_hIEC[icons[i].idx]=hIcon;
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 841a7764a0..5d2a27215d 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -212,12 +212,12 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) { cws.szSetting = "rsa_priv";
cws.value.pbVal = (PBYTE)&priv_key;
cws.value.cpbVal = priv_len;
- CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)0, (LPARAM)&cws);
+ CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&cws);
cws.szSetting = "rsa_pub";
cws.value.pbVal = (PBYTE)&pub_key;
cws.value.cpbVal = pub_len;
- CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)0, (LPARAM)&cws);
+ CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&cws);
DBDeleteContactSetting(0, szModuleName, "rsa_priv_2048");
DBDeleteContactSetting(0, szModuleName, "rsa_pub_2048");
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 6e698a7dae..eba769f9ca 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1180,7 +1180,7 @@ void RefreshGeneralDlg(HWND hDlg, BOOL iInit) { }
hContact = db_find_next(hContact);
}
- ListView_Sort(hLV,(LPARAM)0);
+ ListView_Sort(hLV,0);
}
diff --git a/plugins/SecureIM/src/svcs_rsa.cpp b/plugins/SecureIM/src/svcs_rsa.cpp index e72221dc91..bfb954b2c5 100644 --- a/plugins/SecureIM/src/svcs_rsa.cpp +++ b/plugins/SecureIM/src/svcs_rsa.cpp @@ -167,12 +167,12 @@ unsigned __stdcall sttGenerateRSA( LPVOID param ) { cws.szSetting = "rsa_priv";
cws.value.pbVal = (PBYTE)&priv_key;
cws.value.cpbVal = priv_len;
- CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)0, (LPARAM)&cws);
+ CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&cws);
cws.szSetting = "rsa_pub";
cws.value.pbVal = (PBYTE)&pub_key;
cws.value.cpbVal = pub_len;
- CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)0, (LPARAM)&cws);
+ CallService(MS_DB_CONTACT_WRITESETTING, 0, (LPARAM)&cws);
rsa_4096=1;
diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.cpp b/plugins/SendScreenshotPlus/src/CSendEmail.cpp index 14e539ea0d..7026ae13ef 100644 --- a/plugins/SendScreenshotPlus/src/CSendEmail.cpp +++ b/plugins/SendScreenshotPlus/src/CSendEmail.cpp @@ -71,11 +71,11 @@ void CSendEmail::Send() { //ci.dwFlag = CNF_TCHAR;
ci.dwFlag = CNF_EMAIL | CNF_TCHAR;
- CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci);
+ CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci);
m_Email = mir_t2a(ci.pszVal);
ci.dwFlag = CNF_DISPLAY | CNF_TCHAR;
- CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci);
+ CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci);
m_FriendlyName = mir_t2a(ci.pszVal);
mir_free(ci.pszVal);
diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp index 788ebca4d1..819086ead7 100644 --- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp +++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp @@ -57,7 +57,7 @@ CSendHTTPServer::~CSendHTTPServer(){ //---------------------------------------------------------------------------
void CSendHTTPServer::Send() {
- if (CallService(MS_HTTP_ACCEPT_CONNECTIONS, (WPARAM)true, (LPARAM)0) != 0) {
+ if (CallService(MS_HTTP_ACCEPT_CONNECTIONS, (WPARAM)true, 0) != 0) {
Error(NULL, _T("Could not start the HTTP Server plugin."));
return;
}
diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index 2061f80d83..249227a91a 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -562,7 +562,7 @@ LRESULT TfrmMain::wmTimer(WPARAM wParam, LPARAM lParam) { #ifdef _DEBUG
OutputDebugStringA("SS Bitmap Timer Stop (CaptureDone)\r\n" );
#endif
- SendMessage(m_hWnd,UM_EVENT, (WPARAM)0, (LPARAM)EVT_CaptureDone);
+ SendMessage(m_hWnd,UM_EVENT, 0, (LPARAM)EVT_CaptureDone);
}
}
return FALSE;
@@ -809,7 +809,7 @@ void TfrmMain::btnCaptureClick() { }
else {
m_Screenshot = CaptureWindow(m_hTargetWindow, (BOOL)(m_opt_chkClientArea));
- SendMessage(m_hWnd,UM_EVENT, (WPARAM)0, (LPARAM)EVT_CaptureDone);
+ SendMessage(m_hWnd,UM_EVENT, 0, (LPARAM)EVT_CaptureDone);
}
}
@@ -1148,10 +1148,10 @@ void TfrmMain::FormClose() { m_cSend->Send();
if (m_cSend->m_bFreeOnExit) cboxSendByChange();
// Not finish delete this if events from m_opt_cboxSendBy implementet
- SendMessage(m_hWnd,UM_EVENT, (WPARAM)0, (LPARAM)EVT_CheckOpenAgain);
+ SendMessage(m_hWnd,UM_EVENT, 0, (LPARAM)EVT_CheckOpenAgain);
}
else {
- SendMessage(m_hWnd,UM_EVENT, (WPARAM)0, (LPARAM)EVT_CheckOpenAgain);
+ SendMessage(m_hWnd,UM_EVENT, 0, (LPARAM)EVT_CheckOpenAgain);
}
}
diff --git a/plugins/SendScreenshotPlus/src/mir_icolib.cpp b/plugins/SendScreenshotPlus/src/mir_icolib.cpp index 33718faf98..c3a16a43e4 100644 --- a/plugins/SendScreenshotPlus/src/mir_icolib.cpp +++ b/plugins/SendScreenshotPlus/src/mir_icolib.cpp @@ -163,7 +163,7 @@ static VOID IcoLib_CheckIconPackVersion(LPTSTR szIconPack) **/
HICON IcoLib_GetIcon(LPCSTR pszIcon, bool big)
{
- return (pszIcon) ? (HICON)CallService(MS_SKIN2_GETICON, (WPARAM)big, (LPARAM) pszIcon) : NULL;
+ return (pszIcon) ? Skin_GetIcon(pszIcon, big) : NULL;
}
/**
@@ -175,7 +175,7 @@ HICON IcoLib_GetIcon(LPCSTR pszIcon, bool big) **/
HICON IcoLib_GetIconByHandle(HANDLE hIconItem, bool big)
{
- return (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, (WPARAM)big, (LPARAM) hIconItem);
+ return Skin_GetIconByHandle(hIconItem, big);
}
/**
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 2aaa3384fb..630f9bb1f0 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -298,7 +298,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar if(session_list_recovered[0])
ses_count=256;
- SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, (WPARAM)0, 0);
+ SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, 0, 0);
LoadPosition(hdlg, "LoadDlg");
if(StartUp)
SetTimer(hdlg, TIMERID_SHOW, iDelay, NULL);
@@ -369,7 +369,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar if(LoadSessionToCombobox(hdlg,1,255,"UserSessionDsc",ses_limit)==0 && ses_count!=0)
ses_count=0;
- SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, (WPARAM)0, 0);
+ SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, 0, 0);
}
else if (ses_count>=ses_limit)
@@ -387,7 +387,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar if(session_list_recovered[0]) ses_count=256;
- SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, (WPARAM)0, 0);
+ SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, 0, 0);
}
else
{
@@ -402,7 +402,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar if(session_list_recovered[0]) ses_count=256;
- SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, (WPARAM)0, 0);
+ SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, 0, 0);
}
if (SendDlgItemMessage(hdlg, IDC_LIST, CB_GETCOUNT, 0, 0))
EnableWindow(GetDlgItem(hdlg,IDC_SESSDEL),TRUE);
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp index c9c9c9eeba..7c6d545225 100644 --- a/plugins/Sessions/Src/Options.cpp +++ b/plugins/Sessions/Src/Options.cpp @@ -177,8 +177,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) g_opHdlg=hdlg;
bOptionsInit=TRUE;
TranslateDialogDefault(hdlg);
- hMarked=(HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hibChecked);
- hNotMarked=(HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)hibNotChecked);
+ hMarked = Skin_GetIconByHandle(hibChecked);
+ hNotMarked = Skin_GetIconByHandle(hibNotChecked);
hIcon=(bChecked=IsMarkedUserDefSession(opses_count))?hMarked:hNotMarked;
@@ -234,10 +234,10 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) else if (exitmode==2) CheckDlgButton(hdlg,IDC_REXSAVE,BST_CHECKED);
LoadSessionToCombobox (hdlg,1,255,"UserSessionDsc",0);
- if(SendDlgItemMessage(hdlg, IDC_LIST, CB_GETCOUNT, (WPARAM)0, 0))
+ if(SendDlgItemMessage(hdlg, IDC_LIST, CB_GETCOUNT, 0, 0))
{
EnableWindow(GetDlgItem(hdlg,IDC_EDIT),TRUE);
- SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, (WPARAM)0, 0);
+ SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, 0, 0);
if (!OpLoadSessionContacts(0,opses_count))
EnableWindow(GetDlgItem(hdlg,IDC_DEL),FALSE);
}
@@ -451,10 +451,10 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) opses_count=0;
- if(SendDlgItemMessage(hdlg, IDC_LIST, CB_GETCOUNT, (WPARAM)0, 0))
+ if(SendDlgItemMessage(hdlg, IDC_LIST, CB_GETCOUNT, 0, 0))
{
EnableWindow(GetDlgItem(hdlg,IDC_EDIT),TRUE);
- SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, (WPARAM)0, 0);
+ SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, 0, 0);
if (!OpLoadSessionContacts(0,opses_count))
EnableWindow(GetDlgItem(hdlg,IDC_DEL),FALSE);
}
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp index 8ac041e7e9..93e7849c2c 100644 --- a/plugins/Sessions/Src/Utils.cpp +++ b/plugins/Sessions/Src/Utils.cpp @@ -441,7 +441,7 @@ int LoadSessionToCombobox (HWND hdlg,BOOL mode,int iLimit,char* pszSetting,int i else
{
SendDlgItemMessage(hdlg, IDC_LIST, CB_INSERTSTRING, 0, (LPARAM)pszBuffer);
- SendDlgItemMessage(hdlg, IDC_LIST, CB_SETITEMDATA, (WPARAM)0, (LPARAM) (DWORD)i+iFirstNum);
+ SendDlgItemMessage(hdlg, IDC_LIST, CB_SETITEMDATA, 0, (LPARAM) (DWORD)i+iFirstNum);
}
mir_free(pszBuffer);
pszBuffer=NULL;
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 705b860cc5..1861034b62 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -194,8 +194,8 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP if (dat->hAwayMsgEvent) UnhookEvent(dat->hAwayMsgEvent);
Utils_SaveWindowPosition(hwndDlg, dat->hContact, "SRAway", "AwayMsgDlg");
WindowList_Remove(hWindowList, hwndDlg);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, NULL));
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, NULL));
mir_free(dat);
break;
}
@@ -399,7 +399,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) }
}
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hAwayMsgMenuItem, (LPARAM)&clmi);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)clmi.hIcon, (LPARAM)0);
+ Skin_ReleaseIcon(clmi.hIcon);
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden)
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 96a62fc6cf..ca92ffbd7c 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1284,61 +1284,61 @@ static INT_PTR ChangeStatusMsg(WPARAM wParam, LPARAM lParam) static INT_PTR SetOfflineStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_OFFLINE, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_OFFLINE, 0);
return 0;
}
static INT_PTR SetOnlineStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_ONLINE, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_ONLINE, 0);
return 0;
}
static INT_PTR SetAwayStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_AWAY, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_AWAY, 0);
return 0;
}
static INT_PTR SetDNDStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_DND, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_DND, 0);
return 0;
}
static INT_PTR SetNAStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_NA, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_NA, 0);
return 0;
}
static INT_PTR SetOccupiedStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_OCCUPIED, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_OCCUPIED, 0);
return 0;
}
static INT_PTR SetFreeChatStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_FREECHAT, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_FREECHAT, 0);
return 0;
}
static INT_PTR SetInvisibleStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_INVISIBLE, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_INVISIBLE, 0);
return 0;
}
static INT_PTR SetOnThePhoneStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_ONTHEPHONE, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_ONTHEPHONE, 0);
return 0;
}
static INT_PTR SetOutToLunchStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_OUTTOLUNCH, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_OUTTOLUNCH, 0);
return 0;
}
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index 4a0dddfc20..c03ec64576 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -78,7 +78,7 @@ HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags) HIMAGELIST himlIcons = ImageList_Create(16, 16, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, num_icons, 0);
HICON hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_OFFLINE);
ImageList_AddIcon(himlIcons, hicon);
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)hicon, (WPARAM)0);
+ Skin_ReleaseIcon(hicon);
statusicon_nr[0] = 0;
int j = 1;
@@ -88,7 +88,7 @@ HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags) {
hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_ONLINE + i);
ImageList_AddIcon(himlIcons, hicon);
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)hicon, (WPARAM)0);
+ Skin_ReleaseIcon(hicon);
statusicon_nr[i + 1] = j;
j++;
}
@@ -208,10 +208,10 @@ HWND WINAPI CreateStatusComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) }
if (!(data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS))
- SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)16);
+ SendMessage(handle, CB_SETITEMHEIGHT, 0, (LPARAM)16);
else
{
- SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)18);
+ SendMessage(handle, CB_SETITEMHEIGHT, 0, (LPARAM)18);
SendMessage(handle, CBEM_SETIMAGELIST, 0, (LPARAM)data->status_icons);
}
SetWindowPos(handle, NULL, 11, 11, 112, 20, SWP_NOACTIVATE);
@@ -424,7 +424,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) SendMessage(handle, CB_SETDROPPEDWIDTH, (WPARAM)250, 0);
}
SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)16);
- SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)16);
+ SendMessage(handle, CB_SETITEMHEIGHT, 0, (LPARAM)16);
if (((data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) && !found && !data->num_def_msgs)
EnableWindow(handle, FALSE);
@@ -888,8 +888,8 @@ void ChangeDlgStatus(HWND hwndDlg, struct MsgBoxData *msgbox_data, int iStatus) else if (iStatus > ID_STATUS_CURRENT)
iStatus = GetCurrentStatus(NULL);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)) , 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)));
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)));
if (!bDisabled && ((Proto_Status2Flag(iStatus) & msgbox_data->m_iStatusMsgModes)
|| (iStatus == ID_STATUS_OFFLINE && (Proto_Status2Flag(ID_STATUS_INVISIBLE) & msgbox_data->m_iStatusMsgModes))))
@@ -1784,8 +1784,8 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA ReleaseIconEx("predef");
ReleaseIconEx("add");
ReleaseIconEx("clear");
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, 0));
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT1), GWLP_WNDPROC, (LONG_PTR)MainDlgProc);
if (msgbox_data)
diff --git a/plugins/SimpleStatusMsg/src/utils.cpp b/plugins/SimpleStatusMsg/src/utils.cpp index 549dd957bc..013d8e5971 100644 --- a/plugins/SimpleStatusMsg/src/utils.cpp +++ b/plugins/SimpleStatusMsg/src/utils.cpp @@ -72,7 +72,7 @@ HICON LoadIconEx(const char* name) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "SimpleStatusMsg_%s", name);
- return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName);
}
HANDLE GetIconHandle(int iconId)
@@ -86,7 +86,7 @@ void ReleaseIconEx(const char* name) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "SimpleStatusMsg_%s", name);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ Skin_ReleaseIcon(szSettingName);
}
HANDLE HookEventEx(const char *szEvent, MIRANDAHOOK hookProc)
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 9e97737f8c..8a232a3e23 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -57,7 +57,7 @@ int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf) HICON GetDefaultIcon(bool copy)
{
- HICON resIco = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"SmileyAdd_ButtonSmiley");
+ HICON resIco = Skin_GetIcon("SmileyAdd_ButtonSmiley");
if ( resIco == NULL || resIco == (HICON)CALLSERVICE_NOTFOUND )
{
resIco = (HICON)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_SMILINGICON),
@@ -68,7 +68,7 @@ HICON GetDefaultIcon(bool copy) if (copy)
{
resIco = (HICON)CopyImage(resIco, IMAGE_ICON, 0, 0, 0);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)"SmileyAdd_ButtonSmiley");
+ Skin_ReleaseIcon("SmileyAdd_ButtonSmiley");
}
}
diff --git a/plugins/SplashScreen/src/services.cpp b/plugins/SplashScreen/src/services.cpp index 7d4730c8f3..d9981d7f2e 100644 --- a/plugins/SplashScreen/src/services.cpp +++ b/plugins/SplashScreen/src/services.cpp @@ -67,7 +67,7 @@ INT_PTR TestService(WPARAM wParam,LPARAM lParam) ofn.lpstrDefExt = _T("");
if (GetOpenFileName(&ofn))
- CallService(MS_SHOWSPLASH,(WPARAM)szTempPath,(LPARAM)0);
+ CallService(MS_SHOWSPLASH,(WPARAM)szTempPath,0);
return 0;
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp index d4527e8091..00cc8ab90b 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp @@ -265,7 +265,7 @@ static int changeState(TAAAProtoSetting& setting, STATES newState) log_debugA("%s state change: %s -> %s", setting.szName,
status2descr(setting.oldState), status2descr(setting.curState));
- NotifyEventHooks(hStateChangedEvent, (WPARAM)0, (LPARAM)(AUTOAWAYSETTING*)&setting);
+ NotifyEventHooks(hStateChangedEvent, 0, (LPARAM)(AUTOAWAYSETTING*)&setting);
if ( setting.curState != SET_ORGSTATUS && setting.curState != ACTIVE && setting.statusChanged ) {
/* change the awaymessage */
if (setting.szMsg != NULL) {
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp index a4101b1b88..f9599f7b4d 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp @@ -207,8 +207,8 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM flags = 0;
// clear box and add new status, loop status and check if compatible with proto
- SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_RESETCONTENT, (WPARAM)0, (LPARAM)0);
- SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_RESETCONTENT, (WPARAM)0, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_RESETCONTENT, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_RESETCONTENT, 0, 0);
for ( i=0; i < SIZEOF(statusModeList); i++ ) {
if ( (flags & statusModePf2List[i]) || statusModePf2List[i] == PF2_OFFLINE || bSettingSame ) {
TCHAR *statusMode = ( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR );
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index d7d4ae0230..396fd04963 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -888,8 +888,8 @@ static void CheckContinueslyFunction(void *arg) return;
}
log_infoA("KeepStatus: connection lost! (continuesly check)");
- NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_LOST, (LPARAM)NULL);
- ProcessPopup(KS_CONN_STATE_LOST, (LPARAM)NULL);
+ NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_LOST, 0);
+ ProcessPopup(KS_CONN_STATE_LOST, 0);
maxRetries = DBGetContactSettingByte(NULL, MODULENAME, SETTING_MAXRETRIES, 0);
if (maxRetries == 0)
maxRetries = -1;
@@ -989,8 +989,8 @@ static int ProcessPopup(int reason, LPARAM lParam) }
if (DBGetContactSettingByte(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) {
CallProtoService(ps[i]->szName, PS_GETNAME, sizeof(protoName), (LPARAM)protoName);
- //_snprintf(protoInfoLine, sizeof(protoInfoLine), Translate("%s\t(will be set to %s)\r\n"), protoName, (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)ps[i]->status, (LPARAM)0));
- _snprintf(protoInfoLine, sizeof(protoInfoLine), "%s\t(%s %s)\r\n", protoName, Translate("will be set to"), (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)ps[i]->status, (LPARAM)0));
+ //_snprintf(protoInfoLine, sizeof(protoInfoLine), Translate("%s\t(will be set to %s)\r\n"), protoName, (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)ps[i]->status, 0));
+ _snprintf(protoInfoLine, sizeof(protoInfoLine), "%s\t(%s %s)\r\n", protoName, Translate("will be set to"), (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)ps[i]->status, 0));
strncat(protoInfo, protoInfoLine, sizeof(protoInfo)-strlen(protoInfo)-1);
}
}
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index 410412072c..2584043769 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -148,7 +148,7 @@ static char* GetLinkDescription(TSettingsList& protoSettings) else if ( protoSettings[i].status == ID_STATUS_CURRENT )
status = Translate("<current>");
else if ( protoSettings[i].status >= MIN_STATUS && protoSettings[i].status <= MAX_STATUS )
- status = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)protoSettings[i].status, (LPARAM)0);
+ status = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)protoSettings[i].status, 0);
if (status == NULL)
status = "<unknown>";
@@ -967,12 +967,12 @@ static int ClearDatabase(char* filter) dbces.szModule = MODULENAME;
dbces.lParam = (LPARAM)&settingCount;
dbces.pfnEnumProc = CountSettings;
- CallService(MS_DB_CONTACT_ENUMSETTINGS,(WPARAM)NULL,(LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces);
settings = ( char** )malloc(settingCount*sizeof(char*));
dbces.lParam = (LPARAM)&settings;
dbces.pfnEnumProc = DeleteSetting;
- CallService(MS_DB_CONTACT_ENUMSETTINGS,(WPARAM)NULL,(LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces);
for (i=0; i < settingCount; i++) {
if ((filter == NULL) || (!strncmp(filter, settings[i], strlen(filter))))
DBDeleteContactSetting(NULL, MODULENAME, settings[i]);
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp index 8db3ce577b..0381de0b69 100644 --- a/plugins/StatusPlugins/confirmdialog.cpp +++ b/plugins/StatusPlugins/confirmdialog.cpp @@ -92,7 +92,7 @@ static INT_PTR CALLBACK StatusMessageDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam break;
case IDC_CANCEL:
- SendMessage(GetParent(hwndDlg), UM_STSMSGDLGCLOSED, (WPARAM)0, 0);
+ SendMessage(GetParent(hwndDlg), UM_STSMSGDLGCLOSED, 0, 0);
EndDialog(hwndDlg, IDC_CANCEL);
break;
}
@@ -351,7 +351,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARA flags = CallProtoService(proto->szName, PS_GETCAPS,PFLAGNUM_2,0)&~CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
// clear box and add new status, loop status and check if compatible with proto
- SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_RESETCONTENT, (WPARAM)0, (LPARAM)0);
+ SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_RESETCONTENT, 0, 0);
actualStatus = proto->status;
// last
diff --git a/plugins/StopSpamPlus/src/opt_proto.cpp b/plugins/StopSpamPlus/src/opt_proto.cpp index cfdfe0b991..bb56aca7ba 100644 --- a/plugins/StopSpamPlus/src/opt_proto.cpp +++ b/plugins/StopSpamPlus/src/opt_proto.cpp @@ -60,10 +60,10 @@ INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) HICON Icon;
Icon=(HICON)LoadSkinnedIcon(SKINICON_OTHER_NOTICK);
ImageList_AddIcon(himlCheckBoxes, Icon);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)Icon, 0);
+ Skin_ReleaseIcon(Icon);
Icon=(HICON)LoadSkinnedIcon(SKINICON_OTHER_TICK);
ImageList_AddIcon(himlCheckBoxes, Icon);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)Icon, 0);
+ Skin_ReleaseIcon(Icon);
TreeView_SetImageList(hwndProto, himlCheckBoxes, TVSIL_NORMAL);
}
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)
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index bf673f2da3..a5a9b59bfe 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -441,9 +441,9 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa iGender = DBGetContactSettingByte(pwd->hContact, szProto, "Gender", 0);
if (iGender == GEN_FEMALE)
- pwd->extraIcons[i].hIcon = (HICON)CallService(MS_SKIN2_GETICON, NULL, (LPARAM)"UserInfoEx_common_female");
+ pwd->extraIcons[i].hIcon = Skin_GetIcon("UserInfoEx_common_female");
else if (iGender == GEN_MALE)
- pwd->extraIcons[i].hIcon = (HICON)CallService(MS_SKIN2_GETICON, NULL, (LPARAM)"UserInfoEx_common_male");
+ pwd->extraIcons[i].hIcon = Skin_GetIcon("UserInfoEx_common_male");
}
pwd->extraIcons[i].bDestroy = false;
}
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 83d2408d74..4ba14de1e3 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -1003,7 +1003,7 @@ HICON GetJabberActivityIcon(HANDLE hContact, char *szProto) mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", szProto, "activity", "icon");
if (!DBGetContactSettingString(hContact, "AdvStatus", szSetting, &dbv))
{
- hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)dbv.pszVal);
+ hIcon = Skin_GetIcon(dbv.pszVal);
DBFreeVariant(&dbv);
}
diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp index 763b94277a..1ff2709e7e 100644 --- a/plugins/TranslitSwitcher/src/Layoutproc.cpp +++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp @@ -487,7 +487,7 @@ VOID SwitchLayout(BOOL lastword) ZeroMemory(&pd, sizeof(pd));
pd.cbSize = sizeof(POPUPDATAT_V2);
pd.lchContact = NULL; //(HANDLE)wParam;
- pd.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM) "SwitchLayout and Send");
+ pd.lchIcon = Skin_GetIcon("SwitchLayout and Send");
lstrcpyn(pd.lptzText, buf, SIZEOF(pd.lptzText));
lstrcpyn(pd.lptzContactName, TranslateT("TranslitSwitcher"), SIZEOF(pd.lptzContactName));
pd.colorBack = pd.colorText = 0;
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp index dec2567866..6b321181fd 100644 --- a/plugins/UserInfoEx/src/init.cpp +++ b/plugins/UserInfoEx/src/init.cpp @@ -238,7 +238,7 @@ extern "C" INT __declspec(dllexport) Load(void) ZeroMemory(&myGlobals, sizeof(MGLOBAL));
// init clist interface
- pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, (LPARAM)0);
+ pcli = (CLIST_INTERFACE*)CallService(MS_CLIST_RETRIEVE_INTERFACE, 0, 0);
// init new miranda timezone interface
mir_getTMI(&tmi);
diff --git a/plugins/Utils/mir_icons.cpp b/plugins/Utils/mir_icons.cpp index 00adda0614..9af9f2a3d2 100644 --- a/plugins/Utils/mir_icons.cpp +++ b/plugins/Utils/mir_icons.cpp @@ -32,22 +32,22 @@ HICON IcoLib_LoadIcon(const char *iconName, BOOL copy) if (iconName == NULL || iconName[0] == 0)
return NULL;
- HICON hIcon = (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) iconName);
+ HICON hIcon = Skin_GetIcon(iconName);
if (copy && hIcon != NULL) {
hIcon = CopyIcon(hIcon);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM) hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
return hIcon;
}
void IcoLib_ReleaseIcon(const char *iconName)
{
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM) iconName);
+ Skin_ReleaseIcon(iconName);
}
void IcoLib_ReleaseIcon(HICON hIcon)
{
- CallService(MS_SKIN2_RELEASEICON, (WPARAM) hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
HANDLE IcoLib_Register(char *name, char *section, char *description, int id)
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index bdc4b9af60..1e525d8d5c 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -195,7 +195,7 @@ TCHAR* getContactInfoT(BYTE type, HANDLE hContact) ci.cbSize = sizeof(CONTACTINFO);
ci.hContact = hContact;
ci.dwFlag = type | CNF_UNICODE;
- CallService(MS_CONTACT_GETCONTACTINFO, (WPARAM)0, (LPARAM)&ci);
+ CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM)&ci);
memset(szVal, '\0', sizeof(szVal));
switch(ci.type)
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index 8b852b7f6c..1fabf8fa49 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -1188,7 +1188,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l urd.cbSize = sizeof(urd);
urd.hInstance = hInst;
urd.hwndDlg = hwndDlg;
- urd.lParam = (LPARAM)0;
+ urd.lParam = 0;
// ! uses ANSI version !
urd.lpTemplate = MAKEINTRESOURCEA(IDD_HELP_DIALOG);
urd.pfnResizer = helpDialogResize;
@@ -1315,14 +1315,8 @@ INT_PTR getSkinItemService(WPARAM wParam, LPARAM lParam) switch (item) {
case VSI_HELPICON:
- if (hHelpIcon == NULL) {
- if (ServiceExists(MS_SKIN2_GETICON))
- hHelpIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"vars_help");
-
- if (hHelpIcon == NULL)
- hHelpIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_V), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0);
- }
-
+ if (hHelpIcon == NULL)
+ hHelpIcon = Skin_GetIcon("vars_help");
return (INT_PTR)hHelpIcon;
case VSI_HELPTIPTEXT:
diff --git a/plugins/Variables/src/tokenregister.cpp b/plugins/Variables/src/tokenregister.cpp index 0418c3024f..7a7bbcf95f 100644 --- a/plugins/Variables/src/tokenregister.cpp +++ b/plugins/Variables/src/tokenregister.cpp @@ -209,7 +209,7 @@ TCHAR *parseFromRegister(ARGUMENTSINFO *ai) if (thisVr->flags & TRF_PARSEFUNC )
callRes = (INT_PTR)thisVr->parseFunction( &cAi );
else if (thisVr->szService != NULL)
- callRes = CallService( thisVr->szService, (WPARAM)0, (LPARAM)&cAi );
+ callRes = CallService( thisVr->szService, 0, (LPARAM)&cAi );
for ( j=0; j < cAi.argc; j++ )
if (cAi.argv[j] != NULL)
@@ -223,7 +223,7 @@ TCHAR *parseFromRegister(ARGUMENTSINFO *ai) if (thisVr->flags & TRF_PARSEFUNC )
callRes = (INT_PTR)thisVr->parseFunctionT( ai );
else if (thisVr->szService != NULL)
- callRes = CallService( thisVr->szService, (WPARAM)0, (LPARAM)ai );
+ callRes = CallService( thisVr->szService, 0, (LPARAM)ai );
if ((TCHAR*)callRes != NULL)
res = mir_tstrdup((TCHAR*)callRes );
diff --git a/plugins/WhenWasIt/src/icons.cpp b/plugins/WhenWasIt/src/icons.cpp index 0b24c21442..ffa5e1e9ee 100644 --- a/plugins/WhenWasIt/src/icons.cpp +++ b/plugins/WhenWasIt/src/icons.cpp @@ -95,12 +95,11 @@ int AddIcons() AddIcon(hiImportBirthdays, "ImportBirthdays", "Import birthdays");
AddIcon(hiExportBirthdays, "ExportBirthdays", "Export birthdays");
- int i;
char name[1024];
char description[1024];
AddIcon(hiDTB[0], "DTB0", "Birthday today");
AddIcon(hiDTB[1], "DTB1", "1 day to birthday");
- for (i = 2; i < cDTB; i++) {
+ for (int i = 2; i < cDTB; i++) {
sprintf(name, "DTB%d", i);
sprintf(description, "%d days to birthday", i);
AddIcon(hiDTB[i], name, description);
@@ -112,7 +111,7 @@ int AddIcons() HICON GetIcon(char *name)
{
- return (HICON) CallService(MS_SKIN2_GETICON, 0, (LPARAM) name);
+ return Skin_GetIcon(name);
}
void FreeIcon(HICON &icon)
@@ -125,58 +124,50 @@ void FreeIcons() {
static int bFreed = 0;
if (!bFreed)
+ {
+ FreeIcon(hiCheckMenu);
+ FreeIcon(hiListMenu);
+ FreeIcon(hiAddBirthdayContact);
+ FreeIcon(hiRefreshUserDetails);
+
+ FreeIcon(hiImportBirthdays);
+ FreeIcon(hiExportBirthdays);
+
+ int i;
+ for (i = 0; i < cDTB; i++)
{
-// FreeIcon(hiDlg);
- FreeIcon(hiCheckMenu);
- FreeIcon(hiListMenu);
- FreeIcon(hiAddBirthdayContact);
- FreeIcon(hiRefreshUserDetails);
-
- FreeIcon(hiImportBirthdays);
- FreeIcon(hiExportBirthdays);
-
- int i;
- for (i = 0; i < cDTB; i++)
- {
- FreeIcon(hiDTB[i]);
- }
- FreeIcon(hiDTBMore);
+ FreeIcon(hiDTB[i]);
}
+ FreeIcon(hiDTBMore);
+ }
bFreed = 1; //only free them once (ours).
}
int GetIcons()
{
- if (ServiceExists(MS_SKIN2_GETICON))
- {
- //FreeIcons();
-// hiDlgIcon = Get("Dlg");
- hiCheckMenu = GetIcon("MenuCheck");
- hiListMenu = GetIcon("MenuList");
- hiAddBirthdayContact = GetIcon("AddBirthday");
- hiRefreshUserDetails = GetIcon("RefreshUserDetails");
-
- hiImportBirthdays = GetIcon("ImportBirthdays");
- hiExportBirthdays = GetIcon("ExportBirthdays");
-
- int i;
- char buffer[1024];
- for (i = 0; i < cDTB; i++)
- {
- sprintf(buffer, "DTB%d", i);
- hiDTB[i] = GetIcon(buffer);
- }
- hiDTBMore = GetIcon("DTBMore");
- }
+ hiCheckMenu = GetIcon("MenuCheck");
+ hiListMenu = GetIcon("MenuList");
+ hiAddBirthdayContact = GetIcon("AddBirthday");
+ hiRefreshUserDetails = GetIcon("RefreshUserDetails");
+
+ hiImportBirthdays = GetIcon("ImportBirthdays");
+ hiExportBirthdays = GetIcon("ExportBirthdays");
+
+ char buffer[1024];
+ for (int i = 0; i < cDTB; i++)
+ {
+ sprintf(buffer, "DTB%d", i);
+ hiDTB[i] = GetIcon(buffer);
+ }
+ hiDTBMore = GetIcon("DTBMore");
return 0;
}
HICON GetDTBIcon(int dtb)
{
if ((dtb >= cDTB) || (dtb < 0))
- {
- return hiDTBMore;
- }
+ return hiDTBMore;
+
return hiDTB[dtb];
}
@@ -188,9 +179,8 @@ HICON GetDABIcon(int dab) HANDLE GetClistIcon(int dtb)
{
if (dtb >= cDTB)
- {
- return hClistImages[cDTB];
- }
+ return hClistImages[cDTB];
+
return hClistImages[dtb];
}
@@ -198,19 +188,16 @@ HANDLE RebuildCListIcon(HICON icon) {
INT_PTR tmp = CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM) icon, 0);
if (tmp != CALLSERVICE_NOTFOUND)
- {
- return (HANDLE) tmp;
- }
+ return (HANDLE) tmp;
+
return (HANDLE) -1;
}
int RebuildAdvIconList()
{
- int i;
- for (i = 0; i < cDTB; i++)
- {
- hClistImages[i] = RebuildCListIcon(hiDTB[i]);
- }
+ for (int i = 0; i < cDTB; i++)
+ hClistImages[i] = RebuildCListIcon(hiDTB[i]);
+
hClistImages[cDTB] = RebuildCListIcon(hiDTBMore);
return 0;
}
diff --git a/plugins/YAPP/src/notify_imp.cpp b/plugins/YAPP/src/notify_imp.cpp index 54a0fddf34..131df92bf7 100644 --- a/plugins/YAPP/src/notify_imp.cpp +++ b/plugins/YAPP/src/notify_imp.cpp @@ -16,7 +16,7 @@ int Popup2Show(WPARAM wParam, LPARAM lParam) { memset(pd_out, 0, sizeof(PopupData));
PostMPMessage(MUM_CREATEPOPUP, (WPARAM)hNotify, (LPARAM)pd_out);
- PostMPMessage(MUM_NMUPDATE, (WPARAM)hNotify, (LPARAM)0);
+ PostMPMessage(MUM_NMUPDATE, (WPARAM)hNotify, 0);
return 0;
}
@@ -26,12 +26,12 @@ INT_PTR svcPopup2Show(WPARAM wParam, LPARAM lParam) { int Popup2Update(WPARAM wParam, LPARAM lParam) {
HANDLE hNotify = (HANDLE)lParam;
- PostMPMessage(MUM_NMUPDATE, (WPARAM)hNotify, (LPARAM)0);
+ PostMPMessage(MUM_NMUPDATE, (WPARAM)hNotify, 0);
return 0;
}
int AvatarChanged(WPARAM wParam, LPARAM lParam) {
- PostMPMessage(MUM_NMAVATAR, (WPARAM)0, (LPARAM)0);
+ PostMPMessage(MUM_NMAVATAR, 0, 0);
return 0;
}
@@ -42,7 +42,7 @@ INT_PTR svcPopup2Update(WPARAM wParam, LPARAM lParam) { int Popup2Remove(WPARAM wParam, LPARAM lParam) {
HANDLE hNotify = (HANDLE)lParam;
- PostMPMessage(MUM_NMREMOVE, (WPARAM)hNotify, (LPARAM)0);
+ PostMPMessage(MUM_NMREMOVE, (WPARAM)hNotify, 0);
return 0;
}
diff --git a/plugins/YAPP/src/options.cpp b/plugins/YAPP/src/options.cpp index fe231b18b2..848dbec76c 100644 --- a/plugins/YAPP/src/options.cpp +++ b/plugins/YAPP/src/options.cpp @@ -187,7 +187,7 @@ static INT_PTR CALLBACK DlgProcOpts1(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR char *strptr;
int i = 0;
for (; i < 10; i++) {
- strptr = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)(ID_STATUS_OFFLINE + i), (LPARAM)0);
+ strptr = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)(ID_STATUS_OFFLINE + i), 0);
lvI.pszText = mir_a2t(strptr);
lvI.iItem = i;
ListView_InsertItem(hwndList, &lvI);
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp index d17de17fbd..82fd942d5b 100644 --- a/plugins/helpers/gen_helpers.cpp +++ b/plugins/helpers/gen_helpers.cpp @@ -107,7 +107,7 @@ static int WriteToDebugLogA(const char *szMsg) { int res = 0;
if (ServiceExists(MS_NETLIB_LOG))
- res = CallService(MS_NETLIB_LOG, (WPARAM)NULL, (LPARAM)szMsg);
+ res = CallService(MS_NETLIB_LOG, 0, (LPARAM)szMsg);
else {
OutputDebugStringA(szMsg);
OutputDebugStringA("\r\n");
diff --git a/plugins/mTextControl/src/services.cpp b/plugins/mTextControl/src/services.cpp index 33a92cb9a1..5f2ce42f52 100644 --- a/plugins/mTextControl/src/services.cpp +++ b/plugins/mTextControl/src/services.cpp @@ -55,7 +55,7 @@ void MText_InitFormatting1(TextObject *text) { bbCodeParse(text->ftd);
// smilies
-// HWND hwnd = (HWND)CallServiceSync(MS_TEXT_CREATEPROXY, (WPARAM)text, (LPARAM)0);
+// HWND hwnd = (HWND)CallServiceSync(MS_TEXT_CREATEPROXY, (WPARAM)text, 0);
HWND hwnd = CreateProxyWindow(text->ftd->getTextService());
SMADD_RICHEDIT3 sm = {0};
sm.cbSize = sizeof(sm);
@@ -281,7 +281,7 @@ MTI_MTextSendMessage (HWND hwnd, HANDLE text, UINT msg, WPARAM wParam, LPARAM lP if (hwnd && (msg == WM_MOUSEMOVE)) {
HDC hdc = GetDC(hwnd);
- ((TextObject *)text)->ftd->getTextService()->OnTxSetCursor(DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, NULL, LOWORD((LPARAM)0), HIWORD((LPARAM)0));
+ ((TextObject *)text)->ftd->getTextService()->OnTxSetCursor(DVASPECT_CONTENT, 0, NULL, NULL, hdc, NULL, NULL, LOWORD(0), HIWORD(0));
ReleaseDC(hwnd, hdc);
}
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index 09f7ba4ab1..17c8fc3a88 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -758,7 +758,7 @@ void __cdecl CAimProto::get_online_msg_thread(void* arg) sendBroadcast(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
DBFreeVariant(&dbv);
}
- else sendBroadcast(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)0);
+ else sendBroadcast(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
HANDLE __cdecl CAimProto::GetAwayMsg(HANDLE hContact)
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 085c7335d7..cec3df5708 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -101,7 +101,7 @@ HICON LoadIconEx(const char* name, bool big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "AIM_%s", name);
- return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName, big);
}
HANDLE GetIconHandle(const char* name)
@@ -116,7 +116,7 @@ void ReleaseIconEx(const char* name, bool big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName ), "%s_%s", "AIM", name);
- CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ Skin_ReleaseIcon(szSettingName, big);
}
void WindowSetIcon(HWND hWnd, const char* name)
@@ -127,8 +127,8 @@ void WindowSetIcon(HWND hWnd, const char* name) void WindowFreeIcon(HWND hWnd)
{
- CallService(MS_SKIN2_RELEASEICON, SendMessage(hWnd, WM_SETICON, ICON_BIG, 0), 0);
- CallService(MS_SKIN2_RELEASEICON, SendMessage(hWnd, WM_SETICON, ICON_SMALL, 0), 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hWnd, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(hWnd, WM_SETICON, ICON_SMALL, 0));
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 0acff0f36f..f5d04fc343 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -608,7 +608,7 @@ void FacebookProto::ProcessFriendRequests( void* ) *pCurBlob = '\0'; pCurBlob++; // E-mail
*pCurBlob = '\0'; // Reason
- CallService(MS_DB_EVENT_ADD, (WPARAM)NULL, (LPARAM)&dbei);
+ CallService(MS_DB_EVENT_ADD, 0, (LPARAM)&dbei);
LOG(" (New) Friendship request from: %s (%s) [%s]", fbu->real_name.c_str(), fbu->user_id.c_str(), time.c_str());
} else {
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index c2d7a39151..f0b9b7af90 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -145,7 +145,7 @@ HICON FacebookProto::GetIcon(int index) {
if (LOWORD(index) == PLI_PROTOCOL)
{
- HICON ico = (HICON)CallService(MS_SKIN2_GETICON,0,(LPARAM)"Facebook_facebook");
+ HICON ico = Skin_GetIcon("Facebook_facebook");
return CopyIcon(ico);
} else {
return 0;
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 1fdbeace0b..128eb72759 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -82,8 +82,7 @@ void InitIcons(void) sid.iDefaultIndex = -icons[i].defIconID;
hIconLibItem[i] = Skin_AddIcon(&sid);
} else { // External icons
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_GETICONHANDLE,0,
- (LPARAM)icons[i].section);
+ hIconLibItem[i] = Skin_GetIconHandle(icons[i].section);
}
}
}
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index cdee390581..da85d86399 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -207,7 +207,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = NULL;
if ((uin = atoi(gch->pszUID)) && (hContact = getcontact(uin, 1, 0, NULL)))
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)0);
+ CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
}
char* pszText = mir_t2a(gch->ptszText);
netlog("gg_gc_event(): Unhandled event %d, chat %x, uin %d, text \"%s\".", gch->pDest->iType, chat, uin, pszText);
diff --git a/protocols/Gadu-Gadu/src/icolib.cpp b/protocols/Gadu-Gadu/src/icolib.cpp index f99540ac76..bc83381e6a 100644 --- a/protocols/Gadu-Gadu/src/icolib.cpp +++ b/protocols/Gadu-Gadu/src/icolib.cpp @@ -77,7 +77,7 @@ HICON LoadIconEx(const char* name, BOOL big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", GGDEF_PROTO, name);
- return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName, big);
}
HANDLE GetIconHandle(int iconId)
@@ -93,7 +93,7 @@ void ReleaseIconEx(const char* name, BOOL big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", GGDEF_PROTO, name);
- CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ Skin_ReleaseIcon(szSettingName, big);
}
void WindowSetIcon(HWND hWnd, const char* name)
@@ -104,6 +104,6 @@ void WindowSetIcon(HWND hWnd, const char* name) void WindowFreeIcon(HWND hWnd)
{
- CallService(MS_SKIN2_RELEASEICONBIG, SendMessage(hWnd, WM_SETICON, ICON_BIG, 0), 0);
- CallService(MS_SKIN2_RELEASEICON, SendMessage(hWnd, WM_SETICON, ICON_SMALL, 0), 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hWnd, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(hWnd, WM_SETICON, ICON_SMALL, 0));
}
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index 53770f0bcd..50a8a6ac54 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -84,7 +84,7 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)gginst->hInstanceMenuItem, (LPARAM)&mi);
if (mi.hIcon)
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)mi.hIcon, 0);
+ Skin_ReleaseIcon(mi.hIcon);
}
if (items > 1)
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 94bb460db9..4d189ce3bb 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -78,7 +78,7 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, cle.ptszTooltip = szNick;
cle.lParam = (LPARAM)pdci;
- if ( CallService( MS_CLIST_GETEVENT, (WPARAM)hContact, (LPARAM)0))
+ if ( CallService( MS_CLIST_GETEVENT, (WPARAM)hContact, 0))
CallService( MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)"dccchat");
CallService( MS_CLIST_ADDEVENT,(WPARAM) hContact,(LPARAM) &cle);
}
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index 9ff2a1c851..eb40452d47 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -928,7 +928,7 @@ int CIrcProto::SetStatusInternal( int iNewStatus, bool bIsInternal ) msn.tszInfo = TranslateT( "Connection can not be established! You have not completed all necessary fields (Nickname, User ID and m_name)." );
msn.dwInfoFlags = NIIF_ERROR | NIIF_INTERN_UNICODE;
msn.uTimeout = 15000;
- CallService( MS_CLIST_SYSTRAY_NOTIFY, (WPARAM)NULL,(LPARAM) &msn);
+ CallService( MS_CLIST_SYSTRAY_NOTIFY, 0,(LPARAM) &msn);
return 0;
}
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 4576574da4..25fcc1a971 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -251,7 +251,7 @@ HICON LoadIconEx( int iconId, bool big ) {
for ( int i=0; i < SIZEOF(iconList); i++ )
if ( iconList[i].defIconID == iconId )
- return ( HICON )CallService( MS_SKIN2_GETICONBYHANDLE, big, (LPARAM)hIconLibItems[i] );
+ return Skin_GetIconByHandle(hIconLibItems[i], big);
return NULL;
}
@@ -267,7 +267,8 @@ HANDLE GetIconHandle( int iconId ) void ReleaseIconEx( HICON hIcon )
{
- if ( hIcon ) CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ if (hIcon)
+ Skin_ReleaseIcon(hIcon);
}
void WindowSetIcon( HWND hWnd, int iconId )
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index e3b363ac15..64c7086355 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -813,7 +813,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam,LPARAM lParam) acs.handleType = HANDLE_SEARCHRESULT;
acs.szProto = m_szModuleName;
acs.psr = &psr;
- CallService( MS_ADDCONTACT_SHOW, (WPARAM)NULL, (LPARAM)&acs);
+ CallService( MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
}
break;
case 31: //slap
diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp index 83ac7ae60f..a665eb205c 100644 --- a/protocols/IRCG/src/tools.cpp +++ b/protocols/IRCG/src/tools.cpp @@ -608,7 +608,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const TCHAR* pszWindow, const TCHAR* pszN else
gce.time = timestamp;
gce.bIsMe = bIsMe;
- return CallChatEvent((WPARAM)0, (LPARAM)&gce);
+ return CallChatEvent(0, (LPARAM)&gce);
}
CMString CIrcProto::ModeToStatus(int sMode)
diff --git a/protocols/IRCG/src/ui_utils.cpp b/protocols/IRCG/src/ui_utils.cpp index d7c8e4b6b6..b9e264d3c7 100644 --- a/protocols/IRCG/src/ui_utils.cpp +++ b/protocols/IRCG/src/ui_utils.cpp @@ -558,7 +558,8 @@ CCtrlMButton::CCtrlMButton( CDlgBase* dlg, int ctrlId, int iCoreIcon, const char CCtrlMButton::~CCtrlMButton()
{
- if ( m_hIcon ) CallService( MS_SKIN2_RELEASEICON, (WPARAM)m_hIcon, 0 );
+ if (m_hIcon)
+ Skin_ReleaseIcon(m_hIcon);
}
void CCtrlMButton::OnInit()
diff --git a/protocols/IRCG/src/ui_utils.h b/protocols/IRCG/src/ui_utils.h index 60566ce913..a6d55fe1cb 100644 --- a/protocols/IRCG/src/ui_utils.h +++ b/protocols/IRCG/src/ui_utils.h @@ -113,7 +113,7 @@ typedef struct tagLVSETINFOTIP #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
#define LVM_MAPINDEXTOID (LVM_FIRST + 180)
#define ListView_MapIndexToID(hwnd, index) \
- (UINT)SendMessage((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
+ (UINT)SendMessage((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, 0)
#define TreeView_GetLineColor(hwnd) \
(COLORREF)SendMessage((hwnd), TVM_GETLINECOLOR, 0, 0)
#define TreeView_SetLineColor(hwnd, clr) \
diff --git a/protocols/IcqOscarJ/src/iconlib.cpp b/protocols/IcqOscarJ/src/iconlib.cpp index 7c93bae17a..1f08c42646 100644 --- a/protocols/IcqOscarJ/src/iconlib.cpp +++ b/protocols/IcqOscarJ/src/iconlib.cpp @@ -80,13 +80,13 @@ HANDLE IcqIconHandle_s::Handle() HICON IcqIconHandle_s::GetIcon(bool big)
{
if (this)
- return (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, big, (LPARAM)hIcoLib);
+ return Skin_GetIconByHandle(hIcoLib, big);
return NULL;
}
void IcqIconHandle_s::ReleaseIcon(bool big)
{
- CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szName);
+ Skin_ReleaseIcon(szName, big);
}
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index 6e61f2bc0d..c7027a54ee 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -608,7 +608,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HANDLE hContac NetLog_Server("%s has removed Avatar.", strUID(dwUIN, szUID));
deleteSetting(hContact, "AvatarHash");
- BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, (LPARAM)NULL);
+ BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
#ifdef _DEBUG
else
@@ -634,7 +634,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HANDLE hContac NetLog_Hash(this, "new", pAvatarHash, cbAvatarHash);
#endif
setSettingBlob(hContact, "AvatarHash", pAvatarHash, cbAvatarHash);
- BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, (LPARAM)NULL);
+ BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
else
{ // the file was lost, request avatar again
@@ -737,7 +737,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HANDLE hContac setSettingBlob(hContact, "AvatarHash", pAvatarHash, cbAvatarHash);
- BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, (LPARAM)NULL);
+ BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
if (bAutoLoad)
{ // auto-load is on, so request the avatar now, otherwise we are done
@@ -759,7 +759,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HANDLE hContac NetLog_Server("%s has removed Avatar.", strUID(dwUIN, szUID));
deleteSetting(hContact, "AvatarHash");
- BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, (LPARAM)NULL);
+ BroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
#ifdef _DEBUG
else
diff --git a/protocols/IcqOscarJ/src/icq_opts.cpp b/protocols/IcqOscarJ/src/icq_opts.cpp index 44c1881d14..83dea01ea9 100644 --- a/protocols/IcqOscarJ/src/icq_opts.cpp +++ b/protocols/IcqOscarJ/src/icq_opts.cpp @@ -413,7 +413,7 @@ static INT_PTR CALLBACK DlgProcIcqFeaturesOpts(HWND hwndDlg, UINT msg, WPARAM wP ComboBoxAddStringUtf(GetDlgItem(hwndDlg, IDC_UTFCODEPAGE), LPGEN("System default codepage"), 0);
EnumSystemCodePagesA(FillCpCombo, CP_INSTALLED);
if(sCodePage == 0)
- SendDlgItemMessage(hwndDlg, IDC_UTFCODEPAGE, CB_SETCURSEL, (WPARAM)0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_UTFCODEPAGE, CB_SETCURSEL, 0, 0);
else
{
for (int i = 0; i < SendDlgItemMessage(hwndDlg, IDC_UTFCODEPAGE, CB_GETCOUNT, 0, 0); i++)
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp index b2adc4831c..4afdeae7e4 100644 --- a/protocols/IcqOscarJ/src/icq_servlist.cpp +++ b/protocols/IcqOscarJ/src/icq_servlist.cpp @@ -940,12 +940,12 @@ static int GroupReserveIdsEnumProc(const char *szSetting,LPARAM lParam) cgs.szModule = param->szModule;
cgs.szSetting = szSetting;
cgs.pValue = &dbv;
- if (CallService(MS_DB_CONTACT_GETSETTINGSTATIC,(WPARAM)NULL,(LPARAM)&cgs))
+ if (CallService(MS_DB_CONTACT_GETSETTINGSTATIC,0,(LPARAM)&cgs))
{ // we failed to read setting, try also utf8 - DB bug
dbv.type = DBVT_UTF8;
dbv.pszVal = val;
dbv.cchVal = MAX_PATH;
- if (CallService(MS_DB_CONTACT_GETSETTINGSTATIC,(WPARAM)NULL,(LPARAM)&cgs))
+ if (CallService(MS_DB_CONTACT_GETSETTINGSTATIC,0,(LPARAM)&cgs))
return 0; // we failed also, invalid setting
}
if (dbv.type != DBVT_ASCIIZ)
@@ -989,7 +989,7 @@ void CIcqProto::LoadServerIDs() dbces.pfnEnumProc = &GroupReserveIdsEnumProc;
dbces.szModule = szModule;
dbces.lParam = (LPARAM)¶m;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)NULL, (LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces);
nGroups = nServerIDListCount - nStart;
@@ -1472,7 +1472,7 @@ void CIcqProto::removeGroupPathLinks(WORD wGroupID) dbces.szModule = szModule;
dbces.lParam = (LPARAM)pars;
- if (!CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)NULL, (LPARAM)&dbces))
+ if (!CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces))
{ // we found some links, remove them
char** list = (char**)pars[0];
while (list)
@@ -1838,7 +1838,7 @@ char* CIcqProto::getServListUniqueGroupName(const char *szGroupName, int bAlloce dbces.szModule = szModule;
dbces.lParam = (LPARAM)pars;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)NULL, (LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces);
if (pars[1])
{ // the groupname already exists, create another
diff --git a/protocols/IcqOscarJ/src/icq_uploadui.cpp b/protocols/IcqOscarJ/src/icq_uploadui.cpp index f5e5c937b3..20285b193f 100644 --- a/protocols/IcqOscarJ/src/icq_uploadui.cpp +++ b/protocols/IcqOscarJ/src/icq_uploadui.cpp @@ -169,7 +169,7 @@ static int GroupEnumIdsEnumProc(const char *szSetting,LPARAM lParam) cgs.szModule=(char*)lParam;
cgs.szSetting=szSetting;
cgs.pValue=&dbv;
- if(CallService(MS_DB_CONTACT_GETSETTINGSTATIC,(WPARAM)NULL,(LPARAM)&cgs))
+ if(CallService(MS_DB_CONTACT_GETSETTINGSTATIC,0,(LPARAM)&cgs))
return 0; // this converts all string types to DBVT_ASCIIZ
if(dbv.type!=DBVT_ASCIIZ)
{ // it is not a cached server-group name
@@ -195,7 +195,7 @@ static void enumServerGroups(CIcqProto* ppro) dbces.szModule = szModule;
dbces.lParam = (LPARAM)szModule;
- CallService(MS_DB_CONTACT_ENUMSETTINGS, (WPARAM)NULL, (LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces);
}
static DWORD sendUploadGroup(CIcqProto* ppro, WORD wAction, WORD wGroupId, char* szItemName)
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index f29a827313..689ace5b09 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -163,7 +163,7 @@ char *CIconPool::GetIcolibName(const char *name) HICON CIconPool::GetIcon(const char *name, bool big)
{
if (CPoolItem *item = FindItemByName(name))
- return (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, big, (LPARAM)item->m_hIcolibItem);
+ return Skin_GetIconByHandle(item->m_hIcolibItem, big);
return NULL;
}
@@ -188,7 +188,7 @@ HANDLE CIconPool::GetClistHandle(const char *name) if (item->m_hClistItem)
return item->m_hClistItem;
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)item->m_hIcolibItem);
+ HICON hIcon = Skin_GetIconByHandle(item->m_hIcolibItem);
item->m_hClistItem = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)hIcon, 0);
g_ReleaseIcon(hIcon);
return item->m_hClistItem;
@@ -310,7 +310,7 @@ HICON CJabberProto::LoadIconEx( const char* name, bool big ) char szSettingName[100];
mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", m_szModuleName, name );
- return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
+ return Skin_GetIcon(szSettingName, big);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -408,7 +408,7 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa if (hi && nf) DestroyIcon(hi);
if ( IconName != NULL && SectName != NULL) {
sid.cbSize = sizeof(sid);
- sid.hDefaultIcon = (has_proto_icon)?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,(WPARAM)NULL,(LPARAM)(-internalidx));
+ sid.hDefaultIcon = (has_proto_icon)?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,0,(LPARAM)(-internalidx));
sid.ptszSection = SectName;
sid.pszName = IconName;
sid.ptszDescription = Description;
@@ -417,7 +417,7 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa sid.flags = SIDF_TCHAR;
Skin_AddIcon(&sid);
}
- return ((HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IconName));
+ return Skin_GetIcon(IconName);
}
static HICON LoadSmallIcon(HINSTANCE hInstance, LPCTSTR lpIconName)
@@ -706,12 +706,13 @@ HICON g_LoadIconEx( const char* name, bool big ) {
char szSettingName[100];
mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", GLOBAL_SETTING_PREFIX, name );
- return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
+ return Skin_GetIcon(szSettingName, big);
}
void g_ReleaseIcon( HICON hIcon )
{
- if ( hIcon ) CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ if (hIcon)
+ Skin_ReleaseIcon(hIcon);
}
void ImageList_AddIcon_Icolib( HIMAGELIST hIml, HICON hIcon )
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 6bc4c1f8c8..e13a56864d 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -843,7 +843,7 @@ void CJabberProto::MenuInit() mir_snprintf(srvFce, sizeof(srvFce), "%s/menuSetPriority/0", m_szModuleName);
bool needServices = !ServiceExists(srvFce);
if ( needServices )
- JCreateServiceParam(svcName, &CJabberProto::OnMenuSetPriority, (LPARAM)0);
+ JCreateServiceParam(svcName, &CJabberProto::OnMenuSetPriority, 0);
int steps[] = { 10, 5, 1, 0, -1, -5, -10 };
for (int i = 0; i < SIZEOF(steps); ++i) {
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 6817435d7f..2596b5d648 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -788,7 +788,7 @@ private: }
if ( bIsError )
- SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)NULL);
+ SendMessage(hwnd, WM_JABBER_REFRESH, 0, 0);
}
};
@@ -2273,7 +2273,7 @@ void CJabberDlgAccMgrUI::QueryServerListThread(void *arg) if ( result )
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)result);
if ( bIsError )
- SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)NULL);
+ SendMessage(hwnd, WM_JABBER_REFRESH, 0, 0);
}
INT_PTR CJabberProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 636cf50bf6..a78f1fbd37 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -924,7 +924,7 @@ void CJabberDlgPrivacyLists::OnProtoRefresh(WPARAM, LPARAM) SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_RESETCONTENT, 0, 0 );
LRESULT nItemId = SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_ADDSTRING, 0, (LPARAM)TranslateT( "<none>" ));
- SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_SETITEMDATA, nItemId, (LPARAM)NULL );
+ SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_SETITEMDATA, nItemId, 0 );
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = m_proto->m_privacyListManager.GetFirstList();
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index e242294a16..ad8d204951 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -173,7 +173,7 @@ void CJabberProto::OnIqResultGetSearchFields( HXML iqNode ) const TCHAR* szFrom = xmlGetAttrValue( iqNode, _T("from"));
if (szFrom)
SearchAddToRecent(szFrom,searchHandleDlg);
- PostMessage(searchHandleDlg,WM_USER+10,(WPARAM)0,(LPARAM)0);
+ PostMessage(searchHandleDlg,WM_USER+10,0,0);
ShowWindow(searchHandleDlg,SW_SHOW);
}
else if ( !lstrcmp( type, _T("error"))) {
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 6344751ead..420852ae43 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -538,7 +538,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI( WPARAM wParam, LPARAM l acs.handleType = HANDLE_SEARCHRESULT;
acs.szProto = m_szModuleName;
acs.psr = &jsr.hdr;
- CallService( MS_ADDCONTACT_SHOW, (WPARAM)NULL, (LPARAM)&acs );
+ CallService( MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs );
}
return 0;
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 9d8b476851..cc7c0257e8 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -327,8 +327,7 @@ static void sttFillAdvStatusInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM h mir_sntprintf(szText, 2047, _T("%s (%s)"), TranslateTS(szAdvStatusTitle), szAdvStatusText);
else
mir_sntprintf(szText, 2047, _T("%s"), TranslateTS(szAdvStatusTitle));
- sttFillInfoLine( hwndTree, htiRoot, (HICON)CallService(MS_SKIN2_GETICON, 0,
- (LPARAM)szAdvStatusIcon), szTitle, szText, dwInfoLine);
+ sttFillInfoLine( hwndTree, htiRoot, Skin_GetIcon(szAdvStatusIcon), szTitle, szText, dwInfoLine);
}
mir_free(szAdvStatusIcon);
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index d15cae2bcd..5078d7c5c0 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1985,7 +1985,7 @@ void CJabberInfoFrame::PaintCompact(HDC hdc) {
if (item.m_hIcolibIcon)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)item.m_hIcolibIcon);
+ HICON hIcon = Skin_GetIconByHandle(item.m_hIcolibIcon);
if (hIcon)
{
DrawIconEx(hdc, SZ_FRAMEPADDING, (rc.bottom-cy_icon)/2, hIcon, cx_icon, cy_icon, 0, NULL, DI_NORMAL);
@@ -1999,7 +1999,7 @@ void CJabberInfoFrame::PaintCompact(HDC hdc) {
if (item.m_hIcolibIcon)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)item.m_hIcolibIcon);
+ HICON hIcon = Skin_GetIconByHandle(item.m_hIcolibIcon);
if (hIcon)
{
SetRect(&item.m_rcItem, cx, (rc.bottom-cy_icon)/2, cx+cx_icon, (rc.bottom-cy_icon)/2+cy_icon);
@@ -2049,7 +2049,7 @@ void CJabberInfoFrame::PaintNormal(HDC hdc) if (item.m_hIcolibIcon)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)item.m_hIcolibIcon);
+ HICON hIcon = Skin_GetIconByHandle(item.m_hIcolibIcon);
if (hIcon)
{
DrawIconEx(hdc, cx, cy + (line_height-cy_icon)/2, hIcon, cx_icon, cy_icon, 0, NULL, DI_NORMAL);
diff --git a/protocols/JabberG/src/ui_utils.h b/protocols/JabberG/src/ui_utils.h index 9af9e8ba36..05a7090710 100644 --- a/protocols/JabberG/src/ui_utils.h +++ b/protocols/JabberG/src/ui_utils.h @@ -110,7 +110,7 @@ typedef struct tagLVSETINFOTIP #define LVGF_HEADER 0x00000001
#define LVGF_GROUPID 0x00000010
#define ListView_MapIndexToID(hwnd, index) \
- (UINT)SendMessage((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
+ (UINT)SendMessage((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, 0)
#define TreeView_GetLineColor(hwnd) \
(COLORREF)SendMessage((hwnd), TVM_GETLINECOLOR, 0, 0)
#define TreeView_SetLineColor(hwnd, clr) \
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index 78989906ee..463c24d3ad 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -449,7 +449,7 @@ DWORD MraAvatarsHttpTransaction(HANDLE hConnection, DWORD dwRequestType, LPSTR l if (dwSent == SOCKET_ERROR || !dwSent)
return GetLastError();
- pnlhr = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_RECVHTTPHEADERS, (WPARAM)hConnection, (LPARAM)0);
+ pnlhr = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_RECVHTTPHEADERS, (WPARAM)hConnection, 0);
if (!pnlhr)
return GetLastError();
@@ -479,7 +479,7 @@ DWORD MraAvatarsHttpTransaction(HANDLE hConnection, DWORD dwRequestType, LPSTR l }
if (pdwResultCode) (*pdwResultCode) = pnlhr->resultCode;
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, (WPARAM)0, (LPARAM)pnlhr);
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)pnlhr);
return 0;
}
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 0e6753fb7d..fa3ad2c779 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -669,7 +669,7 @@ DWORD CMraProto::MraCommandDispatcher(mrim_packet_header_t *pmaHeader, DWORD *pd dbei.cbBlob = dwStringSize;
dbei.pBlob = btBuff;
- CallService(MS_DB_EVENT_ADD, (WPARAM)NULL, (LPARAM)&dbei);
+ CallService(MS_DB_EVENT_ADD, 0, (LPARAM)&dbei);
}
GetContactBasicInfoW(hContact, NULL, NULL, NULL, &dwTemp, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, 0, NULL);
@@ -2014,7 +2014,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, MRA_LPS *pl dbei.pBlob = (PBYTE)btBuff;
CreateBlobFromContact(ccs.hContact, lpwszMessage, dwMessageSize, btBuff, SIZEOF(btBuff), (size_t*)&dbei.cbBlob);
- CallService(MS_DB_EVENT_ADD, (WPARAM)NULL, (LPARAM)&dbei);
+ CallService(MS_DB_EVENT_ADD, 0, (LPARAM)&dbei);
MraAuthorize(plpsFrom->lpszData, plpsFrom->dwSize);
}
else {
diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp index 4930db54d6..ce3a667eaa 100644 --- a/protocols/MSN/src/msn_lists.cpp +++ b/protocols/MSN/src/msn_lists.cpp @@ -596,7 +596,7 @@ INT_PTR CALLBACK DlgProcMsnServLists(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT);
ImageList_AddIcon(hIml, hIcon);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
hIcon = LoadIconEx("list_lc");
ImageList_AddIcon(hIml, hIcon);
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index b92e21ee5b..7eed67a3ce 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -80,7 +80,7 @@ HICON LoadIconEx(const char* name, bool big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "MSN_%s", name);
- return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName, big);
}
HANDLE GetIconHandle(int iconId)
@@ -96,7 +96,7 @@ void ReleaseIconEx(const char* name, bool big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "MSN_%s", name);
- CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ Skin_ReleaseIcon(szSettingName, big);
}
INT_PTR CALLBACK DlgProcMsnServLists(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 7dfceb6f53..229aaf3673 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -696,7 +696,7 @@ void __cdecl CMsnProto::MsnGetAwayMsgThread(void* arg) SendBroadcast(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, (LPARAM)dbv.ptszVal);
MSN_FreeVariant(&dbv);
}
- else SendBroadcast(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, (LPARAM)0);
+ else SendBroadcast(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, 0);
mir_free(inf);
}
diff --git a/protocols/NewsAggregator/Src/Icons.cpp b/protocols/NewsAggregator/Src/Icons.cpp index 16b782fd3c..5cd94ff76d 100644 --- a/protocols/NewsAggregator/Src/Icons.cpp +++ b/protocols/NewsAggregator/Src/Icons.cpp @@ -66,7 +66,7 @@ HICON LoadIconEx(const char* name, BOOL big) {
char szSettingName[100];
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", MODULE, name);
- return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName, big);
}
HANDLE GetIconHandle(const char* name)
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 51e4bdf599..9386bd787d 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -114,7 +114,7 @@ HICON OmegleProto::GetIcon(int index) {
if(LOWORD(index) == PLI_PROTOCOL)
{
- HICON ico = (HICON)CallService(MS_SKIN2_GETICON,0,(LPARAM)"Omegle_omegle");
+ HICON ico = Skin_GetIcon("Omegle_omegle");
return CopyIcon(ico);
} else {
return 0;
diff --git a/protocols/Omegle/src/theme.cpp b/protocols/Omegle/src/theme.cpp index d7f7fc7e9b..216e2fd98b 100644 --- a/protocols/Omegle/src/theme.cpp +++ b/protocols/Omegle/src/theme.cpp @@ -75,8 +75,7 @@ void InitIcons(void) sid.iDefaultIndex = -icons[i].defIconID;
hIconLibItem[i] = Skin_AddIcon(&sid);
} else { // External icons
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_GETICONHANDLE,0,
- (LPARAM)icons[i].section);
+ hIconLibItem[i] = Skin_GetIconHandle(icons[i].section);
}
}
}
diff --git a/protocols/Quotes/src/IconLib.cpp b/protocols/Quotes/src/IconLib.cpp index b131aa7009..530d1defd3 100644 --- a/protocols/Quotes/src/IconLib.cpp +++ b/protocols/Quotes/src/IconLib.cpp @@ -88,7 +88,7 @@ std::string Quotes_MakeIconName(const char* name) HICON Quotes_LoadIconEx(const char* name,bool bBig /*= false*/)
{
std::string sIconName = Quotes_MakeIconName(name);
- return reinterpret_cast<HICON>(CallService( MS_SKIN2_GETICON,((bBig) ? 1 : 0),reinterpret_cast<LPARAM>(sIconName.c_str())));
+ return Skin_GetIcon(sIconName.c_str(), bBig);
}
HANDLE Quotes_GetIconHandle(int iconId)
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index c5469ebfb0..fdbd6e55e3 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -111,14 +111,14 @@ static HANDLE GetIconHandle(int iconId) { HICON GetIcolibIcon(int iconId) {
HANDLE handle = GetIconHandle(iconId);
- if (handle != NULL) {
- return (HICON) CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)handle);
- }
+ if (handle != NULL)
+ return Skin_GetIconByHandle(handle);
+
return NULL;
}
void ReleaseIcolibIcon(HICON hIcon) {
- CallService( MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0 );
+ Skin_ReleaseIcon(hIcon);
}
/*
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index 8acf004681..07de0e6b58 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -337,7 +337,7 @@ static void TlenRemoveAvatarRequestThread(void *ptr) { mir_free(req->pData);
mir_free(req);
if (resp != NULL) {
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, (WPARAM)0, (LPARAM)resp);
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)resp);
RemoveAvatar(data->proto, NULL);
}
mir_free(data);
@@ -357,7 +357,7 @@ static void TlenUploadAvatarRequestThread(void *ptr) { NETLIBHTTPREQUEST *req = data->req;
resp = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)data->proto->hNetlibUser, (LPARAM)req);
if (resp != NULL) {
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, (WPARAM)0, (LPARAM)resp);
+ CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)resp);
SetAvatar(data->proto, NULL, NULL, data->data, data->length, PA_FORMAT_PNG);
}
mir_free(req->szUrl);
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index 78a53f47be..fcceb6881c 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -175,7 +175,7 @@ void TwitterProto::GetAwayMsgWorker(void *hContact) ProtoBroadcastAck(m_szModuleName,hContact,ACKTYPE_AWAYMSG,ACKRESULT_SUCCESS, (HANDLE)1,(LPARAM)dbv.ptszVal);
DBFreeVariant(&dbv);
}
- else ProtoBroadcastAck(m_szModuleName,hContact,ACKTYPE_AWAYMSG,ACKRESULT_FAILED, (HANDLE)1,(LPARAM)0);
+ else ProtoBroadcastAck(m_szModuleName,hContact,ACKTYPE_AWAYMSG,ACKRESULT_FAILED, (HANDLE)1,0);
}
HANDLE TwitterProto::GetAwayMsg(HANDLE hContact)
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 2b1e60a8f9..0a43711390 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -136,7 +136,7 @@ HICON TwitterProto::GetIcon(int index) {
if(LOWORD(index) == PLI_PROTOCOL)
{
- HICON ico = (HICON)CallService(MS_SKIN2_GETICON,0,(LPARAM)"Twitter_twitter");
+ HICON ico = Skin_GetIcon("Twitter_twitter");
return CopyIcon(ico);
}
else
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 11dea3cb44..1dc7e1cc78 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -78,8 +78,7 @@ void InitIcons(void) }
else // External icons
{
- hIconLibItem[i] = (HANDLE)CallService(MS_SKIN2_GETICONHANDLE,0,
- (LPARAM)icons[i].section);
+ hIconLibItem[i] = Skin_GetIconHandle(icons[i].section);
}
}
}
diff --git a/protocols/Weather/src/weather_contacts.cpp b/protocols/Weather/src/weather_contacts.cpp index 9111ea3d92..fe9179867c 100644 --- a/protocols/Weather/src/weather_contacts.cpp +++ b/protocols/Weather/src/weather_contacts.cpp @@ -409,10 +409,10 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa case WM_DESTROY:
wndData = (CntSetWndDataType*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)wndData->hFile, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)wndData->hRename, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)wndData->hSrchAll, 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)wndData->hUserDetail, 0);
+ Skin_ReleaseIcon(wndData->hFile);
+ Skin_ReleaseIcon(wndData->hRename);
+ Skin_ReleaseIcon(wndData->hSrchAll);
+ Skin_ReleaseIcon(wndData->hUserDetail);
mir_free(wndData);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, 0);
diff --git a/protocols/Weather/src/weather_icons.cpp b/protocols/Weather/src/weather_icons.cpp index 791f9c7a2d..3f52cdc25a 100644 --- a/protocols/Weather/src/weather_icons.cpp +++ b/protocols/Weather/src/weather_icons.cpp @@ -68,7 +68,7 @@ HICON LoadIconEx(const char* name, BOOL big) {
char szSettingName[100];
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", WEATHERPROTONAME, name);
- return (HICON)CallService(MS_SKIN2_GETICON, big, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName, big);
}
HANDLE GetIconHandle(const char* name)
@@ -82,5 +82,5 @@ HANDLE GetIconHandle(const char* name) void ReleaseIconEx(HICON hIcon)
{
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
}
diff --git a/protocols/Weather/src/weather_mwin.cpp b/protocols/Weather/src/weather_mwin.cpp index c5fa204f85..a9561e29c6 100644 --- a/protocols/Weather/src/weather_mwin.cpp +++ b/protocols/Weather/src/weather_mwin.cpp @@ -238,7 +238,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara DeleteObject(hfnt);
}
EndPaint(hwnd, &ps);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ Skin_ReleaseIcon(hIcon);
DBFreeVariant(&dbv);
}
break;
diff --git a/protocols/Weather/src/weather_popup.cpp b/protocols/Weather/src/weather_popup.cpp index 6b6b1d4ebd..134cb973fa 100644 --- a/protocols/Weather/src/weather_popup.cpp +++ b/protocols/Weather/src/weather_popup.cpp @@ -145,7 +145,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa return TRUE;
case UM_FREEPLUGINDATA:
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)PUGetPluginData(hWnd), 0);
+ Skin_ReleaseIcon((HICON)PUGetPluginData(hWnd));
return FALSE;
}
diff --git a/protocols/Weather/src/weather_userinfo.cpp b/protocols/Weather/src/weather_userinfo.cpp index 0374b801cc..be964dceea 100644 --- a/protocols/Weather/src/weather_userinfo.cpp +++ b/protocols/Weather/src/weather_userinfo.cpp @@ -114,7 +114,7 @@ INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa break;
case WM_DESTROY:
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendDlgItemMessage(hwndDlg, IDC_INFOICON, STM_SETICON, 0, 0), 0);
+ Skin_ReleaseIcon((HICON)SendDlgItemMessage(hwndDlg, IDC_INFOICON, STM_SETICON, 0, 0));
DeleteObject((HFONT)SendDlgItemMessage(hwndDlg, IDC_INFO2, WM_GETFONT, 0, 0));
break;
diff --git a/protocols/YAMN/src/account.cpp b/protocols/YAMN/src/account.cpp index d1de8b8e4c..f45dcfadcd 100644 --- a/protocols/YAMN/src/account.cpp +++ b/protocols/YAMN/src/account.cpp @@ -1084,7 +1084,7 @@ INT_PTR DeleteAccountSvc(WPARAM wParam,LPARAM lParam) //1. set stop signal
StopSignalFcn(Which);
- WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_STOPACCOUNT,(WPARAM)Which,(LPARAM)0);
+ WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_STOPACCOUNT,(WPARAM)Which,0);
if (Plugin->Fcn->StopAccountFcnPtr!=NULL)
Plugin->Fcn->StopAccountFcnPtr(Which);
@@ -1141,7 +1141,7 @@ DWORD WINAPI DeleteAccountInBackground(LPVOID Value) {
HACCOUNT Which=(HACCOUNT)Value;
WaitForSingleObject(Which->UsingThreads->Event,INFINITE);
- CallService(MS_YAMN_DELETEPLUGINACCOUNT,(WPARAM)Which,(LPARAM)0);
+ CallService(MS_YAMN_DELETEPLUGINACCOUNT,(WPARAM)Which,0);
return 0;
}
@@ -1161,7 +1161,7 @@ int StopAccounts(HYAMNPROTOPLUGIN Plugin) {
//2. set stop signal
StopSignalFcn(Finder);
- WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_STOPACCOUNT,(WPARAM)Finder,(LPARAM)0);
+ WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_STOPACCOUNT,(WPARAM)Finder,0);
if (Plugin->Fcn->StopAccountFcnPtr!=NULL)
Plugin->Fcn->StopAccountFcnPtr(Finder);
}
@@ -1233,7 +1233,7 @@ int DeleteAccounts(HYAMNPROTOPLUGIN Plugin) for (Finder=Plugin->FirstAccount;Finder!=NULL;)
{
HACCOUNT Next = Finder->Next;
- DeletePluginAccountSvc((WPARAM)Finder,(LPARAM)0);
+ DeletePluginAccountSvc((WPARAM)Finder,0);
Finder = Next;
}
@@ -1279,7 +1279,7 @@ void WINAPI SetStatusFcn(HACCOUNT Which,TCHAR *Value) DebugLog(SynchroFile,"\tSetStatus:AccountStatusCS-cs enter\n");
#endif
lstrcpy(Which->Status,Value);
- WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_CHANGESTATUS,(WPARAM)Which,(LPARAM)0);
+ WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_CHANGESTATUS,(WPARAM)Which,0);
#ifdef DEBUG_SYNCHRO
DebugLog(SynchroFile,"\tSetStatus:AccountStatusCS-cs done\n");
#endif
diff --git a/protocols/YAMN/src/browser/badconnect.cpp b/protocols/YAMN/src/browser/badconnect.cpp index 785508d066..6f11151ee3 100644 --- a/protocols/YAMN/src/browser/badconnect.cpp +++ b/protocols/YAMN/src/browser/badconnect.cpp @@ -26,7 +26,7 @@ LRESULT CALLBACK BadConnectPopUpProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPa ZeroMemory(&si,sizeof(si));
si.cb=sizeof(si);
- ActualAccount=(HACCOUNT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,(LPARAM)0);
+ ActualAccount=(HACCOUNT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
#ifdef DEBUG_SYNCHRO
DebugLog(SynchroFile,"PopUpProc:LEFTCLICK:ActualAccountSO-read wait\n");
#endif
diff --git a/protocols/YAMN/src/browser/mailbrowser.cpp b/protocols/YAMN/src/browser/mailbrowser.cpp index 15b24d0356..4f1f5593d6 100644 --- a/protocols/YAMN/src/browser/mailbrowser.cpp +++ b/protocols/YAMN/src/browser/mailbrowser.cpp @@ -340,7 +340,7 @@ int UpdateMails(HWND hDlg,HACCOUNT ActualAccount,DWORD nflags,DWORD nnflags) #ifdef DEBUG_SYNCHRO
DebugLog(SynchroFile,"UpdateMails:ActualAccountSO-read wait failed\n");
#endif
- PostMessage(hDlg,WM_DESTROY,(WPARAM)0,(LPARAM)0);
+ PostMessage(hDlg,WM_DESTROY,0,0);
return UPDATE_FAIL;
}
@@ -359,7 +359,7 @@ int UpdateMails(HWND hDlg,HACCOUNT ActualAccount,DWORD nflags,DWORD nnflags) #endif
ReadDoneFcn(ActualAccount->AccountAccessSO);
- PostMessage(hDlg,WM_DESTROY,(WPARAM)0,(LPARAM)0);
+ PostMessage(hDlg,WM_DESTROY,0,0);
return UPDATE_FAIL;
}
#ifdef DEBUG_SYNCHRO
@@ -422,7 +422,7 @@ int UpdateMails(HWND hDlg,HACCOUNT ActualAccount,DWORD nflags,DWORD nnflags) sprintf(TitleStrA,Translate(MAILBROWSERTITLE),ActualAccount->Name,MN.Real.DisplayUC+MN.Virtual.DisplayUC,MN.Real.Display+MN.Virtual.Display);
MultiByteToWideChar(CP_ACP,MB_USEGLYPHCHARS,TitleStrA,-1,TitleStrW,(int)strlen(TitleStrA)+1);
- SendMessageW(hDlg,WM_SETTEXT,(WPARAM)0,(LPARAM)TitleStrW);
+ SendMessageW(hDlg,WM_SETTEXT,0,(LPARAM)TitleStrW);
delete[] TitleStrA;
delete[] TitleStrW;
}
@@ -588,7 +588,7 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb {
item.iSubItem=0;
item.pszText=FromStr;
- item.iItem=SendMessageW(hListView,LVM_INSERTITEMW,(WPARAM)0,(LPARAM)&item);
+ item.iItem=SendMessageW(hListView,LVM_INSERTITEMW,0,(LPARAM)&item);
item.iSubItem=1;
item.pszText=(NULL!=UnicodeHeader.Subject ? UnicodeHeader.Subject : (WCHAR*)L"");
@@ -723,7 +723,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR if ((MN->Real.BrowserUC+MN->Virtual.BrowserUC==0) && (hDlg!=NULL))
{
if (!IsWindowVisible(hDlg) && !(nflags & YAMN_ACC_MSG))
- PostMessage(hDlg,WM_DESTROY,(WPARAM)0,(LPARAM)0); //destroy window if no new mail and window is not visible
+ PostMessage(hDlg,WM_DESTROY,0,0); //destroy window if no new mail and window is not visible
if (nnflags & YAMN_ACC_MSG) //if no new mail and msg should be executed
{
SetForegroundWindow(hDlg);
@@ -733,7 +733,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR else
if (hDlg!=NULL) //else insert icon and set window if new mails
{
- SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_SCROLL,(WPARAM)0,(LPARAM)0x7ffffff);
+ SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_SCROLL,0,(LPARAM)0x7ffffff);
if ((nflags & YAMN_ACC_ICO) && (MN->Real.SysTrayUC+MN->Virtual.SysTrayUC))
{
@@ -864,7 +864,7 @@ LRESULT CALLBACK NewMailPopUpProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam } else {
DBVARIANT dbv;
- hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,(LPARAM)0);
+ hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
if (!DBGetContactSetting((HANDLE) hContact,YAMN_DBMODULE,"Id",&dbv))
{
@@ -932,7 +932,7 @@ LRESULT CALLBACK NewMailPopUpProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam HANDLE hContact;
DBVARIANT dbv;
- hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,(LPARAM)0);
+ hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
if (!DBGetContactSetting((HANDLE) hContact,YAMN_DBMODULE,"Id",&dbv))
{
@@ -965,7 +965,7 @@ LRESULT CALLBACK NoNewMailPopUpProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPar HANDLE hContact;
DBVARIANT dbv;
- hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,(LPARAM)0);
+ hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
if (!DBGetContactSetting((HANDLE) hContact,YAMN_DBMODULE,"Id",&dbv))
{
@@ -1032,7 +1032,7 @@ LRESULT CALLBACK NoNewMailPopUpProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPar HANDLE hContact;
DBVARIANT dbv;
- hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,(LPARAM)0);
+ hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
if (!DBGetContactSetting((HANDLE) hContact,YAMN_DBMODULE,"Id",&dbv))
{
@@ -1343,7 +1343,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM LVCOLUMNW lvc0={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,130,iHeaderW,0,0};
LVCOLUMNW lvc1={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,400,iValueW,0,0};
- SendMessageW(hListView,LVM_INSERTCOLUMNW,(WPARAM)0,(LPARAM)&lvc0);
+ SendMessageW(hListView,LVM_INSERTCOLUMNW,0,(LPARAM)&lvc0);
SendMessageW(hListView,LVM_INSERTCOLUMNW,(WPARAM)1,(LPARAM)&lvc1);
if (NULL!=iHeaderW)
delete[] iHeaderW;
@@ -1430,7 +1430,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM item.iItem++;
item.pszText=0;
}
- item.iItem=SendMessageW(hListView,LVM_INSERTITEMW,(WPARAM)0,(LPARAM)&item);
+ item.iItem=SendMessageW(hListView,LVM_INSERTITEMW,0,(LPARAM)&item);
item.iSubItem=1;
item.pszText=str2?split[i]:0;
SendMessageW(hListView,LVM_SETITEMTEXTW,(WPARAM)item.iItem,(LPARAM)&item);
@@ -1466,7 +1466,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM }
}
if (!bodyDecoded)ConvertStringToUnicode(localBody?localBody:body,MailParam->mail->MailData->CP,&bodyDecoded);
- SendMessageW(hEdit,WM_SETTEXT,(WPARAM)0,(LPARAM)bodyDecoded);
+ SendMessageW(hEdit,WM_SETTEXT,0,(LPARAM)bodyDecoded);
delete[] bodyDecoded;
if (localBody) delete[] localBody;
SetFocus(hEdit);
@@ -1496,7 +1496,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM else wsprintfW(title,L"none");
if (Subj) delete[] Subj;
if (From) delete[] From;
- SendMessageW(hDlg,WM_SETTEXT,(WPARAM)0,(LPARAM)title);
+ SendMessageW(hDlg,WM_SETTEXT,0,(LPARAM)title);
delete[] title;
// turn on redrawing
SendMessage(hListView, WM_SETREDRAW, 1, 0);
@@ -1725,16 +1725,16 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM DebugLog(SynchroFile,"MailBrowser:INIT:ActualAccountSO-read enter\n");
#endif
- SendMessageW(GetDlgItem(hDlg,IDC_BTNAPP),WM_SETTEXT,(WPARAM)0,(LPARAM)TranslateW(L"Run application"));
- SendMessageW(GetDlgItem(hDlg,IDC_BTNDEL),WM_SETTEXT,(WPARAM)0,(LPARAM)TranslateW(L"Delete selected"));
- SendMessageW(GetDlgItem(hDlg,IDC_BTNCHECKALL),WM_SETTEXT,(WPARAM)0,(LPARAM)TranslateW(L"Select All"));
- SendMessageW(GetDlgItem(hDlg,IDC_BTNOK),WM_SETTEXT,(WPARAM)0,(LPARAM)TranslateW(L"OK"));
+ SendMessageW(GetDlgItem(hDlg,IDC_BTNAPP),WM_SETTEXT,0,(LPARAM)TranslateW(L"Run application"));
+ SendMessageW(GetDlgItem(hDlg,IDC_BTNDEL),WM_SETTEXT,0,(LPARAM)TranslateW(L"Delete selected"));
+ SendMessageW(GetDlgItem(hDlg,IDC_BTNCHECKALL),WM_SETTEXT,0,(LPARAM)TranslateW(L"Select All"));
+ SendMessageW(GetDlgItem(hDlg,IDC_BTNOK),WM_SETTEXT,0,(LPARAM)TranslateW(L"OK"));
LVCOLUMNW lvc0={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,FromWidth,TranslateW(L"From"),0,0};
LVCOLUMNW lvc1={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,SubjectWidth,TranslateW(L"Subject"),0,0};
LVCOLUMNW lvc2={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,SizeWidth,TranslateW(L"Size"),0,0};
LVCOLUMNW lvc3={LVCF_FMT | LVCF_TEXT | LVCF_WIDTH,LVCFMT_LEFT,SizeDate,TranslateW(L"Date"),0,0};
- SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,(WPARAM)0,(LPARAM)&lvc0);
+ SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,0,(LPARAM)&lvc0);
SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,(WPARAM)1,(LPARAM)&lvc1);
SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,(WPARAM)2,(LPARAM)&lvc2);
SendMessageW(GetDlgItem(hDlg,IDC_LISTMAILS),LVM_INSERTCOLUMNW,(WPARAM)3,(LPARAM)&lvc3);
diff --git a/protocols/YAMN/src/main.cpp b/protocols/YAMN/src/main.cpp index 916c80cc32..0d05534f3c 100644 --- a/protocols/YAMN/src/main.cpp +++ b/protocols/YAMN/src/main.cpp @@ -291,12 +291,12 @@ HICON WINAPI g_LoadIconEx( int idx, bool big ) {
if ( idx >= SIZEOF(iconList))
return NULL;
- return ( HICON )CallService(MS_SKIN2_GETICON, big, (LPARAM)iconList[idx].szName);
+ return Skin_GetIcon(iconList[idx].szName, big);
}
void WINAPI g_ReleaseIcon( HICON hIcon )
{
- if ( hIcon ) CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ if ( hIcon ) Skin_ReleaseIcon(hIcon);
}
static void LoadPlugins()
diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.cpp b/protocols/YAMN/src/proto/pop3/pop3comm.cpp index 954f1b5860..d5b229f78c 100644 --- a/protocols/YAMN/src/proto/pop3/pop3comm.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3comm.cpp @@ -190,7 +190,7 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) {
//Get YAMN variables we can use
- if (NULL==(pYAMNVar=(PYAMN_VARIABLES)CallService(MS_YAMN_GETVARIABLES,(WPARAM)YAMN_VARIABLESVERSION,(LPARAM)0)))
+ if (NULL==(pYAMNVar=(PYAMN_VARIABLES)CallService(MS_YAMN_GETVARIABLES,(WPARAM)YAMN_VARIABLESVERSION,0)))
return 0;
//We have to get pointers to YAMN exported functions: allocate structure and fill it
@@ -201,27 +201,27 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) if (NULL==(hNetLib=RegisterNLClient("YAMN-POP3")))
{UnLoadPOP3(0); return 0;}
- pYAMNFcn->SetProtocolPluginFcnImportFcn=(YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETPROTOCOLPLUGINFCNIMPORTID,(LPARAM)0);
- pYAMNFcn->WaitToWriteFcn=(YAMN_WAITTOWRITEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOWRITEID,(LPARAM)0);
- pYAMNFcn->WriteDoneFcn=(YAMN_WRITEDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WRITEDONEID,(LPARAM)0);
- pYAMNFcn->WaitToReadFcn=(YAMN_WAITTOREADFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOREADID,(LPARAM)0);
- pYAMNFcn->ReadDoneFcn=(YAMN_READDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_READDONEID,(LPARAM)0);
- pYAMNFcn->SCGetNumberFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCGETNUMBERID,(LPARAM)0);
- pYAMNFcn->SCIncFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCINCID,(LPARAM)0);
- pYAMNFcn->SCDecFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCDECID,(LPARAM)0);
- pYAMNFcn->SetStatusFcn=(YAMN_SETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETSTATUSID,(LPARAM)0);
- pYAMNFcn->GetStatusFcn=(YAMN_GETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_GETSTATUSID,(LPARAM)0);
+ pYAMNFcn->SetProtocolPluginFcnImportFcn=(YAMN_SETPROTOCOLPLUGINFCNIMPORTFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETPROTOCOLPLUGINFCNIMPORTID,0);
+ pYAMNFcn->WaitToWriteFcn=(YAMN_WAITTOWRITEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOWRITEID,0);
+ pYAMNFcn->WriteDoneFcn=(YAMN_WRITEDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WRITEDONEID,0);
+ pYAMNFcn->WaitToReadFcn=(YAMN_WAITTOREADFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_WAITTOREADID,0);
+ pYAMNFcn->ReadDoneFcn=(YAMN_READDONEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_READDONEID,0);
+ pYAMNFcn->SCGetNumberFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCGETNUMBERID,0);
+ pYAMNFcn->SCIncFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCINCID,0);
+ pYAMNFcn->SCDecFcn=(YAMN_SCMANAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SCDECID,0);
+ pYAMNFcn->SetStatusFcn=(YAMN_SETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SETSTATUSID,0);
+ pYAMNFcn->GetStatusFcn=(YAMN_GETSTATUSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_GETSTATUSID,0);
if (NULL==(pYAMNMailFcn=new struct MailExportedFcns))
{UnLoadPOP3(0); return 0;}
- pYAMNMailFcn->SynchroMessagesFcn=(YAMN_SYNCHROMIMEMSGSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SYNCHROMIMEMSGSID,(LPARAM)0);
- pYAMNMailFcn->TranslateHeaderFcn=(YAMN_TRANSLATEHEADERFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_TRANSLATEHEADERID,(LPARAM)0);
- pYAMNMailFcn->AppendQueueFcn=(YAMN_APPENDQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_APPENDQUEUEID,(LPARAM)0);
- pYAMNMailFcn->DeleteMessagesToEndFcn=(YAMN_DELETEMIMEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_DELETEMIMEQUEUEID,(LPARAM)0);
- pYAMNMailFcn->DeleteMessageFromQueueFcn=(YAMN_DELETEMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_DELETEMIMEMESSAGEID,(LPARAM)0);
- pYAMNMailFcn->FindMessageByIDFcn=(YAMN_FINDMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_FINDMIMEMESSAGEID,(LPARAM)0);
- pYAMNMailFcn->CreateNewDeleteQueueFcn=(YAMN_CREATENEWDELETEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_CREATENEWDELETEQUEUEID,(LPARAM)0);
+ pYAMNMailFcn->SynchroMessagesFcn=(YAMN_SYNCHROMIMEMSGSFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_SYNCHROMIMEMSGSID,0);
+ pYAMNMailFcn->TranslateHeaderFcn=(YAMN_TRANSLATEHEADERFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_TRANSLATEHEADERID,0);
+ pYAMNMailFcn->AppendQueueFcn=(YAMN_APPENDQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_APPENDQUEUEID,0);
+ pYAMNMailFcn->DeleteMessagesToEndFcn=(YAMN_DELETEMIMEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_DELETEMIMEQUEUEID,0);
+ pYAMNMailFcn->DeleteMessageFromQueueFcn=(YAMN_DELETEMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_DELETEMIMEMESSAGEID,0);
+ pYAMNMailFcn->FindMessageByIDFcn=(YAMN_FINDMIMEMESSAGEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_FINDMIMEMESSAGEID,0);
+ pYAMNMailFcn->CreateNewDeleteQueueFcn=(YAMN_CREATENEWDELETEQUEUEFCN)CallService(MS_YAMN_GETFCNPTR,(WPARAM)YAMN_CREATENEWDELETEQUEUEID,0);
//set static variable
if (CPOP3Account::AccountWriterSO==NULL) {
@@ -249,17 +249,17 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) switch(CallService(MS_YAMN_READACCOUNTS,(WPARAM)POP3Plugin,(LPARAM)FileName)) {
case EACC_FILEVERSION:
MessageBox(NULL,TranslateT("Found new version of account book, not compatible with this version of YAMN."),TranslateT("YAMN (internal POP3) read error"),MB_OK);
- CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,(LPARAM)0);
+ CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,0);
FileName = NULL;
return 0;
case EACC_FILECOMPATIBILITY:
MessageBox(NULL,TranslateT("Error reading account file. Account file corrupted."),TranslateT("YAMN (internal POP3) read error"),MB_OK);
- CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,(LPARAM)0);
+ CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,0);
FileName = NULL;
return 0;
case EACC_ALLOC:
MessageBox(NULL,TranslateT("Memory allocation error while data reading"),TranslateT("YAMN (internal POP3) read error"),MB_OK);
- CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,(LPARAM)0);
+ CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,0);
FileName = NULL;
return 0;
case EACC_SYSTEM:
@@ -268,7 +268,7 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) TCHAR temp[1024] = {0};
mir_sntprintf(temp, SIZEOF(temp), _T("%s\n%s"),TranslateT("Reading file error. File already in use?"),FileName);
MessageBox(NULL,temp,TranslateT("YAMN (internal POP3) read error"),MB_OK);
- CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,(LPARAM)0);
+ CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,0);
FileName = NULL;
return 0;
}
@@ -333,7 +333,7 @@ DWORD WINAPI UnLoadPOP3(void *) if (pYAMNFcn) {
delete pYAMNFcn; pYAMNFcn = NULL;}
if (FileName) {
- CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,(LPARAM)0); FileName = NULL;}
+ CallService(MS_YAMN_DELETEFILENAME,(WPARAM)FileName,0); FileName = NULL;}
#ifdef DEBUG_SYNCHRO
DebugLog(SynchroFile,"UnLoadPOP3:done\n");
diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.cpp b/protocols/YAMN/src/proto/pop3/pop3opt.cpp index 1a265a0800..c730b4b3fc 100644 --- a/protocols/YAMN/src/proto/pop3/pop3opt.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3opt.cpp @@ -94,7 +94,7 @@ INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam if (CB_ERR==(index=SendMessage(hCombo,CB_GETCURSEL,0,0)))
break;
- id=SendMessage(hCombo,CB_GETITEMDATA,(WPARAM)index,(LPARAM)0);
+ id=SendMessage(hCombo,CB_GETITEMDATA,(WPARAM)index,0);
EnterCriticalSection(&PluginRegCS);
for (PParser=FirstProtoPlugin;PParser!=NULL;PParser=PParser->Next)
if (id==(INT_PTR)PParser->Plugin)
@@ -147,14 +147,14 @@ INT_PTR CALLBACK DlgProcPluginOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lParam }
LeaveCriticalSection(&PluginRegCS);
- SendDlgItemMessage(hDlg,IDC_COMBOPLUGINS,CB_SETCURSEL,(WPARAM)0,(LPARAM)0);
- SendMessage(hDlg,WM_COMMAND,MAKELONG(IDC_COMBOPLUGINS,CBN_SELCHANGE),(LPARAM)NULL);
+ SendDlgItemMessage(hDlg,IDC_COMBOPLUGINS,CB_SETCURSEL,0,0);
+ SendMessage(hDlg,WM_COMMAND,MAKELONG(IDC_COMBOPLUGINS,CBN_SELCHANGE),0);
break;
}
else { //delete all items in combobox
- int cbn=SendDlgItemMessage(hDlg,IDC_COMBOPLUGINS,CB_GETCOUNT,(WPARAM)0,(LPARAM)0);
+ int cbn=SendDlgItemMessage(hDlg,IDC_COMBOPLUGINS,CB_GETCOUNT,0,0);
for (int i=0;i<cbn;i++)
- SendDlgItemMessage(hDlg,IDC_COMBOPLUGINS,CB_DELETESTRING,(WPARAM)0,(LPARAM)0);
+ SendDlgItemMessage(hDlg,IDC_COMBOPLUGINS,CB_DELETESTRING,0,0);
break;
}
}
@@ -401,11 +401,11 @@ BOOL DlgShowAccount(HWND hDlg,WPARAM wParam,LPARAM lParam) for (i=0;i<=CPLENSUPP;i++)
if ((i<CPLENSUPP) && (CodePageNamesSupp[i].CP==ActualAccount->CP))
{
- SendMessage(GetDlgItem(hDlg,IDC_COMBOCP),CB_SETCURSEL,(WPARAM)i,(LPARAM)0);
+ SendMessage(GetDlgItem(hDlg,IDC_COMBOCP),CB_SETCURSEL,(WPARAM)i,0);
break;
}
if (i==CPLENSUPP)
- SendMessage(GetDlgItem(hDlg,IDC_COMBOCP),CB_SETCURSEL,(WPARAM)CPDEFINDEX,(LPARAM)0);
+ SendMessage(GetDlgItem(hDlg,IDC_COMBOCP),CB_SETCURSEL,(WPARAM)CPDEFINDEX,0);
CheckDlgButton(hDlg,IDC_CHECK,ActualAccount->Flags & YAMN_ACC_ENA ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg,IDC_CHECKSND,ActualAccount->NewMailN.Flags & YAMN_ACC_SND ? BST_CHECKED : BST_UNCHECKED);
@@ -463,19 +463,19 @@ BOOL DlgShowAccount(HWND hDlg,WPARAM wParam,LPARAM lParam) }
else //default
{
- DlgSetItemText(hDlg,(WPARAM)IDC_EDITSERVER,(LPARAM)NULL);
- DlgSetItemText(hDlg,(WPARAM)IDC_EDITNAME,(LPARAM)NULL);
- DlgSetItemText(hDlg,(WPARAM)IDC_EDITLOGIN,(LPARAM)NULL);
- DlgSetItemText(hDlg,(WPARAM)IDC_EDITPASS,(LPARAM)NULL);
- DlgSetItemText(hDlg,(WPARAM)IDC_EDITAPP,(LPARAM)NULL);
- DlgSetItemText(hDlg,(WPARAM)IDC_EDITAPPPARAM,(LPARAM)NULL);
- DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_EDITSERVER,0);
+ DlgSetItemText(hDlg,(WPARAM)IDC_EDITNAME,0);
+ DlgSetItemText(hDlg,(WPARAM)IDC_EDITLOGIN,0);
+ DlgSetItemText(hDlg,(WPARAM)IDC_EDITPASS,0);
+ DlgSetItemText(hDlg,(WPARAM)IDC_EDITAPP,0);
+ DlgSetItemText(hDlg,(WPARAM)IDC_EDITAPPPARAM,0);
+ DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
SetDlgItemInt(hDlg,IDC_EDITPORT,110,FALSE);
SetDlgItemInt(hDlg,IDC_EDITINTERVAL,30,FALSE);
SetDlgItemInt(hDlg,IDC_EDITPOPS,0,FALSE);
SetDlgItemInt(hDlg,IDC_EDITNPOPS,0,FALSE);
SetDlgItemInt(hDlg,IDC_EDITFPOPS,0,FALSE);
- SendMessage(GetDlgItem(hDlg,IDC_COMBOCP),CB_SETCURSEL,(WPARAM)CPDEFINDEX,(LPARAM)0);
+ SendMessage(GetDlgItem(hDlg,IDC_COMBOCP),CB_SETCURSEL,(WPARAM)CPDEFINDEX,0);
CheckDlgButton(hDlg,IDC_CHECK,BST_CHECKED);
CheckDlgButton(hDlg,IDC_CHECKSND,BST_CHECKED);
CheckDlgButton(hDlg,IDC_CHECKMSG,BST_UNCHECKED);
@@ -628,7 +628,7 @@ INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM Check7 = (IsDlgButtonChecked(hDlg,IDC_CHECKST7)==BST_CHECKED);
Check8 = (IsDlgButtonChecked(hDlg,IDC_CHECKST8)==BST_CHECKED);
Check9 = (IsDlgButtonChecked(hDlg,IDC_CHECKST9)==BST_CHECKED);
- WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_CHANGESTATUSOPTION,(WPARAM)0,(LPARAM)0);
+ WindowList_BroadcastAsync(YAMNVar.MessageWnds,WM_YAMN_CHANGESTATUSOPTION,0,0);
EndDialog(hDlg,0);
DestroyWindow(hDlg);
break;
@@ -693,7 +693,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara SendDlgItemMessage(hDlg,IDC_COMBOCP,CB_ADDSTRING,0,(LPARAM)(info.CodePageName+7));
}
- SendMessage(GetDlgItem(hDlg,IDC_COMBOCP),CB_SETCURSEL,(WPARAM)CPDEFINDEX,(LPARAM)0);
+ SendMessage(GetDlgItem(hDlg,IDC_COMBOCP),CB_SETCURSEL,(WPARAM)CPDEFINDEX,0);
ActualAccount=NULL;
TranslateDialogDefault(hDlg);
SendMessage(GetParent(hDlg),PSM_UNCHANGED,(WPARAM)hDlg,0);
@@ -703,7 +703,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara case WM_SHOWWINDOW:
if ( wParam == FALSE) {
WindowList_Remove(pYAMNVar->MessageWnds,hDlg);
- SendMessage(GetParent(hDlg),PSM_UNCHANGED,(WPARAM)hDlg,(LPARAM)0);
+ SendMessage(GetParent(hDlg),PSM_UNCHANGED,(WPARAM)hDlg,0);
}
else WindowList_Add(pYAMNVar->MessageWnds,hDlg,NULL);
return TRUE;
@@ -736,7 +736,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara switch( HIWORD(wParam)) {
case CBN_EDITCHANGE :
ActualAccount=NULL;
- DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
if (GetDlgItemTextA(hDlg,IDC_COMBOACCOUNT,DlgInput,sizeof(DlgInput)))
DlgEnableAccount(hDlg,(WPARAM)TRUE,(LPARAM)FALSE);
@@ -747,7 +747,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara case CBN_KILLFOCUS:
GetDlgItemTextA(hDlg,IDC_COMBOACCOUNT,DlgInput,sizeof(DlgInput));
if (NULL==(ActualAccount=(HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)DlgInput))) {
- DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),FALSE);
if (lstrlenA(DlgInput))
DlgEnableAccount(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
@@ -766,7 +766,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara SendDlgItemMessageA(hDlg,IDC_COMBOACCOUNT,CB_GETLBTEXT,(WPARAM)Result,(LPARAM)DlgInput);
if ((Result==CB_ERR) || (NULL==(ActualAccount=(HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)DlgInput)))) {
- DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),FALSE);
}
else {
@@ -853,7 +853,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara break;
case IDC_BTNADD:
- DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
DlgShowAccount(hDlg,(WPARAM)M_SHOWDEFAULT,0);
DlgEnableAccount(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),FALSE);
@@ -915,7 +915,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara //We can consider our account as deleted.
SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_DELETESTRING,(WPARAM)Result,0);
- DlgSetItemText(hDlg,(WPARAM)IDC_COMBOACCOUNT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_COMBOACCOUNT,0);
DlgEnableAccount(hDlg,(WPARAM)FALSE,0);
DlgShowAccount(hDlg,(WPARAM)M_SHOWDEFAULT,0);
break;
@@ -1149,13 +1149,13 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPara EnableWindow(GetDlgItem(hDlg,IDC_BTNDEL),TRUE);
- DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
- index = SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_GETCURSEL,(WPARAM)0,(LPARAM)0);
+ index = SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_GETCURSEL,0,0);
HPOP3ACCOUNT temp = ActualAccount;
- SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_RESETCONTENT,0,(LPARAM)0);
+ SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_RESETCONTENT,0,0);
if (POP3Plugin->FirstAccount!=NULL)
for (ActualAccount=(HPOP3ACCOUNT)POP3Plugin->FirstAccount;ActualAccount!=NULL;ActualAccount=(HPOP3ACCOUNT)ActualAccount->Next)
if (ActualAccount->Name!=NULL)
@@ -1218,15 +1218,15 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa if ((BOOL)wParam==FALSE)
{
WindowList_Remove(pYAMNVar->MessageWnds,hDlg);
- SendMessage(GetParent(hDlg),PSM_UNCHANGED,(WPARAM)hDlg,(LPARAM)0);
+ SendMessage(GetParent(hDlg),PSM_UNCHANGED,(WPARAM)hDlg,0);
}
else
{
WindowList_Add(pYAMNVar->MessageWnds,hDlg,NULL);
- int index = SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_GETCURSEL,(WPARAM)0,(LPARAM)0);
+ int index = SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_GETCURSEL,0,0);
HPOP3ACCOUNT temp = ActualAccount;
- SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_RESETCONTENT,0,(LPARAM)0);
+ SendDlgItemMessage(hDlg,IDC_COMBOACCOUNT,CB_RESETCONTENT,0,0);
if (POP3Plugin->FirstAccount!=NULL)
for (ActualAccount=(HPOP3ACCOUNT)POP3Plugin->FirstAccount;ActualAccount!=NULL;ActualAccount=(HPOP3ACCOUNT)ActualAccount->Next)
@@ -1265,7 +1265,7 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa GetDlgItemTextA(hDlg,IDC_COMBOACCOUNT,DlgInput,sizeof(DlgInput));
if (NULL==(ActualAccount=(HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)DlgInput)))
{
- DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
if (lstrlenA(DlgInput))
DlgEnableAccountPopup(hDlg,(WPARAM)TRUE,(LPARAM)TRUE);
else
@@ -1283,7 +1283,7 @@ INT_PTR CALLBACK DlgProcPOP3AccPopup(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa SendDlgItemMessageA(hDlg,IDC_COMBOACCOUNT,CB_GETLBTEXT,(WPARAM)Result,(LPARAM)DlgInput);
if ((Result==CB_ERR) || (NULL==(ActualAccount=(HPOP3ACCOUNT)CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)DlgInput))))
{
- DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,(LPARAM)NULL);
+ DlgSetItemText(hDlg,(WPARAM)IDC_STTIMELEFT,0);
}
else
{
diff --git a/protocols/Yahoo/src/icolib.cpp b/protocols/Yahoo/src/icolib.cpp index 09ad4853b0..40c7cb9421 100644 --- a/protocols/Yahoo/src/icolib.cpp +++ b/protocols/Yahoo/src/icolib.cpp @@ -63,10 +63,8 @@ void CYahooProto::IconsInit( void ) HICON CYahooProto::LoadIconEx( const char* name, bool big )
{
char szSettingName[100];
-
- mir_snprintf( szSettingName, sizeof( szSettingName ), "YAHOO_%s", name );
-
- return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
+ mir_snprintf(szSettingName, sizeof(szSettingName), "YAHOO_%s", name);
+ return Skin_GetIcon(szSettingName, big);
}
HANDLE CYahooProto::GetIconHandle(int iconId)
@@ -82,5 +80,5 @@ void CYahooProto::ReleaseIconEx(const char* name, bool big) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "YAHOO_%s", name);
- CallService(big ? MS_SKIN2_RELEASEICONBIG : MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ Skin_ReleaseIcon(szSettingName, big);
}
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)>l, (LPARAM)NULL);
+ iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 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)>l, (LPARAM)NULL);
+ iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 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)>l, (LPARAM)NULL);
+ iLen = SendMessage(hwnd, EM_GETTEXTLENGTHEX, (WPARAM)>l, 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;
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 364461d688..9468292670 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -201,10 +201,10 @@ static INT_PTR BuildMainMenu(WPARAM, LPARAM) ListParam param = { 0 };
param.MenuObjectHandle = hMainMenuObject;
- NotifyEventHooks(hPreBuildMainMenuEvent, (WPARAM)0, (LPARAM)0);
+ NotifyEventHooks(hPreBuildMainMenuEvent, 0, 0);
CallService(MO_BUILDMENU, (WPARAM)hMainMenu, (LPARAM)¶m);
- DrawMenuBar((HWND)CallService("CLUI/GetHwnd", (WPARAM)0, (LPARAM)0));
+ DrawMenuBar((HWND)CallService("CLUI/GetHwnd", 0, 0));
return (INT_PTR)hMainMenu;
}
@@ -842,7 +842,7 @@ void RebuildMenuOrder(void) tmp.CheckService = "StatusMenuCheckService";
tmp.name = "StatusMenu";
- hStatusMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, (WPARAM)0, (LPARAM)&tmp);
+ hStatusMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp);
MO_SetOptionsMenuObject(hStatusMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, (INT_PTR)"CLISTMENUS/FreeOwnerDataStatusMenu");
hStatusMainMenuHandles = (PMO_IntMenuItem*)mir_calloc(SIZEOF(statusModeList) * sizeof(PMO_IntMenuItem*));
@@ -1324,7 +1324,7 @@ void InitCustomMenus(void) tmp.CheckService = NULL;
tmp.ExecService = "MainMenuExecService";
tmp.name = "MainMenu";
- hMainMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, (WPARAM)0, (LPARAM)&tmp);
+ hMainMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp);
}
MO_SetOptionsMenuObject(hMainMenuObject, OPT_USERDEFINEDITEMS, TRUE);
@@ -1337,7 +1337,7 @@ void InitCustomMenus(void) tmp.CheckService = "ContactMenuCheckService";
tmp.ExecService = "ContactMenuExecService";
tmp.name = "ContactMenu";
- hContactMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, (WPARAM)0, (LPARAM)&tmp);
+ hContactMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp);
}
MO_SetOptionsMenuObject(hContactMenuObject, OPT_USERDEFINEDITEMS, TRUE);
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index e68463c781..02ffb598ed 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -1085,7 +1085,7 @@ static int MO_RegisterIcon(PMO_IntMenuItem pmi, void*) pmi->hIcolibItem = IcoLib_AddNewIcon(0, &sid);
Safe_DestroyIcon(hIcon);
- if (hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)iconame)) {
+ if (hIcon = Skin_GetIcon(iconame)) {
ImageList_ReplaceIcon(pmi->parent->m_hMenuIcons, pmi->iconId, hIcon);
IcoLib_ReleaseIcon(hIcon, 0);
}
diff --git a/src/modules/database/dbutils.cpp b/src/modules/database/dbutils.cpp index 4444c8361c..174d7e5109 100644 --- a/src/modules/database/dbutils.cpp +++ b/src/modules/database/dbutils.cpp @@ -170,11 +170,11 @@ static INT_PTR DbEventGetIcon(WPARAM wParam, LPARAM lParam) return (INT_PTR)icon;
}
if (et && et->eventIcon)
- icon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)et->eventIcon);
+ icon = Skin_GetIconByHandle(et->eventIcon);
if ( !icon) {
char szName[100];
mir_snprintf(szName, sizeof(szName), "eventicon_%s%d", dbei->szModule, dbei->eventType);
- icon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szName);
+ icon = Skin_GetIcon(szName);
}
if ( !icon) {
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index 8d29ef9c96..1b9d3bd920 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -569,7 +569,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, pshn.hdr.code = PSN_INFOCHANGED;
pshn.hdr.hwndFrom = dat->opd[dat->currentPage].hwnd;
pshn.hdr.idFrom = 0;
- pshn.lParam = (LPARAM)0;
+ pshn.lParam = 0;
SendMessage(dat->opd[dat->currentPage].hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
// service mode combobox
@@ -609,7 +609,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, PSHNOTIFY pshn;
pshn.hdr.code = PSN_INFOCHANGED;
pshn.hdr.idFrom = 0;
- pshn.lParam = (LPARAM)0;
+ pshn.lParam = 0;
for (int i=0; i < dat->pageCount; i++) {
pshn.hdr.hwndFrom = dat->opd[i].hwnd;
if (dat->opd[i].hwnd != NULL)
@@ -652,7 +652,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, pshn.hdr.code = PSN_INFOCHANGED;
pshn.hdr.hwndFrom = dat->opd[dat->currentPage].hwnd;
pshn.hdr.idFrom = 0;
- pshn.lParam = (LPARAM)0;
+ pshn.lParam = 0;
SendMessage(dat->opd[dat->currentPage].hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
}
ShowWindow(dat->opd[dat->currentPage].hwnd, SW_SHOW);
@@ -693,7 +693,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam, {
PSHNOTIFY pshn;
pshn.hdr.idFrom = 0;
- pshn.lParam = (LPARAM)0;
+ pshn.lParam = 0;
if (dat->currentPage != -1) {
pshn.hdr.code = PSN_KILLACTIVE;
pshn.hdr.hwndFrom = dat->opd[dat->currentPage].hwnd;
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index ff47b4f86a..3abff53e39 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -924,7 +924,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, COLORREF clBack = 0xffffffff;
COLORREF clText = 0xffffffff;
- if (selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELCOUNT, (WPARAM)0, (LPARAM)0)) {
+ if (selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELCOUNT, 0, 0)) {
int *selItems = (int *)mir_alloc(font_id_list_w2.getCount() * sizeof(int));
SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELITEMS, (WPARAM)selCount, (LPARAM)selItems);
for (i=0; i < selCount; ++i) {
@@ -1107,7 +1107,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, break;
case IDC_BTN_RESET:
- if (font_id_list_w2.getCount() && (selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELCOUNT, (WPARAM)0, (LPARAM)0))) {
+ if (font_id_list_w2.getCount() && (selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELCOUNT, 0, 0))) {
int *selItems = (int *)mir_alloc(font_id_list_w2.getCount() * sizeof(int));
SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELITEMS, (WPARAM)selCount, (LPARAM)selItems);
for (i=0; i < selCount; ++i) {
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index c39f613571..9cce3dfc10 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -496,9 +496,9 @@ static void FillFilterCombo(int enableKeywordFiltering, HWND hDlg, OptionsDlgDat HINSTANCE* KnownInstances = (HINSTANCE*)alloca(sizeof(HINSTANCE)*dat->arOpd.getCount());
int countKnownInst = 0;
SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_RESETCONTENT, 0, 0);
- int index = SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_ADDSTRING, (WPARAM)0, (LPARAM)TranslateTS(ALL_MODULES_FILTER));
- SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_SETITEMDATA, (WPARAM)index, (LPARAM)NULL);
- index = SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_ADDSTRING, (WPARAM)0, (LPARAM)TranslateTS(CORE_MODULES_FILTER));
+ int index = SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_ADDSTRING, 0, (LPARAM)TranslateTS(ALL_MODULES_FILTER));
+ SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_SETITEMDATA, (WPARAM)index, 0);
+ index = SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_ADDSTRING, 0, (LPARAM)TranslateTS(CORE_MODULES_FILTER));
SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_SETITEMDATA, (WPARAM)index, (LPARAM)hInst);
TCHAR* tszModuleName = (TCHAR*)alloca(MAX_PATH*sizeof(TCHAR));
for (int i=0; i < dat->arOpd.getCount(); i++) {
@@ -526,7 +526,7 @@ static void FillFilterCombo(int enableKeywordFiltering, HWND hDlg, OptionsDlgDat if ( !dllName) dllName = mir_tstrdup(tszModuleName);
if (dllName) {
- index = SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_ADDSTRING, (WPARAM)0, (LPARAM)dllName);
+ index = SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_ADDSTRING, 0, (LPARAM)dllName);
SendDlgItemMessage(hDlg, IDC_KEYWORD_FILTER, (UINT) CB_SETITEMDATA, (WPARAM)index, (LPARAM)inst);
mir_free(dllName);
}
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp index 4ecb0cb056..2ab2c79c14 100644 --- a/src/modules/protocols/protocols.cpp +++ b/src/modules/protocols/protocols.cpp @@ -201,7 +201,7 @@ static INT_PTR Proto_AuthRecv(WPARAM wParam, LPARAM lParam) dbei.eventType = EVENTTYPE_AUTHREQUEST;
dbei.cbBlob = pre->lParam;
dbei.pBlob = (PBYTE)pre->szMessage;
- return CallService(MS_DB_EVENT_ADD,(WPARAM)NULL,(LPARAM)&dbei);
+ return CallService(MS_DB_EVENT_ADD,0,(LPARAM)&dbei);
}
/////////////////////////////////////////////////////////////////////////////////////////
|