|
-
Oct 8th, 2019, 03:07 PM
#11
Re: CommonControls (Replacement of the MS common controls)
Don't wait too long for feedback. You are using some interfaces and methods I have never played with. I'm interested in it as it does look like it should be a better option than using ScaleX,ScaleY and trying to get container scalemode, etc, that I was initially using.
BTW, I did figure out in what scenarios mixing DPI awareness within a project would cause the OCX to not size correctly. It isn't just DPIs like 175%. The logic looks like this: If 1440 / GetDpiForSystem <> Screen.TwipsPerPixel. At 175%, 200% DPI, that calculation returns not equal. And when mixed awareness is in play, the calculation appears to work perfectly. When that calculation returns not equal, then sync is needed else is not. This is just FYI for you. I don't know if you plan on calling your new SyncObjectRectsToContainer during every resize or not. Prior to Win8.1, the old calculation will work just fine.
Tip: GetDpiForSystem is for Win10,v1607 or better. Need to use GetProcessAwareness for Win8.1 to Win10 before v1607.
Just saw your edited question. That's kinda tough. Right now, I know of two specific/different scenarios that cause DPICorrectionFactor<>1. Will there be more in future Win10 updates. If your new function does not trigger extra resize events, maybe always call it, else only call it when DPICorrectionFactor<>1.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|