Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How Do I stretch a background image?

Posted on 2007-12-05
4
Medium Priority
?
1,450 Views
Last Modified: 2013-12-14
Hi I have a C++/MFC program which loads a bitmap as background for a dialog box. All's well until the DPI settings changed from Normal to something bigger, that's when the bitmap is no longer big enough to cover the whole dialog box, leaving the right and bottom edge in the windows color.

The background is already a resource and I load it as:
  CDrawBitmap m_bmpBackground;
  m_bmpBackground.LoadBitmap (IDB_BITMAP_BKGD);

Is there a function readily available to stretch the bitmap?
0
Comment
Question by:Barbless
  • 2
4 Comments
 
LVL 39

Accepted Solution

by:
itsmeandnobodyelse earned 1200 total points
ID: 20419725
Use StretchBlt GDI function.

Regards, Alex
0
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 300 total points
ID: 20510432
Hi Barbless,
Do you need additional help with this question?
0
 

Author Comment

by:Barbless
ID: 20513202
I finally figured out how to do it, and it does involve using StretchBit, but as directly as I thought it would be.
0
 

Author Comment

by:Barbless
ID: 20513222
* that's NOT as directly...
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question