Issues for win32 app with "PerMonitorV2" dpi awareness context when changing dpi while the window is minimized
I've created a native win32 app with "PerMonitorV2" dpi awareness context set in the manifest. It is a dialog app and the dpi awareness feature works as expected in most cases. But when I minimize the window and change the monitor dpi from the system settings by changing the scale factor, things start getting wierd. After restoring the app, the only thing appears in the screen is a tiny box as below
I've found that the app doesn't recieve the WM_GETDPISCALEDSIZE message from the system when minimized, and I think this may be the cause. Then I refered to the documents for WM_GETDPISCALEDSIZE message and it says "This message is only sent to top-level windows". I've also got the definition for top-level windows here "[about-windows][2]". I'm sure my app dialog is a top-level window when it is in the foreground but I'm not sure if it is still a top-level window when minimized.
I'm wondering if there is a method to let the system send WM_GETDPISCALEDSIZE message to a minimized wiondow when dpi changed (e.g. restore the dialog just before the system send the WM_GETDPISCALEDSIZE message), or is there any other way to make a minimized window respond to dpi changed properly.
Many thanks. [2]: https://learn.microsoft.com/en-us/windows/win32/winmsg/about-windows#parent-or-owner-window-handle