Solved

Resize bitmap on the screen

Posted on 2001-08-07
4
259 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Different colored text in ComboBox without Subclassing 8 55
Folder Comparison 12 53
while loop over for loop 7 93
Message not shown 5 34
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

863 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

23 Experts available now in Live!

Get 1:1 Help Now