From 30baf4c3a7f4a1d4687a5d312f176ca8f4f3fdd7 Mon Sep 17 00:00:00 2001 From: Flaviu Date: Thu, 2 Jan 2020 20:05:55 +0200 Subject: [PATCH] modifications --- Src/ImgMergeFrm.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Src/ImgMergeFrm.cpp b/Src/ImgMergeFrm.cpp index 14295f813..0d40cce64 100644 --- a/Src/ImgMergeFrm.cpp +++ b/Src/ImgMergeFrm.cpp @@ -215,7 +215,7 @@ bool CImgMergeFrame::OpenDocs(int nFiles, const FileLocation fileloc[], const bo LPCTSTR lpszWndClass = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW, ::LoadCursor(nullptr, IDC_ARROW), (HBRUSH)(COLOR_WINDOW+1), nullptr); - if (!CMDIChildWnd::Create(lpszWndClass, GetTitle(), WS_OVERLAPPEDWINDOW | WS_CHILD, rectDefault, pParent)) + if (!CMergeFrameCommon::Create(lpszWndClass, GetTitle(), WS_OVERLAPPEDWINDOW | WS_CHILD, rectDefault, pParent)) return false; int nCmdShow = SW_SHOW; @@ -475,7 +475,7 @@ BOOL CImgMergeFrame::OnCreateClient( LPCREATESTRUCT /*lpcs*/, int CImgMergeFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { - if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1) + if (CMergeFrameCommon::OnCreate(lpCreateStruct) == -1) return -1; EnableDocking(CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM | CBRS_ALIGN_LEFT | CBRS_ALIGN_RIGHT); @@ -553,7 +553,7 @@ BOOL CImgMergeFrame::DestroyWindow() SaveActivePane(); SaveOptions(); SaveWindowState(); - return CMDIChildWnd::DestroyWindow(); + return CMergeFrameCommon::DestroyWindow(); } void CImgMergeFrame::LoadOptions() @@ -624,7 +624,9 @@ void CImgMergeFrame::OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDe // for the dimensions of the diff and location pane, use the CSizingControlBar loader m_wndLocationBar.LoadState(_T("Settings-ImgMergeFrame")); } - CMDIChildWnd::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd); + + CMergeFrameCommon::OnMDIActivate(bActivate, pActivateWnd, pDeactivateWnd); + if (bActivate) { GetMainFrame()->PostMessage(WM_USER + 1); @@ -638,7 +640,7 @@ void CImgMergeFrame::OnClose() return; // clean up pointers. - CMDIChildWnd::OnClose(); + CMergeFrameCommon::OnClose(); GetMainFrame()->ClearStatusbarItemCount(); } @@ -1013,7 +1015,7 @@ void CImgMergeFrame::SetTitle(LPCTSTR lpszTitle) else sTitle = strutils::join(&sFileName[0], &sFileName[0] + nBuffers, _T(" - ")); } - CMDIChildWnd::SetTitle(sTitle.c_str()); + CMergeFrameCommon::SetTitle(sTitle.c_str()); if (m_hWnd != nullptr) SetWindowText(sTitle.c_str()); } @@ -1255,12 +1257,12 @@ BOOL CImgMergeFrame::PreTranslateMessage(MSG* pMsg) return true; } } - return CMDIChildWnd::PreTranslateMessage(pMsg); + return CMergeFrameCommon::PreTranslateMessage(pMsg); } void CImgMergeFrame::OnSize(UINT nType, int cx, int cy) { - CMDIChildWnd::OnSize(nType, cx, cy); + CMergeFrameCommon::OnSize(nType, cx, cy); UpdateHeaderSizes(); } @@ -1326,7 +1328,7 @@ void CImgMergeFrame::OnIdleUpdateCmdUI() m_wndStatusBar[pane].SetPaneText(0, text.c_str()); } } - CMDIChildWnd::OnIdleUpdateCmdUI(); + CMergeFrameCommon::OnIdleUpdateCmdUI(); } /** -- 2.11.0