Solved

How Do I stretch a background image?

Posted on 2007-12-05
4
1,421 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 400 total points
ID: 20419725
Use StretchBlt GDI function.

Regards, Alex
0
 
LVL 49

Assisted Solution

by:DanRollins
DanRollins earned 100 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
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…
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now