In general, the issue is that absolute coordinates are being used for some sizing rather than relative. The framework will initially lay things out correctly in large DPI, it's then up to you to keep things straight through resizes.
You can use a layout framework like this one: Ultimate Toolbox Layout Manager, or you can roll your own.
Here's a common pattern I use:
- Define a struct that captures ID, size, location, and layout behavior (anchor top|left|right|bottom) of a control
- In the document constructor initialize an array of structs with your desired layout behavior
- In
OnInitDialog
, capture the initial control positions, e.g. for controls set to anchor top left you need to grab the initial distance from the top and left of the parent.
- In
OnSize
, reposition and resize each control according to its layout behavior.