Board index » cppbuilder » TPaintBox Replacement Needed

TPaintBox Replacement Needed

Dear BCB list,

There is  confirmed bug in the TPaintBox component in C++Builder 3 and 5. A
description of the bug is shown below.  I have given up trying to get
Borland to fix this.  A work around has proven very difficult so now I am
trying to find a third party component to use as a replacement for
TPaintBox.  If you know of any vendor who has an TPaintBox component which I
can investigate please post a web address.

Thank You
Patrick Mikula.

======================
Dear Patrick,

Thank you for submitting your bug report.  We have been able to reproduce
the problem you reported.  A description of it has been forwarded to our
product development team for further investigation and possible correction.

Bug description sent:
The X coordinate is wrong in an OnMouseDown event handler for a TPaintBox
object.
======================

 

Re:TPaintBox Replacement Needed


On Fri, 2 Feb 2001 13:58:19 -0600, "Patrick"

Quote
<patr...@marketwarrior.com> wrote:
>There is  confirmed bug in the TPaintBox component in C++Builder 3 and 5. A
>description of the bug is shown below.  I have given up trying to get
>Borland to fix this.  A work around has proven very difficult

Not difficult. Call GetCursorPos() to get the absolute cursor
position, then ScreenToClient() to translate it to the component's
co-ord system.

Re:TPaintBox Replacement Needed


Sometime it may not be true. GetCursorPos() returns
current cursor position, but OnMouseDown event contains
coordinates when event/message was occured.

 for "Michael Warner" <m...@ozemail.com.au> wrote in message
news:2jdn7tg54qlf39r5asbgs56qhghakdche3@4ax.com...

Quote
> On Fri, 2 Feb 2001 13:58:19 -0600, "Patrick"
> <patr...@marketwarrior.com> wrote:

> >There is  confirmed bug in the TPaintBox component in C++Builder 3 and 5.
A
> >description of the bug is shown below.  I have given up trying to get
> >Borland to fix this.  A work around has proven very difficult

> Not difficult. Call GetCursorPos() to get the absolute cursor
> position, then ScreenToClient() to translate it to the component's
> co-ord system.

Re:TPaintBox Replacement Needed


On Mon, 5 Feb 2001 16:06:17 +0800, "Tumurbaatar S." <tu...@datacom.mn>
wrote:

Quote
>Sometime it may not be true. GetCursorPos() returns
>current cursor position, but OnMouseDown event contains
>coordinates when event/message was occured.

In theory that's true, but in practice you'd rarely notice it. Calling
GetMessagePos() in the handler instead would avoid that problem.

Other Threads