Resize bitmap on the screen

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.
LVL 1
PegasiAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
FengYuanConnect With a Mentor Commented:
StretchBlt(x, y, width*scale, height*scale,
          hSrcDC, 0, 0, width, height, SRCCOPY);

www.fengyuan.com
0
 
PegasiAuthor Commented:
Just read what I wrote :) Clarification: I don't need whole window resizing thing. Just bitmap itself.
0
 
FengYuanCommented:
Use either StretchBlt or StretchDIBits. For example,

StretchBlt(x, y, width*scale, height*scale,
           hSrcDC, width, height, SRCCOPY);
0
 
PegasiAuthor Commented:
Thank you, looks right what I need :)
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.

All Courses

From novice to tech pro — start learning today.