I've patched it by adding a new Attach() overload that exposes an isManaged parameter. Your solution is far better ;) Thanks for it.
CBitmap attached handle not deleted
Hi David, thanks for it. Will check it out, but I suppose it'll be supported starting from some Win10 version (1809...?). Anyway, meanwhile, I've subclassed CDialog to properly manage WM_DPICHANGED messages. Once the message is received, I disable CResizer, let Windows properly resize the dialog (it only changes locations and sizes), then I scale fonts and reactivate CResizer with the new positions. It works well and I'm satisfied ;) I've also switched my graphics (icons, bitmaps, ...) to vectorial...
Hi David, thanks for it. Will check it out, but I suppose it'll be supported starting from some Win10 version (1809...?). Anyway, meanwhile, I've subclassed CDialog to properly manage WM_DPICHANGED messages. Once the message is received, I disable CResizer, let Windows properly resize the dialog (it only changes locations and sizes), then I scale fonts and reactivate CResizer with the new positions. It works well and I'm satisfied ;) I've also switched my graphics (icons, bitmaps, ...) to vectorial...
Yes. I've seen that example but I'm not able to adapt it to my example. In the example I've attached (based on your DialogResizing sample), the dialog is a modal CDialog based window, without a View. // Constructor. CDialogApp::CDialogApp() : m_myDialog(IDD_DIALOG1) { } // Called when the application starts. BOOL CDialogApp::InitInstance() { //Display the modal dialog. m_myDialog.DoModal(); // throws a CWinException on failure. return TRUE; } Destroying it will terminate the app... I suppose there...
Additional note: the bug happens only when moving an already created dialog from one screen to another (with different DPI/Zoom). If the dialog is created directly on screen2 (150%) then its layout is correct; it could be because CResizer is initialized after windows have already resized the dialog upon creation.
Additional note: the bug happens only when moving an already created dialog from one screen to another (with different DPI/Zoom). If the dialog is created directly on screen2 (150%) then its layout is correct; it could be because CResizer is initialized after windows have already resized the dialog.
Additional note: the bug happens only when moving an already created dialog from one screen to another (with diferent DPI). If the dialog is created directly on screen2 (150%) then its layout is correct; it could be because CResizer is initialized after windows have already resized the dialog.