Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
353 Beiträge
 
#14

AW: Screenshot und Skalierung

  Alt 25. Nov 2024, 12:12
@tofse01 , do yourself a favor and drop using this half baked approach by copying DC, because this will always have problems unless it get way more complicated, a complexity which very needed here to do it right.

See, you are creating a DC then copying from the target application DC, did you queried the target DC scaling ? no you did not, to be done right this way you should align the DC in parameters (dimensions, color, device capability and of course scaling ), here comes the OS forced values and the target application if it is following the OS request or is doing it by its own custom drawing, example AlphaSkins does the scaling on its own (only if configured to do that or just leave it the OS).

Anyway, drop that approach and ask the target application to to the drawing for you ! this is simpler and will work exactly as intended no matter what OS is doing.

Please take a look at the answer here https://stackoverflow.com/questions/...ap-object-in-c

And use PrintWindow, or even the better approach with SendMessage of WM_PRINTCLIENT or WM_PRINT ..
https://learn.microsoft.com/en-us/wi...wm-printclient
Kas
  Mit Zitat antworten Zitat