Hi all,
I need to do something similar to "Fit image to window" in the lister window.
Thanks
What is the API function to get Fit image to window?
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
On Windows 2000/XP, you should call SetStretchBltMode with parameter HALFTONE, this gives the best looking results.
Here is the description from http://msdn.microsoft.com
HALFTONE:
Maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.
After setting the HALFTONE stretching mode, an application must call the SetBrushOrgEx function to set the brush origin. If it fails to do so, brush misalignment occurs.
This option is not supported on Windows 95/98/Me.
Here is the description from http://msdn.microsoft.com
HALFTONE:
Maps pixels from the source rectangle into blocks of pixels in the destination rectangle. The average color over the destination block of pixels approximates the color of the source pixels.
After setting the HALFTONE stretching mode, an application must call the SetBrushOrgEx function to set the brush origin. If it fails to do so, brush misalignment occurs.
This option is not supported on Windows 95/98/Me.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com