Solved

How Do I stretch a background image?

Posted on 2007-12-05
4
1,434 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Title # Comments Views Activity
error when checking java version 4 4,909
eclipse luna javeEE perspecive missing 5 119
Recommendation vb6 to vb.net or others 14 211
Netbeans and org.apache.commons.lang3 issue 3 32
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

696 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