diff --git a/Src/MainFrm.cpp b/Src/MainFrm.cpp index 717eb3fff0b..fe1df9a05d3 100644 --- a/Src/MainFrm.cpp +++ b/Src/MainFrm.cpp @@ -70,7 +70,6 @@ #include "locality.h" #include "DirWatcher.h" #include "Win_VersionHelper.h" -#include using std::vector; using boost::begin; @@ -224,10 +223,6 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) ON_WM_ACTIVATEAPP() ON_WM_NCCALCSIZE() ON_WM_SIZE() - ON_WM_MOUSEMOVE() - ON_WM_MOUSELEAVE() - ON_WM_NCMOUSEMOVE() - ON_WM_NCMOUSELEAVE() ON_UPDATE_COMMAND_UI_RANGE(CMenuBar::FIRST_MENUID, CMenuBar::FIRST_MENUID + 10, OnUpdateMenuBarMenuItem) // [File] menu ON_COMMAND(ID_FILE_NEW, (OnFileNew<2, ID_MERGE_COMPARE_TEXT>)) @@ -2551,18 +2546,6 @@ void CMainFrame::OnSize(UINT nType, int cx, int cy) __super::OnSize(nType, cx, cy); } -void CMainFrame::OnMouseMove(UINT nFlags, CPoint point) -{ -} - -void CMainFrame::OnMouseLeave() -{ -} - -void CMainFrame::OnNcMouseMove(UINT nHitTest, CPoint point) -{ -} - BOOL CMainFrame::CreateToolbar() { if (!m_wndMenuBar.Create(this)) diff --git a/Src/MainFrm.h b/Src/MainFrm.h index fbe7a03858c..39ddafe2a6a 100644 --- a/Src/MainFrm.h +++ b/Src/MainFrm.h @@ -387,9 +387,6 @@ class CMainFrame : public CMDIFrameWnd afx_msg void OnActivateApp(BOOL bActive, DWORD dwThreadID); afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp); afx_msg void OnSize(UINT nType, int cx, int cy); - afx_msg void OnMouseMove(UINT nFlags, CPoint point); - afx_msg void OnMouseLeave(); - afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point); afx_msg void OnToolbarSize(UINT id); afx_msg void OnUpdateToolbarSize(CCmdUI* pCmdUI); afx_msg BOOL OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult); diff --git a/Src/TitleBarHelper.cpp b/Src/TitleBarHelper.cpp index a8035af7387..a18df1ba4bd 100644 --- a/Src/TitleBarHelper.cpp +++ b/Src/TitleBarHelper.cpp @@ -31,17 +31,16 @@ void CTitleBarHelper::DrawIcon(CWnd* pWnd, CDC& dc) HICON hIcon = (HICON)pWnd->SendMessage(WM_GETICON, ICON_SMALL2, 0); if (hIcon == nullptr) hIcon = (HICON)GetClassLongPtr(pWnd->m_hWnd, GCLP_HICONSM); - if (hIcon != nullptr) - { - const int topMargin = (m_maximized ? -m_rc.top : 0); - const int height = m_size.cy - topMargin; - const int cx = PointToPixel(12.f); - const int cy = PointToPixel(12.f); - const int x = (PointToPixel(m_leftMargin) - cx) / 2; - const int y = (height - cy) / 2 + topMargin; - DrawIconEx(dc.m_hDC, x, y, hIcon, - cx, cy, 0, nullptr, DI_NORMAL); - } + if (hIcon == nullptr) + return; + const int topMargin = (m_maximized ? -m_rc.top : 0); + const int height = m_size.cy - topMargin; + const int cx = PointToPixel(12.f); + const int cy = PointToPixel(12.f); + const int x = (PointToPixel(m_leftMargin) - cx) / 2; + const int y = (height - cy) / 2 + topMargin; + DrawIconEx(dc.m_hDC, x, y, hIcon, + cx, cy, 0, nullptr, DI_NORMAL); } static void DrawTopRightEdgeWithCurve(Gdiplus::Graphics& graphics, Gdiplus::Pen& pen, Gdiplus::Rect rect, int cornerRadius)