Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1454
  • Last Modified:

How Do I stretch a background image?

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
Barbless
Asked:
Barbless
  • 2
2 Solutions
 
itsmeandnobodyelseCommented:
Use StretchBlt GDI function.

Regards, Alex
0
 
DanRollinsCommented:
Hi Barbless,
Do you need additional help with this question?
0
 
BarblessAuthor Commented:
I finally figured out how to do it, and it does involve using StretchBit, but as directly as I thought it would be.
0
 
BarblessAuthor Commented:
* that's NOT as directly...
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now