Skip to content

Commit

Permalink
・ログウィンドウを閉じると開けないバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
amate committed Feb 6, 2016
1 parent 4a5d092 commit c0dd56e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Proxydomo/AppConst.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#endif

/// アプリケーションのバージョン
#define APP_VERSION _T("1.80")
#define APP_VERSION _T("1.80.1")



Expand Down
5 changes: 0 additions & 5 deletions Proxydomo/LogViewWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,6 @@ BOOL CLogViewWindow::OnInitDialog(CWindow wndFocus, LPARAM lInitParam)
return 0;
}

void CLogViewWindow::OnClose()
{
DestroyWindow();
}

void CLogViewWindow::OnDestroy()
{
CLog::RemoveLogTrace(this);
Expand Down
13 changes: 10 additions & 3 deletions Proxydomo/LogViewWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ class CLogViewWindow :
public:
enum { IDD = IDD_LOGVIEW };

enum { WM_APPENDTEXT = WM_APP + 100 };
enum {
WM_APPENDTEXT = WM_APP + 100,
WM_EXECDESTROYWINDOW = WM_APP + 101,
};

CLogViewWindow();
~CLogViewWindow();
Expand Down Expand Up @@ -99,8 +102,8 @@ class CLogViewWindow :

BEGIN_MSG_MAP_EX( CLogViewWindow )
MSG_WM_INITDIALOG( OnInitDialog )
MSG_WM_CLOSE( OnClose )
MSG_WM_DESTROY( OnDestroy )
MESSAGE_HANDLER_EX(WM_EXECDESTROYWINDOW, OnExecDestroyWindow)

COMMAND_ID_HANDLER_EX( IDCANCEL, OnCancel )
COMMAND_ID_HANDLER_EX(IDC_BUTTON_CLEAR, OnClear)
Expand Down Expand Up @@ -130,9 +133,13 @@ class CLogViewWindow :
// void OnCommandIDHandlerEX(UINT uNotifyCode, int nID, CWindow wndCtl)

BOOL OnInitDialog(CWindow wndFocus, LPARAM lInitParam);
void OnClose();
void OnDestroy();

LRESULT OnExecDestroyWindow(UINT uMsg, WPARAM wParam, LPARAM lParam) {
DestroyWindow();
return 0;
}

void OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl);
void OnClear(UINT uNotifyCode, int nID, CWindow wndCtl);
void OnViewConnectionMonitor(UINT uNotifyCode, int nID, CWindow wndCtl);
Expand Down
2 changes: 1 addition & 1 deletion Proxydomo/MainDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ LRESULT CMainDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/,

_SaveMainDlgWindowPos();

m_logView.PostMessage(WM_CLOSE);
m_logView.PostMessage(CLogViewWindow::WM_EXECDESTROYWINDOW);
m_threadLogView.join();

return 0;
Expand Down

0 comments on commit c0dd56e

Please sign in to comment.