[MSW] [DarkMode] Enable Dark Mode support for native TaskDialog (Issue #26240)

13 views
Skip to first unread message

Mohmed abdel-fattah

unread,
Feb 24, 2026, 9:58:00 AM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed
memoarfaa created an issue (wxWidgets/wxWidgets#26240)

Description

This issue addresses the lack of dark mode support in TaskDialog-based components when wxApp::MSWEnableDarkMode() is enabled. Currently, the following dialogs appear with light backgrounds even when the application is in dark mode:

  • wxMessageDialog
  • wxRichMessageDialog
  • wxProgressDialog
  • wxAboutBox (simple version)

This is a documented limitation (see MSWEnableDarkMode documentation) because Windows doesn't natively provide dark TaskDialogs.

Proposed Enhancement

I have developed a working solution that successfully enables dark mode for all TaskDialog-based dialogs on Windows. The implementation:

  • Integrates with the existing wxMSWDarkMode infrastructure
  • Works on both Windows 10 and Windows 11
  • Preserves all native dialog functionality
  • Includes graceful fallback when dark mode cannot be applied
  • Is opt-in - only affects applications that enable dark mode

Visual Proof

Windows 11

https://github.com/user-attachments/assets/91d3117f-c5b8-4f0a-a78c-d87dc15e880e

Windows 10

https://github.com/user-attachments/assets/c01e5e34-6e32-48b3-a7ce-3d191d4d51d8

Testing

✅ Windows 11 (all recent builds)
✅ Windows 10 (versions 1809 through 22H2)
✅ All TaskDialog-based wxWidgets components
✅ Light/Dark system theme switching
✅ Backward compatibility with non-dark mode apps

Questions for the Team

  1. Would you be interested in a PR that implements dark mode support for TaskDialog-based dialogs?
  2. Are there any concerns about the approach that I should address before preparing a PR?
  3. Would you prefer this to be enabled automatically when dark mode is active, or should it have a separate opt-in flag?

Next Steps

I have a working implementation ready and can prepare a PR if the team agrees this enhancement would be valuable. The code is:

  • Non-intrusive - only affects dark mode-enabled applications
  • Backward compatible - existing behavior unchanged for non-dark mode apps
  • Well-tested across Windows versions

This would resolve the previously closed issue #24973 by providing a practical solution that maintains native dialog behavior while adding dark mode support.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26240@github.com>

Mohmed abdel-fattah

unread,
Feb 24, 2026, 10:16:12 AM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed
memoarfaa left a comment (wxWidgets/wxWidgets#26240)

Hi @vadz, @PBfordev, @MaartenBent, @EinTim23, @@MaartenBent, @ismail , @@RobertRoeb

I've been working on a related dark mode issue: enabling dark mode for native TaskDialogs (wxMessageDialog, wxRichMessageDialog, wxProgressDialog, wxAboutBox) on Windows.

This has been a documented limitation—even when wxApp::MSWEnableDarkMode() is used, TaskDialog-based components still appear with light backgrounds because Windows doesn't natively provide dark TaskDialogs. However, I've developed a working solution that successfully enables dark mode for all these dialogs on both Windows 10 and Windows 11.

What I've got working:
✅ Dark mode for all TaskDialog-based wxWidgets components

✅ Tested on Windows 10 (1809 through 22H2) and Windows 11 (all recent builds)

✅ Preserves all native dialog functionality

✅ Graceful fallback when dark mode can't be applied

✅ Opt-in design (only affects apps that explicitly enable dark mode)

Questions for the group:
Would this enhancement be valuable for the project?

Since this PR (#26182) already touches dark mode infrastructure, should TaskDialog dark mode follow similar patterns

Any concerns about compatibility or approach I should consider?

I have the implementation ready and can prepare a PR if there's interest. Looking forward to hearing your thoughts!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26240/3952827130@github.com>

VZ

unread,
Feb 24, 2026, 10:52:57 AM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26240)

PRs fixing this would definitely be welcome, of course! Looking forward to seeing how did you manage to make this working. TIA!


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26240/3953079749@github.com>

RobertRoeb

unread,
Feb 24, 2026, 12:30:09 PM (yesterday) Feb 24
to wx-...@googlegroups.com, Subscribed
RobertRoeb left a comment (wxWidgets/wxWidgets#26240)

Very welcome


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/26240/3953644404@github.com>

Reply all
Reply to author
Forward
0 new messages