mfc >> Display bitmap in larger dimensions than original

by Sam » Tue, 21 Mar 2006 14:03:40 GMT

How can i display an image in larger dimensions than its original
dimensions.
Image is to be displayed in a picture control .
E.G. a image of original dimension 320 X 240 is to be displayed in 800
X 600
i have tried it with

CPaintDC(this);
dc.StretchBlt(left, top, 800, 600, &m_dcMem, 0, 0,320,240, SRCCOPY);

but it get flooded on dialog box ?
is there any solution.
Plz reply quickly...



mfc >> Display bitmap in larger dimensions than original

by Sam » Tue, 21 Mar 2006 14:03:42 GMT


How can i display an image in larger dimensions than its original
dimensions.
Image is to be displayed in a picture control .
E.G. a image of original dimension 320 X 240 is to be displayed in 800
X 600
i have tried it with

CPaintDC(this);
dc.StretchBlt(left, top, 800, 600, &m_dcMem, 0, 0,320,240, SRCCOPY);

but it get flooded on dialog box ?
is there any solution.
Plz reply quickly...




mfc >> Display bitmap in larger dimensions than original

by AliR. » Tue, 21 Mar 2006 14:16:33 GMT

Why use the Picture control?

Why not simply StretchBlt strainght onto Dialog.


AliR.



Similar Threads

1. Setting a window dimensions larger than the screen display

2. Displaying bitmap in various dimensions in picture control with scrollbar

3. Displaying Large dynamic image or bitmap

I need to display a very large image (could be up to 1280 x 800,000) in two 
different scenarios.  The first is displaying in a CScrollView and the second 
is displaying in a dialog.

The image will be 1280 high and up to 850,000 wide.  I'm am dealing only 
with 8 bit grayscale data (potentially 1GB of data).

The CScrollView scenario is the easist to deal with because the entire size 
is known up front.  I'll worry about the dialog display later.

I can read the file header to determine how wide the image can be.  I then 
can read the raw bytes for the image and create a DIB or bitmap or whatever 
for the display.

As the user scrolls using the horizontal scrollbar of a CScrollView, I need 
to display the appropriate part of the image according to the scroll 
position.  I set the horizontal scroll width to match the width of the image.

So any suggestions on how to efficiently do this?  The scrolling of the 
display really needs to be smooth.

Thanks.


4. How to define and use large dynamic two dimension arrays

5. Obtaining dimensions and coordinates of display window of WebBrowser

Hello group,

This might be a little OT, but there's so much more activity in this 
group than in microsoft.public.dotnet.framework.interop... so be 
warned :o)

I have made a simple toolbar plugin for Internet Explorer.

I would like to be able to show a drop-down-type of window, similar to
Internet Explorer's security warnings.

To do this, I need the exact coordinates of the display window, but I
just cannot figure out how to obtain these.

I can get the coordinates of the entire browser window through my
WebBrowserClass reference, but this does not help me all the way,
since I do not know how to determine the height of top-docked toolbars
+ menu bar + address bar etc...

Any help will be appreciated :o) and thanks in advance!

The best,
Mogens

6. Fastest way to copy from a one dimension byte array to two dimension int array - CSharp/C#

7. difference between window dimensions and window client area dimensions

I need to find the difference between window dimensions and window
client area dimensions for an SDI application.  Currently I'm using
the brute force method:

		CRect clientRect;
		GetClientRect(&clientRect);

		CRect mainRect;
		GetWindowRect(&mainRect);

		int frameExtraX = mainRect.Width() - clientRect.Width();
		int frameExtraY = mainRect.Height() - clientRect.Height();

This is ugly and doesn't always work, so I would like to get
frameExtraX and frameExtraY from some kind of system metrics values.

Thank you!

8. Best way to pan and adjust a large bitmap