Solved

How Do I stretch a background image?

Posted on 2007-12-05
4
1,419 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org (http://seleniumhq.org) Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

747 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

10 Experts available now in Live!

Get 1:1 Help Now