Click to See Complete Forum and Search --> : bitmap size
joscollin
September 9th, 2003, 07:45 AM
My program displays a bitmap in the client area of a window.
When i change the display settings from 800x600 to 1024x768
the bitmap becomes smaller.
I want to get the bitmap displayed in the same size as it is in 800x600.
thanks.
collin
JasonD
September 9th, 2003, 04:07 PM
The bitmap becomes smaller, or the client area becomes bigger? If you mean you want to display the bitmap the same size as viewed by the user (i.e. display it bigger when the resolution increases), then take a look at StretchBlt (http://msdn.microsoft.com/library/en-us/gdi/bitmaps_9cok.asp) or StretchDIBits (http://msdn.microsoft.com/library/en-us/gdi/bitmaps_1ppv.asp).
joscollin
September 10th, 2003, 02:33 AM
I have used StretchBlt in my code.
The image is bigger now
but it lacks clarity.
Doctor Luz
September 10th, 2003, 05:42 AM
Try with SetStretchBltMode(HALFTONE) before stretching the bitmap.
joscollin
September 11th, 2003, 12:40 AM
The bitmap fills the entire client area of when the window is maximised (in 800x600). But when the display setting is changed to 1024x768 it does not.
I want the bitmap to fill the client area in 1024x768 also.
Any thought greatly appreciated!
thanks,
collin.
Doctor Luz
September 11th, 2003, 06:37 AM
Use GetClientRect() to obtaing the client area dimensions and return them as the destination parameters in StretchBlt()
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.