win32, r51279 is also important for fixes. It doesn't allow to activate non-modal window if app is minimized together with modal window(s). In that case we are calling app restore.
I tested Win32 on Windows 7 and found couple of issues.
Each modal forms now appears on the taskbar as a separate button. Even if it is closed and then shown as a normal non-modal form, it still appears on the taskbar.
Maybe using "Params.Parent := Windows.GetDesktopWindow" at a window handle creation is not appropriate. This affects the whole life-cycle of the form.
@Denis, will be nice if you can test now and give feedback. Note that I'm doing all tests on Win 10 Pro 64bit and minimized modal forms are not above start button as in your screenshoot.
Modal forms no longer get squashed, they get minimized to taskbar as intended. Both Application.Minimize and the minimize frame button work the same way. That is great!
Remaining issue: Every modal form is shown separately on the taskbar (see the screenshot). Changing the default value of TForm.ShowInTaskbar from stDefault to stNever has no effect.
@Denis: for remaining issue: pls open separate issue for that, write your windows version also, and attach example project. Here everything looks ok, I'm on win10 pro 64bit.
No, no, no, Zeljko! You were not supposed to include pmAuto into consideration but the code should have shown you that the change is wrong.
The modal window needs WndParent!!!
Please do not solve the following code with the same approach but revert r51728 and 51749 and find a completely different approach without touching WndParent.