diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-31 21:02:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-31 21:02:26 +0000 |
commit | e48bae4c6ccf1003916b3960f30816ce8aaa955b (patch) | |
tree | a69a0e638db00a3f2af4581a6440178bb9893971 /plugins/NotesAndReminders | |
parent | 6cb654fab7272163d2330cf41de542e1ccba71c8 (diff) |
- additional operator LPARAM() for _A2T & _T2A;
- we don't need StrConvA anymore;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@13952 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NotesAndReminders')
-rw-r--r-- | plugins/NotesAndReminders/src/notes.cpp | 4 | ||||
-rw-r--r-- | plugins/NotesAndReminders/src/reminders.cpp | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 9a250b56df..c01e247659 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -1463,7 +1463,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l if (id >= IDM_COLORPRESET_BG && id <= IDM_COLORPRESET_BG+SIZEOF(clrPresets)) { SN->BgColor = clrPresets[id-IDM_COLORPRESET_BG].color | 0xff000000; - SendMessage(H, EM_SETBKGNDCOLOR, 0, (LPARAM)(SN->BgColor&0xffffff)); + SendMessage(H, EM_SETBKGNDCOLOR, 0, SN->BgColor & 0xffffff); RedrawWindow(SN->SNHwnd, NULL, NULL, RDW_INVALIDATE|RDW_FRAME|RDW_UPDATENOW); JustSaveNotes(); return FALSE; @@ -1502,7 +1502,7 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l if (ChooseColor(&cc) && cc.rgbResult != orgclr) { SN->BgColor = cc.rgbResult | 0xff000000; - SendMessage(H, EM_SETBKGNDCOLOR, 0, (LPARAM)(SN->BgColor&0xffffff)); + SendMessage(H, EM_SETBKGNDCOLOR, 0, SN->BgColor&0xffffff); RedrawWindow(SN->SNHwnd, NULL, NULL, RDW_INVALIDATE|RDW_FRAME|RDW_UPDATENOW); JustSaveNotes(); } diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index 49a8530db7..719c25afec 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -1150,7 +1150,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,n, (LPARAM)(dt*60));
+ SendDlgItemMessage(Dialog,nIDTime,CB_SETITEMDATA,n, dt*60);
li.QuadPart += (ULONGLONG)30 * MinutesToFileTime;
}
@@ -1181,39 +1181,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,n, (LPARAM)(i*5));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA,n, 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,n, (LPARAM)60);
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, 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,n, (LPARAM)(i*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, 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,n, (LPARAM)(24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, 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,n, (LPARAM)(i*24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, 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,n, (LPARAM)(7*24*60));
+ SendDlgItemMessage(Dialog,nIDCombo,CB_SETITEMDATA, n, 7*24*60);
}
// returns non-zero if specified time was inside "missing" hour of daylight saving
|