Skip to content

Commit 5914cad

Browse files
committed
refactoring
1 parent 0eb8c5b commit 5914cad

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

MyTreeDialog.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,11 @@ void CMyTreeDialog::OnClickMyTree(NMHDR* pNMHDR, LRESULT* pResult)
439439
//---------------------------------------------------
440440
void CMyTreeDialog::OnKillFocusMyTree(NMHDR* pNMHDR, LRESULT* pResult)
441441
{
442-
RedrawWindow(NULL, NULL, RDW_FRAME | RDW_INVALIDATE);
443-
444442
if (m_isInitOK && !m_isModal && !m_bFind) {
445-
::PostMessage(theApp.GetAppWnd(), WM_TREE_CLOSE, IDCANCEL, NULL);
446-
KillTimer(CHARU_QUICK_TIMER);
447-
m_isInitOK = false;
443+
Cancel();
444+
}
445+
else {
446+
RedrawWindow(NULL, NULL, RDW_FRAME | RDW_INVALIDATE);
448447
}
449448
*pResult = 0;
450449
}
@@ -853,8 +852,8 @@ void CMyTreeDialog::Close(WPARAM wparam)
853852
m_bFind = false;
854853
}
855854
::PostMessage(theApp.GetAppWnd(), WM_TREE_CLOSE, wparam, NULL);
856-
m_isInitOK = false;
857855
KillTimer(CHARU_QUICK_TIMER);
856+
m_isInitOK = false;
858857
}
859858

860859
void CMyTreeDialog::Determine(STRING_DATA* dataPtr)

0 commit comments

Comments
 (0)