Discussion:
How to display a bitmap Image in View
(too old to reply)
chinthamani
2006-12-22 09:27:16 UTC
Permalink
Hai,
I want to open a bitmap file and display in the view window of SDI.

Regards,
S.Vinodh Noel
(Software Engineer)
Bells Softech Ltd.
lee
2006-12-23 21:29:11 UTC
Permalink
I am a bit rusty, this is how I think it is done...

First load the bitmap:
-Get the filename of the bitmap using the Document's GetPathName
function.
-Load the bitmap file into memory using LoadImage.
-Store it in a member variable of the Document object.

In the OnDraw method in the View class:
-Get the bitmap handle from the member of the Document object where you
previously stored it.
-Use BitBlt to draw the bitmap onto the Device Context.
Post by chinthamani
Hai,
I want to open a bitmap file and display in the view window of SDI.
Regards,
S.Vinodh Noel
(Software Engineer)
Bells Softech Ltd.
Pavel S.Tsarevskiy
2007-03-17 10:50:05 UTC
Permalink
If you want to fit the the View (screatch image), you can use StretchBlt instead of BitBlt
Post by lee
-Get the bitmap handle from the member of the Document object where you
previously stored it.
-Use BitBlt to draw the bitmap onto the Device Context.
Loading...