From 7c0fdf0c457d55b6bfdda0282cf5099057c715c7 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 21 Sep 2013 21:58:47 +0000 Subject: Not needed version checks removed git-svn-id: http://svn.miranda-ng.org/main/trunk@6172 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NotesAndReminders/src/notes.cpp | 34 ++++++++++----------------------- 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'plugins/NotesAndReminders/src/notes.cpp') diff --git a/plugins/NotesAndReminders/src/notes.cpp b/plugins/NotesAndReminders/src/notes.cpp index 9907655063..5c19457227 100644 --- a/plugins/NotesAndReminders/src/notes.cpp +++ b/plugins/NotesAndReminders/src/notes.cpp @@ -1018,22 +1018,17 @@ static BOOL DoContextMenu(HWND AhWnd,WPARAM wParam,LPARAM lParam) // NOTE: names used for FindMenuItem would need to include & chars if such shortcuts are added to the menus - // color preset menu items uses features that require win2k or later, I'm too lazy to make a fallback path - // for obsolete OS versions (win95/98/ME users can still use the "Custom" menu option) - if (g_isWin2kPlus) + n = FindMenuItem(FhMenu, _T("Appearance")); + if (n >= 0 && (hSub = GetSubMenu(FhMenu, n))) { - n = FindMenuItem(FhMenu, _T("Appearance")); - if (n >= 0 && (hSub = GetSubMenu(FhMenu, n))) - { - HMENU hBg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Background Color"))); - HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Text Color"))); + HMENU hBg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Background Color"))); + HMENU hFg = GetSubMenu(hSub, FindMenuItem(hSub, _T("Text Color"))); - for (i=0; iBgColor) ? SN->BgColor : BodyColor)); - } - else - { - hBkBrush = (HBRUSH)CreateSolidBrush( GetCaptionColor((SN && SN->BgColor) ? SN->BgColor : BodyColor) ); - } + hBkBrush = (HBRUSH)GetStockObject(DC_BRUSH); + SetDCBrushColor(hdc, GetCaptionColor((SN && SN->BgColor) ? SN->BgColor : BodyColor)); - //FillRect(hdc, &rect, hBkBrush); // draw all frame sides separately to avoid filling client area (which flickers) { // top @@ -1302,7 +1289,6 @@ INT_PTR CALLBACK StickyNoteWndProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM l r.left = rect.right - 3; r.right = rect.right; FillRect(hdc, &r, hBkBrush); } - if (hBkBrush && !g_isWin2kPlus) DeleteObject(hBkBrush); // paint title bar contents (time stamp and buttons) -- cgit v1.2.3