🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3501

TImage::OnMouseUp Event

#3501
From: Robert G. Hoover
Date: Tue, 06 Jun 2006 17:31
31 lines
1994 bytes
Hi,

In BCB6, I used TImages to draw my own buttons and used OnMouseDown and 
OnMouseUp to draw the down and up states for my buttons.

When the user pushed my button, it did not matter where (X,Y) he 
released the mouse button. My OnMouseUp routine fired and I had to check 
the bounds of my object.

// check bounds
if ((X >= 0) && (X < MyButton->Width)
  && (Y >= 0) && (Y < MyButton->Height))
{
   // do something...
}

Is this still necessary in BCB2006? My problem is that if something has 
been altered in BCB so that I do not have to check for the bounds 
anymore, then I need to snatch the mouse event to make sure my OnMouseUp 
event fires. The current behavior is that if I press the mouse button 
down over MyButton1 and drag over to MyButton2 and release the mouse 
button over MyButton2, then the MyButton1::OnMouseDown fires followed by 
the MyButton2::OnMouseUp. It's killing me! ;)

Can anyone help? Can I somehow override so that the user's mouse button 
release always fires the OnMouseUp event for the object that fired the 
OnMouseDown event?

Thanks!

Rob
Technical Details
Message-ID: <4485bbf9@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4c2b3964a410dac3,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 06 Jun 2006 13:31:27 -0400
From: "Robert G. Hoover" <not.a.real.address@anywhere.sorry>
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: TImage::OnMouseUp Event
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 0623-0, 06/05/2006), Outbound message
X-Antivirus-Status: Not-Tested
NNTP-Posting-Host: 67.142.36.34
Message-ID: <4485bbf9@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1149615097 67.142.36.34 (6 Jun 2006 10:31:37 -0700)
Lines: 31
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail