Merge pull request #1550 from oddMLan/master

[Debugger] Remember window positions
This commit is contained in:
zilmar 2019-01-14 16:41:21 +10:30 committed by GitHub
commit e881eae26e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 38 additions and 1 deletions

View File

@ -126,6 +126,7 @@ private:
NOTIFY_HANDLER_EX(IDC_CMD_LIST, NM_CUSTOMDRAW, OnCustomDrawList)
MSG_WM_DESTROY(OnDestroy)
CHAIN_MSG_MAP(CDialogResize<CDebugCommandsView>)
MSG_WM_EXITSIZEMOVE(OnExitSizeMove)
END_MSG_MAP()
BEGIN_DLGRESIZE_MAP(CDebugCommandsView)
@ -206,6 +207,7 @@ private:
LRESULT OnRegisterTabChange(NMHDR* pNMHDR);
LRESULT OnCustomDrawList(NMHDR* pNMHDR);
LRESULT OnDestroy(void);
void OnExitSizeMove(void);
void ClearEditedOps();
void EditOp(uint32_t address, uint32_t op);

View File

@ -183,7 +183,7 @@ LRESULT CDebugDMALogView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
RefreshList();
LoadWindowPos(DMALogView_Width, DMALogView_Height);
LoadWindowPos(DMALogView_Top, DMALogView_Left);
WindowCreated();
m_AutoRefreshThread = CreateThread(NULL, 0, AutoRefreshProc, (void*)this, 0, NULL);
@ -191,6 +191,11 @@ LRESULT CDebugDMALogView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
return TRUE;
}
void CDebugDMALogView::OnExitSizeMove(void)
{
SaveWindowPos(DMALogView_Top, DMALogView_Left);
}
LRESULT CDebugDMALogView::OnDestroy(void)
{
if (m_AutoRefreshThread != NULL)

View File

@ -54,6 +54,7 @@ private:
LRESULT OnRomAddrChanged(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
LRESULT OnCustomDrawList(NMHDR* pNMHDR);
LRESULT OnDestroy(void);
void OnExitSizeMove(void);
BEGIN_MSG_MAP_EX(CDebugDMALogView)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
@ -63,6 +64,7 @@ private:
COMMAND_HANDLER(IDC_DMA_ROM_EDIT, EN_CHANGE, OnRomAddrChanged)
NOTIFY_HANDLER_EX(IDC_DMA_LIST, NM_CUSTOMDRAW, OnCustomDrawList)
CHAIN_MSG_MAP(CDialogResize<CDebugDMALogView>)
MSG_WM_EXITSIZEMOVE(OnExitSizeMove)
END_MSG_MAP()
BEGIN_DLGRESIZE_MAP(CDebugDMALogView)

View File

@ -66,6 +66,11 @@ LRESULT CDebugScripts::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*l
return 0;
}
void CDebugScripts::OnExitSizeMove(void)
{
SaveWindowPos(Scripts_Top, Scripts_Left);
}
void CDebugScripts::ConsolePrint(const char* text)
{
::ShowWindow(*this, SW_SHOWNOACTIVATE);

View File

@ -118,6 +118,7 @@ public:
LRESULT OnScriptListClicked(NMHDR* pNMHDR);
LRESULT OnScriptListRClicked(NMHDR* pNMHDR);
LRESULT OnScriptListCustomDraw(NMHDR* pNMHDR);
void OnExitSizeMove(void);
BEGIN_MSG_MAP_EX(CDebugScripts)
COMMAND_CODE_HANDLER(BN_CLICKED, OnClicked)
@ -129,6 +130,7 @@ public:
CHAIN_MSG_MAP_MEMBER(m_ScriptList)
MSG_WM_DESTROY(OnDestroy)
CHAIN_MSG_MAP(CDialogResize<CDebugScripts>)
MSG_WM_EXITSIZEMOVE(OnExitSizeMove);
END_MSG_MAP()
BEGIN_DLGRESIZE_MAP(CDebugScripts)

View File

@ -72,6 +72,11 @@ LRESULT CDebugStackTrace::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM
return TRUE;
}
void CDebugStackTrace::OnExitSizeMove(void)
{
SaveWindowPos(StackTrace_Top, StackTrace_Left);
}
LRESULT CDebugStackTrace::OnActivate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
Refresh();

View File

@ -51,6 +51,7 @@ private:
LRESULT OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnListDblClicked(NMHDR* pNMHDR);
LRESULT OnDestroy(void);
void OnExitSizeMove(void);
BEGIN_MSG_MAP_EX(CDebugStackTrace)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
@ -59,6 +60,7 @@ private:
COMMAND_CODE_HANDLER(BN_CLICKED, OnClicked)
NOTIFY_HANDLER_EX(IDC_STACKTRACE_LIST, NM_DBLCLK, OnListDblClicked)
CHAIN_MSG_MAP(CDialogResize<CDebugStackTrace>)
MSG_WM_EXITSIZEMOVE(OnExitSizeMove)
END_MSG_MAP()
BEGIN_DLGRESIZE_MAP(CDebugStackTrace)

View File

@ -53,6 +53,11 @@ LRESULT CDebugStackView::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /
return 0;
}
void CDebugStackView::OnExitSizeMove(void)
{
SaveWindowPos(StackView_Top, StackView_Left);
}
LRESULT CDebugStackView::OnDestroy(void)
{
m_StackList.Detach();

View File

@ -30,12 +30,14 @@ private:
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT OnDestroy(void);
LRESULT OnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
void OnExitSizeMove(void);
BEGIN_MSG_MAP_EX(CDebugStackView)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
MSG_WM_DESTROY(OnDestroy)
COMMAND_CODE_HANDLER(BN_CLICKED, OnClicked)
CHAIN_MSG_MAP(CDialogResize<CDebugStackView>)
MSG_WM_EXITSIZEMOVE(OnExitSizeMove);
END_MSG_MAP()
BEGIN_DLGRESIZE_MAP(CDebugStackView)

View File

@ -55,6 +55,11 @@ LRESULT CDebugSymbols::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*l
return 0;
}
void CDebugSymbols::OnExitSizeMove(void)
{
SaveWindowPos(Symbols_Top, Symbols_Left);
}
LRESULT CDebugSymbols::OnDestroy(void)
{
m_SymbolsListView.Detach();

View File

@ -39,6 +39,7 @@ public:
LRESULT OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
LRESULT OnListDblClicked(NMHDR* pNMHDR);
LRESULT OnDestroy(void);
void OnExitSizeMove(void);
BEGIN_MSG_MAP_EX(CDebugSymbols)
COMMAND_CODE_HANDLER(BN_CLICKED, OnClicked)
@ -47,6 +48,7 @@ public:
NOTIFY_HANDLER_EX(IDC_SYMBOLS_LIST, NM_DBLCLK, OnListDblClicked)
//NOTIFY_HANDLER_EX(IDC_CMD_LIST, NM_RCLICK, OnListClicked)
CHAIN_MSG_MAP(CDialogResize<CDebugSymbols>)
MSG_WM_EXITSIZEMOVE(OnExitSizeMove);
END_MSG_MAP()
BEGIN_DLGRESIZE_MAP(CDebugSymbols)