Click here to Skip to main content
14,240,756 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello, i'm developing a game in VC++ 6.0 with MFC. My screen resolution is 1280x1024 pixels, so i have a background bitmap with this size. The problem is when i change the resolution to be smaller, some parts of the pictures are not seen. I'm using BitBlt() function to display the bitmap.
I need to make it in that way:
If my screen resolution is 1280x1024 - the pic resolution to be that size
If my screen resolution is 1024x768 - the pic resolution to be that size
..........................................................................

Any ideas what i can do? Thanks in advance.
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

You could use StretchBlt() instead of BitBlt(), though it might not look very good. Use SetStretchBltMode() to change how the pixels are mapped from the source to the destination.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

You may use my DLL (see the article Plain C Resampling DLL) to resize the bitmap without loosing much quality (another option could be GDI+).
:)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100