Dark mode message boxes 1.0#2301
Conversation
|
|
||
| int WINAPI SoftModalMessageBox_hook(MSGBOXDATA* lpData) | ||
| { | ||
| std::thread darkModeThread{SetDarkMode, lpData->lpszCaption, lpData->dwStyle}; |
There was a problem hiding this comment.
Using a thread here has several potential problems:
- The thread might run too late, which will cause the message box to become dark with a delay.
- If message box creation fails, or if it's closed too fast, the thread might become stuck in an infinite loop.
- What if there are several message boxes with the same title (e.g. "Error")?
- The thread loop may cause 100% CPU usage for some time, which isn't so good, especially for laptops.
Have you considered an alternative solution, such as hooking CreateWindow or a similar API?
|
the value of 45 and the font size 16, should be adjusted based on dpi.... it does not look correct on my system |
I updated the mod to be dpi aware. |
@marius-sucan I fixed the gray bar rendering. Also, on my system the default font size is smaller than what this mod uses. |
|
@MGGSK |
I don't see any difference in the font size on my pc, even on 300% dpi but I will add that font size option for users who want it. |
|
@MGGSK I have one laptop with WIN11 24H2 and it works fine there, and another laptop with WIN11 23H2 and it doesn't work there, maybe you have an idea why? |
Can you share a screenshot of the issue? |
|
@MGGSK And I emphasize that on the second laptop with WIN11 24H2 the mod works fine. |
|
@MGGSK |
I added the font size option in the mod settings. |
|
@MGGSK |
|
@MGGSK |
|
Is the mod ready for submission? Are you planning to look at the thread usage (#2301 (comment))? |
I am currently working on removing the thread usage. |
|
@MGGSK |



Enables dark mode for message boxes.