<wdhough@discussions.microsoft.com> wrote in
message
news:069f1a60-2d1e-46dc-8474-f2de281812e1@discussions.microsoft.com
> I have an application that draws a diagram in the form of a bitmap
> and then displays this in a window. There are limits placed in my
> code that do not allow
> the CSize properties cx and cy to be set to more than 32000 in
> 'SetViewportExt' and 'SetWindowExt'.
news:069f1a60-2d1e-46dc-8474-f2de281812e1@discussions.microsoft.com
> I have an application that draws a diagram in the form of a bitmap
> and then displays this in a window. There are limits placed in my
> code that do not allow
> the CSize properties cx and cy to be set to more than 32000 in
> 'SetViewportExt' and 'SetWindowExt'.
You seem to labor under a mistaken impression that SetViewportExt and
SetWindowExt somehow limit the size of the drawing. They don't. In fact, the
absolute values you specify in these two functions are irrelevant - all that
matters is a ratio of window extent to viewport extent, as this ratio is used to
translate logical coordinates to physical pixels. If you set both extents to the
same value, this ratio is 1 - the calls have no effect.
> CSize objects passed to the
> 'SetWindowExt' and 'SetViewportExt' methods had cy components that
> exceed 32000, in fact they were in the region of 69000. However when
> i doubled the size of my diagram, which is draw as a bit map, it
> failed.
> 'SetWindowExt' and 'SetViewportExt' methods had cy components that
> exceed 32000, in fact they were in the region of 69000. However when
> i doubled the size of my diagram, which is draw as a bit map, it
> failed.
Are you running on Win9x (95, 98, Millennium), by any chance In these, GDI
is implemented in 16 bit code (a legacy of old Win16 systems). As a result, it
can only handle coordinates in the range [-32768, 32767]. It sounds like you are
hitting this limit.
--
With best wishes,
Igor Tandetnik
--
With best wishes,
Igor Tandetnik

CDC Issue
Jing Sun
Will
John Ericson
news:123f6aaf-369f-45e3-a061-700567232433@discussions.microsoft.com
> Sorry just another thing to add, I noticed that we have the following
> call that checks that appears to check that the area we are rendering
> is never larger than the window size. I have checked through this
> code with a debugger and the 'if' statements never seem to be
> satisfied, nothing wrong with that!. However i checked out the
> attributes of the psize object of type CSize. its cx and cy
> components, for this enormous document that i am testing through are
> about 60000 and 1500 ish. This is obviously not the size of the
> window that i can see, so is there a problem here
--
With best wishes,
Igor Tandetnik
Paul Ballard
Erik Edlund
the CSize properties cx and cy to be set to more than 32000 in 'SetViewportExt' and 'SetWindowExt'. This limits my the amount of my diagram that i can draw, and believe it or not someone has managed to make a diagram that exceeds that would exceed the cy component of this diagram. I took these limits out in order to be able to display the whole diagram and it worked well, the CSize objects passed to the 'SetWindowExt' and 'SetViewportExt' methods had cy components that exceed 32000, in fact they were in the region of 69000. However when i doubled the size of my diagram, which is draw as a bit map, it failed. Let us be clear the parameter is was now setting the CSize object to that would be passed to the two previously mentioned methods, were 140000 (cy component) and 2000 (cx) component. The failure was that i had lines running over the top of my diagram, i spoke to someone who was previously involved this project and they told me without those limits, i was "killing the DC", sadly he couldnt tell me, anymore, it seems that there is some sort of limit
Can anyone help me with understanding this, or perhaps offer a solution
Many thanks
Will
WizDum
news:13374d9c-a551-47c7-8e82-2c407b523525@discussions.microsoft.com
> To my knowledge we dont render anything larger than the clients
> screen area.
> couple of hundred pages long that this happens.
--
With best wishes,
Igor Tandetnik
Dania151638
Hey thanks for the post, i'm actually running XP, the application will never run on win 9x, so thats not a problem. I have been reading about the viewport and windowext stuff just now, your right cant really see how it would have any effect on the program positive or negative. Do you have any idea whats wrong then Is there a maximum storage limit for a CDC The issue i have is applications like MS Word, or photoshop, or Adobe Reader are able to cope with documents that could be hundreds of pages long, and therefore its possible. As i understand the CDC is something of a canvas which windows 'paints' too I suspect i'm coming up against a limit in the size of that canvas, and wondered how those programs i just mentioned overcame that issue Do they have multiple canvases and if so, how do they link them succesfully I am quite suprised by how little i have found about this problem/issue on the web, which worries me as this would imply my problem is application specific!
Any more thoughts would be a great help
genyded
news:bab5bbe4-43ab-4f89-826b-ffd6edf9c450@discussions.microsoft.com
> The issue i have is applications
> like MS Word, or photoshop, or Adobe Reader are able to cope with
> documents that could be hundreds of pages long, and therefore its
> possible.
> windows 'paints' too I suspect i'm coming up against a limit in the
> size of that canvas, and wondered how those programs i just mentioned
> overcame that issue Do they have multiple canvases
--
With best wishes,
Igor Tandetnik
BringerOD
All we have is
if the page size exceeds 32000 in the y component then
CSize size;
size.cy = 32000;
dc.SetWindowExt ( size);
dc.SetViewportExt(size);
I dont know how overflow could come into that
Will
Big Ben