Skip to content

Commit

Permalink
Fixed Custom MessageBox regression that would freeze the Trade Manage…
Browse files Browse the repository at this point in the history
…ment dialog.
  • Loading branch information
PaulSquires committed Feb 27, 2024
1 parent 799fa9b commit 556b259
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion TradeTracker/src/Config/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SOFTWARE.
#include "Utilities/AfxWin.h"


constexpr std::wstring version = L"4.0.1";
constexpr std::wstring version = L"4.0.2";

enum class NumberFormatType {
American,
Expand Down
12 changes: 8 additions & 4 deletions TradeTracker/src/CustomMessageBox/CustomMessageBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ CCustomMessageBox CustomMessageBox;
// ========================================================================================
void CCustomMessageBox::OnClose(HWND hwnd) {
EnableWindow(hParent, false);
MainWindow.BlurPanels(false);
EnableWindow(MainWindow.hWindow, true);
if (hParent == MainWindow.hWindow) {
MainWindow.BlurPanels(false);
}
EnableWindow(hParent, true);
DestroyWindow(hwnd);
}

Expand Down Expand Up @@ -352,11 +354,13 @@ int CCustomMessageBox::Show(

hBackBrush = CreateSolidBrush(Color(back_color).ToCOLORREF());

MainWindow.BlurPanels(true);
if (hParent == MainWindow.hWindow) {
MainWindow.BlurPanels(true);
}

AfxCenterWindowMonitorAware(hwnd, hParent);

EnableWindow(MainWindow.hWindow, false);
EnableWindow(hParent, false);


// Fix Windows 10 white flashing
Expand Down

0 comments on commit 556b259

Please sign in to comment.