Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1460
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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