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.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

FengYuanConnect With a Mentor Commented:
StretchBlt(x, y, width*scale, height*scale,
          hSrcDC, 0, 0, width, height, SRCCOPY);
PegasiAuthor Commented:
Just read what I wrote :) Clarification: I don't need whole window resizing thing. Just bitmap itself.
Use either StretchBlt or StretchDIBits. For example,

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