15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


CScrollView's Limitation

kkok@checkfree.com
Friday, April 26, 1996

I am sure many of you know that CScrollView has a limitation of a range of=20=
32K.=20
I am wondering if anyone has written a class to overcome this limitation.




Sammi -- sigarashi@geographix.com
Monday, April 29, 1996


I am sure many of you know that CScrollView has a limitation of a range   
of
32K.
I am wondering if anyone has written a class to overcome this limitation.

Yes, I have. I ended up deriving my own class from CView, and did the   
scrolling manually, which allowed me to bump the scroll range to INT_MAX   
which is 2147483647. However, you can't just call ScrollWindow to   
actually scroll to INT_MAX. Instead of using "ScrollWindow", you should   
offset the drawing yourself and draw to the visible area of the view, so   
that the width or the height of the device context never goes beyond 32K.

I hope this helps.




Jeff Wishnie -- jwishnie@swellsoft.com
Tuesday, April 30, 1996

At 10:06 AM 29-04-96 -0600, you wrote:
>
>I am sure many of you know that CScrollView has a limitation of a range   
>of 32K.
>
Is this limitation under Win3.1 only or does it exist under Win95 and NT also?

- Jeff
jwishnie@swellsoft.com
415 552-3125(w)




Niels Ull Jacobsen -- nuj@kruger.dk
Wednesday, May 01, 1996

[Mini-digest: 3 responses]

By the way, I think that the scroll view is only limited in Win95 and Win32s
(due to the 16 bit GDI kernel). In NT it has the full 32 bit range.


Niels Ull Jacobsen, Kr=FCger A/S (nuj@kruger.dk)
Everything stated herein is THE OFFICIAL POLICY of the entire Kruger group
and should be taken as legally binding in every respect. Pigs will grow
wings and fly.

-----From: "David W. Gillett" 

  I'd expect it to reflect the GDI coordinate range, which is 32 bits 
under NT but only 16 bits under Win16 and 95.  [Since I do not expect 
to see screens with a resolution of more than 2K pixels along either 
axis during the lifetime of current OS versions, I haven't regarded 
this as an unreasonable limitation.]

Dave

 
-----From: pmoss@bbn.com (Peter Moss)

There seems to be a couple of limitations that are at work here.  If you are 
handling WM_VSCROLL with CWnd::OnVScroll, the nPos parameter is limited to 16 
bits.  The doc page for CWnd::GetScrollInfo states this and suggests using the 
SCROLLINFO structure to get a 32-bit position in the member nTrackPos.  This 
works and you can set 32-bit min/max values using CWnd::SetScrollInfo or 
CScrollView::SetScrollSizes.

HOWEVER, I have noticed that in Win95, the CWnd::SetScrollPos accepts values 
no greater than 32k for its nPos parameter.  It works fine for NT 3.51, but 
wraps in Win95.  

For this reason, I had to NORMALIZE my range (and write extra code to make it 
behave) to always be < 32k.  This was a pain, but seemed to be the only way to 
make it work in Win95.

Pete Moss




Patrick Down -- pdown@shout.net
Thursday, May 02, 1996

It exists in Win95 too but not NT I think.  This is a GDI limitation.
The GDI in Win 3.1 and Win95 only uses 16 bit integers for it's
coordinate system.  NT's GDI uses 32 bit integers, I believe.

At 10:35 AM 4/30/96 -0700, you wrote:
>At 10:06 AM 29-04-96 -0600, you wrote:
>>
>>I am sure many of you know that CScrollView has a limitation of a range   
>>of 32K.
>>
>Is this limitation under Win3.1 only or does it exist under Win95 and NT also?
>
>- Jeff
>jwishnie@swellsoft.com
>415 552-3125(w)
>
----------------------<(*)>|<(*)>---------------------------
pdown@shout.net
http://www.shout.net/~pdown/
-------------------------\___/------------------------------




Mike Blaszczak -- mikeblas@interserv.com
Saturday, May 25, 1996

> This is a GDI limitation.

No, it's not.  Scrollbars are a feature of USER, not of GDI.

.B ekiM
--
TCHAR szDisc[] = _T("These words are my own; I do not speak for Microsoft.");





On Thu, 02 May 1996, Patrick Down  wrote:
>It exists in Win95 too but not NT I think.  This is a GDI limitation.
>The GDI in Win 3.1 and Win95 only uses 16 bit integers for it's
>coordinate system.  NT's GDI uses 32 bit integers, I believe.
>
>At 10:35 AM 4/30/96 -0700, you wrote:
>>At 10:06 AM 29-04-96 -0600, you wrote:
>>>
>>>I am sure many of you know that CScrollView has a limitation of a range   
>>>of 32K.
>>>
>>Is this limitation under Win3.1 only or does it exist under Win95 and NT 
also?
>>
>>- Jeff
>>jwishnie@swellsoft.com
>>415 552-3125(w)
>>
>----------------------<(*)>|<(*)>---------------------------
>pdown@shout.net
>http://www.shout.net/~pdown/
>-------------------------\___/------------------------------
>
>





| Вернуться в корень Архива |