Closed malxau closed 2 years ago
Just a general question on look and feel to @malxau Why don't the childwindows of winfile have the flat design of the main window?
Would this be possible?
Why don't the childwindows of winfile have the flat design of the main window?
Does this refer to the 3D effect or the window decorations? If it's the 3D effect, that's this change, and I really don't mind reverting it - the only reason for doing it was to close one outstanding issue either as "we've done it" or "we decided not to do it", but don't leave it outstanding.
If it's the window decoration, then I don't think this is practical. Because winfile is MDI, the child windows are being rendered by GDI but the main window is being rendered by DWM and they're completely different beasts. In particular, GDI is stuck in Vista Basic because that's when it was assumed DWM would take over everything.
There's really two options I see, both sucky:
No I am fine with the 3d effect, and the sunken border. No need to revert.
The question was about sharp edges, and DWM rendering the childwindows, as I got from your answer. Going the manually rendered way is way to much effort. Thx, Question answered! :-)
I see a third possibility : create a personalized visual style, which draws a non-DWM window that looks like the DWM window (a kind of aero-10-basic window). Moreover, the problem of the "Vista-Basic" window, no longer arises when the visual style of Windows 10 goes to Aero Lite.
I think this third possibility and largely the cleanest solution. It is important not to change the operation of the MDI mode.
@OrthodoxWindows You might know something I don't, but this is what I was expecting the second option to be - either Windows displays the chrome in Vista Basic, or we tell it to display it differently, but that means we need to write something to control it. I was under the impression this would end up being a large undertaking, particularly when we have to consider "exotic" conditions like R2L title bars, high DPI, etc.
Can you point me to code which would use visual styles to make this type of change simple or straightforward?
This is to fix #242 . Note this is cosmetic and subjective, so it's completely fair if people think this not a change we want to make, although if there's a concern about the visual change, I think we should close #242 to clearly indicate this is not something to pursue. Note the visual change depends a little on the Windows version; I agree with the screenshot in 242 that this works better with the "classic" UI, although it's less clear on a more modern UI that it's visually superior.
In terms of implementation, note that the code has a frame window; within that there's a child which is the MDIClient; and within that are individual windows. Those windows are created via
WM_MDICREATE
which doesn't specify extended styles. So this change works by setting extended styles during create, then forcing a recalculation of the client area (since the nonclient area adds an extra pixel by setting this flag.)