Skip to content

Commit

Permalink
Remove dead dialogue background code
Browse files Browse the repository at this point in the history
This removes various bits of dead code in various dialogue boxes that was being used to paint their backgrounds. This is no longer needed as it is now handled by the dark mode helpers.
  • Loading branch information
reupen committed Apr 2, 2023
1 parent 334be96 commit eb80a0b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
10 changes: 0 additions & 10 deletions foo_ui_columns/buttons_command_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,6 @@ INT_PTR CommandPickerDialog::on_message(HWND wnd, UINT msg, WPARAM wp, LPARAM lp
case WM_DESTROY:
deinitialise(wnd);
return TRUE;
case WM_ERASEBKGND:
SetWindowLongPtr(wnd, DWLP_MSGRESULT, TRUE);
return TRUE;
case WM_PAINT:
uih::handle_modern_background_paint(wnd, GetDlgItem(wnd, IDOK));
return TRUE;
case WM_CTLCOLORSTATIC:
SetBkColor((HDC)wp, GetSysColor(COLOR_WINDOW));
SetTextColor((HDC)wp, GetSysColor(COLOR_WINDOWTEXT));
return reinterpret_cast<INT_PTR>(GetSysColorBrush(COLOR_WINDOW));
case WM_COMMAND:
switch (wp) {
case IDC_GROUP | (LBN_SELCHANGE << 16):
Expand Down
10 changes: 0 additions & 10 deletions foo_ui_columns/item_details_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@ INT_PTR CALLBACK ItemDetailsConfig::on_message(HWND wnd, UINT msg, WPARAM wp, LP
modeless_dialog_manager::g_remove(wnd);
}
break;
case WM_ERASEBKGND:
SetWindowLongPtr(wnd, DWLP_MSGRESULT, TRUE);
return TRUE;
case WM_PAINT:
uih::handle_modern_background_paint(wnd, GetDlgItem(wnd, IDOK));
return TRUE;
case WM_CTLCOLORSTATIC:
SetBkColor((HDC)wp, GetSysColor(COLOR_WINDOW));
SetTextColor((HDC)wp, GetSysColor(COLOR_WINDOWTEXT));
return reinterpret_cast<INT_PTR>(GetSysColorBrush(COLOR_WINDOW));
case WM_CLOSE:
if (m_modal) {
SendMessage(wnd, WM_COMMAND, IDCANCEL, NULL);
Expand Down
14 changes: 2 additions & 12 deletions foo_ui_columns/item_properties_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,9 @@ INT_PTR CALLBACK ItemPropertiesConfig::on_message(HWND wnd, UINT msg, WPARAM wp,
Button_SetCheck(GetDlgItem(wnd, IDC_SHOWCOLUMNS), m_show_columns ? BST_CHECKED : BST_UNCHECKED);
Button_SetCheck(GetDlgItem(wnd, IDC_SHOWGROUPS), m_show_groups ? BST_CHECKED : BST_UNCHECKED);
} break;
case WM_DESTROY: {
case WM_DESTROY:
m_field_list.destroy();
} break;
case WM_ERASEBKGND:
SetWindowLongPtr(wnd, DWLP_MSGRESULT, TRUE);
return TRUE;
case WM_PAINT:
uih::handle_modern_background_paint(wnd, GetDlgItem(wnd, IDOK));
return TRUE;
case WM_CTLCOLORSTATIC:
SetBkColor((HDC)wp, GetSysColor(COLOR_WINDOW));
SetTextColor((HDC)wp, GetSysColor(COLOR_WINDOWTEXT));
return reinterpret_cast<INT_PTR>(GetSysColorBrush(COLOR_WINDOW));
break;
case WM_NOTIFY: {
const auto lpnm = reinterpret_cast<LPNMHDR>(lp);

Expand Down

0 comments on commit eb80a0b

Please sign in to comment.