Board index » delphi » Large TPaintBox on TScrollBox

Large TPaintBox on TScrollBox

I am using Delphi 3 and have a TPaintBox on a TScrollBox. Everything
works fine until the PaintBox height (probably width too) becomes
greater than 32767. How can I get around this? I am using LineTo and
MoveTo on its canvas but looking at the API reference it is defined as
passing in what appear to be two C integers which I think are 16 bit
only (unlike delphi where they are dependant on the processor).

--
DIGITAL PROSPERITY PTY LTD  phone: +61 3 9761-3885
P.O. Box 557                fax:   +61 3 9761-3811
Boronia, Victoria 3155
http://www.luck-e-lotto.com.au

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 

Re:Large TPaintBox on TScrollBox


Quote
digitalprosper...@my-deja.com wrote:
> I am using Delphi 3 and have a TPaintBox on a TScrollBox. Everything
> works fine until the PaintBox height (probably width too) becomes
> greater than 32767. How can I get around this? I am using LineTo and
> MoveTo on its canvas but looking at the API reference it is defined as
> passing in what appear to be two C integers which I think are 16 bit
> only (unlike delphi where they are dependant on the processor).

Nope, that's not the problem. The problem is probably that the
WM_HSCROLL and WM_VSCROLL messages (implemented in TScrollingWinControl,
TScrollBox' ancestor) pass the Position value as a Smallint.

Perhaps there exist TScrollbar replacements at DSP / Torry's Delphi
Pages and so forth which don't have this problem (it is possible to
implement scrolling without the use of WM_HSCROLL/WM_VSCROLL).

Greetings, Robert
--
Robert Ro?mair
http://home.t-online.de/home/Robert.Rossmair/
____________________________________________
Real Programmers never work 9 to 5. If any real programmers
are around at 9 AM, it's because they were up all night.

Re:Large TPaintBox on TScrollBox


In article <7n61dk$fl...@nnrp1.deja.com>,

Quote
  digitalprosper...@my-deja.com wrote:
> I am using Delphi 3 and have a TPaintBox on a TScrollBox. Everything
> works fine until the PaintBox height (probably width too) becomes
> greater than 32767. How can I get around this? I am using LineTo and
> MoveTo on its canvas but looking at the API reference it is defined as
> passing in what appear to be two C integers which I think are 16 bit
> only (unlike delphi where they are dependant on the processor).

    I don't think you _can_ get around it. (Of course whatever you're
actually trying to be do can be done by some other method. But I
doubt that you can find a way to put a larger paintbox on that
scrollbox.)

Quote
> --
> DIGITAL PROSPERITY PTY LTD  phone: +61 3 9761-3885
> P.O. Box 557                fax:   +61 3 9761-3811
> Boronia, Victoria 3155
> http://www.luck-e-lotto.com.au

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Other Threads