From fc6ef16cb3f9fe4c4e2c359c0065790de9023e8a Mon Sep 17 00:00:00 2001 From: oddMLan Date: Sun, 13 Jan 2019 22:52:11 -0700 Subject: [PATCH] [Debugger] Scripts: Remember window position --- Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp | 5 +++++ Source/Project64/UserInterface/Debugger/Debugger-Scripts.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp index 240ac0fe5..0c43496da 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp +++ b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.cpp @@ -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); diff --git a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.h b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.h index c18b0a772..c65d343b5 100644 --- a/Source/Project64/UserInterface/Debugger/Debugger-Scripts.h +++ b/Source/Project64/UserInterface/Debugger/Debugger-Scripts.h @@ -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) + MSG_WM_EXITSIZEMOVE(OnExitSizeMove); END_MSG_MAP() BEGIN_DLGRESIZE_MAP(CDebugScripts)