Solved

Resize bitmap on the screen

Posted on 2001-08-07
4
258 Views
Last Modified: 2013-11-20
I need to display the bitmap (or whatever but I think bmp is easiest) in the window and resize it (not cut edges but resize whole image) to fit window size. I don't want to use graphic libaries I think there must be somewhere support for this either in MFC or Platform SDK. Class name, method name would be enough.

Thank you.
0
Comment
Question by:Pegasi
  • 2
  • 2
4 Comments
 
LVL 1

Author Comment

by:Pegasi
ID: 6362460
Just read what I wrote :) Clarification: I don't need whole window resizing thing. Just bitmap itself.
0
 
LVL 5

Expert Comment

by:FengYuan
ID: 6362686
Use either StretchBlt or StretchDIBits. For example,

StretchBlt(x, y, width*scale, height*scale,
           hSrcDC, width, height, SRCCOPY);
0
 
LVL 5

Accepted Solution

by:
FengYuan earned 100 total points
ID: 6362688
StretchBlt(x, y, width*scale, height*scale,
          hSrcDC, 0, 0, width, height, SRCCOPY);

www.fengyuan.com
0
 
LVL 1

Author Comment

by:Pegasi
ID: 6362702
Thank you, looks right what I need :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

758 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

21 Experts available now in Live!

Get 1:1 Help Now