forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VDS5: MOUSEOVER Gets Stuck
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Wed Nov 17, 2004 5:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Wed Nov 17, 2004 8:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Nov 18, 2004 6:17 am    Post subject: Reply with quote

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
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Thu Nov 18, 2004 10:03 am    Post subject: Reply with quote

Erm, I think so. Confused

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
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Nov 18, 2004 11:16 pm    Post subject: Reply with quote

Is this a fixable issue?
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Nov 19, 2004 9:41 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Nov 19, 2004 8:01 pm    Post subject: Reply with quote

Cool. Looking forward to VDS 6.
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Nov 30, 2004 7:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group