| View previous topic :: View next topic |
| Author |
Message |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Wed Nov 17, 2004 5:39 pm Post subject: |
|
|
That doesn't make sense in the context of what I can see the runtime is doing. If the element receives a mouse enter message from Windows then it will generate an event. Possibly the real problem is the button glyph not accepting any more bitmap changes? But if that's the case, your proposed method would probably suffer from the same problem.
I did notice a note in the source code which said that VDS dialogs do not receive mouse leave messages. I don't know why that is, since I didn't write Windows or Delphi, it's just something I observed while trying to implement this feature. So the VDS runtime has to simulate these messages by using a timer to check the cursor position and see if it's still over the element. Therefore it probably uses just as much CPU as your method.
Like I said, I tried running your program and I couldn't reproduce the problem, so I'm at a loss to know what the problem is. VDS really wasn't designed to do this sort of thing, and writing complicated code to achieve it kind of defeats the object of using VDS. The proper solution is probably to use a multimedia button component that lets you load in the three bitmaps and then animates them automatically. When I get around to adding new dialog elements in VDS 6 I will look around for something like this. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Wed Nov 17, 2004 8:02 pm Post subject: |
|
|
| jules wrote: |
... I did notice a note in the source code which said that VDS dialogs do not receive mouse leave messages... |
I wrote a custom control in C, similiar to the BITBTN control, and noticed
that my window procedure also didn't recieve the mouse leave message
either. My work-around ended up being adding a little extra processing for
the WM_KILLFOCUS message, this was of course accomplished in the
window procedure for the C BITBTN and not the parent window.
My two cents... _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Thu Nov 18, 2004 6:17 am Post subject: |
|
|
Actually, before I even posted about this, I did add a WARN notice in
each of the branches. Once the enter is stuck, the event is no longer
being triggered for that element. I can't say whether the leave message
is working or not, since I can't even get the enter to work once stuck.
But, considering what you were saying, the state of the image would
in a way support your idea that the leave is getting stuck since the
image is still left in the over position. If this is true, then maybe the
enter message is being ignored since the previous message to leave
is stuck.
Ok, now that I'm confused, did you understand what I was trying to say?
If LEAVE is stuck, would that keep the ENTER from being fired off?
-Garrett _________________ 'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.) |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Thu Nov 18, 2004 10:03 am Post subject: |
|
|
Erm, I think so.
Each control has a boolean element to record whether it thinks the mouse is inside it, so it only sends a mouse enter the first time the mouse is inside it. If the value of this somehow becomes stuck, you won't get any more mouse enter messages for that control.
This boolean is cleared when the mouse leaves the control. Because of the problem of mouse leaves sometimes not being noticed, BITBTNs have this extra code that ensures that only one BITBTN can be down at a time. But BITMAPs don't have this extra checking. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Nov 18, 2004 11:16 pm Post subject: |
|
|
Is this a fixable issue? _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Fri Nov 19, 2004 9:41 am Post subject: |
|
|
You could try doing as I suggested and using a variable to record which button is down, and then trying to free it by using @sendmsg() to send a CM_MOUSELEAVE message to it. That's basically the kludgey solution used in the runtime to solve the problem for BITBTNs. I can't try it myself because I can't get the problem to occur in the first place.
A proper fix is on the list of things to look at for VDS 6. Whether CR has any interest in releasing a version of VDS 5 that addresses the problem is not for me to say.
On the whole, though, I will just repeat what I said earlier, that the real solution to Garrett's problem would be to add a new button type dialog element that does what he wants automatically. Hopefully, that will be possible in VDS 6. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Nov 19, 2004 8:01 pm Post subject: |
|
|
Cool. Looking forward to VDS 6. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Nov 30, 2004 7:02 pm Post subject: |
|
|
Interesting to note that Delphi 2005 has a similar problem. It has XP style menus, and I'm finding on a slower computer that it's leaving blue boxes round many menu items that the mouse has passed through and left. Also, Borland seems to have implemented some workaround to try to overcome the problem of stuck-down buttons and it's having the effect of sometimes causing the IDE to bring itself to the foreground when you move the mouse away from the Run button, obscuring the application you just started. It's taken a lot of time trying to minimize this problem: it doesn't seem possible to solve it completely. Those who are quick to complain when things in VDS don't work perfectly often don't realise the problems one has trying to get something apparently simple to work properly. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
|