luebbe 26 Posted August 17, 2023 Hi Folks, I've come across a problem with VCL styled applications. Some controls (not all) continuously fire WM_SETCURSOR messages, when the mouse cursor is stationary over a scrollbar and VCL styles are active. When the standard Windows style is used, everything works as expected. There are a few WM_SETCURSOR messages and they stop coming, when the mouse stops moving. This may not sound like a big deal, but on my PC the CPU load goes up from 1% to 15%..20% (one core almost at 100%) when this happens. We have a timing critical application, where the timing goes haywire, when the mouse is over a scrollbar of a TListView or a TScrollBox. At least ListView and ScrollBox exhibit this behaviour. EasyListView and VirtualStringTree don't. I haven't found the source of the problem yet, so help is greatly appreciated. Attached you will find an example with a TListView that exhibits the behaviour. Included is an .exe, compiled with Delphi 10.4.2. So if this doesn't happen with a newer compiler, we have a big incentive to upgrade 🙂 StyledWMSetCursor.zip Cheers & thanks Lübbe Share this post Link to post
ULIK 16 Posted August 17, 2023 I just tested your project against 10.2 as well as 11.3 and both do not show that behavior. Here the messages stop as soon as mouse stops, styles active or not. Share this post Link to post
luebbe 26 Posted August 17, 2023 Thanks for testing. Interesting. I wonder if this bug only happens with 10.4? I guess that my 10.4.2 exe shows the described behaviour on your PC? Share this post Link to post
ULIK 16 Posted August 17, 2023 Oh, didn't realized that you also added an exe. You're right: running your exe I can reproduce this behavior when styles are active. 1 Share this post Link to post
luebbe 26 Posted August 17, 2023 So it looks like a regression in 10.4 (or 10.3) to me. Thanks a lot again! In German we got the nice word "Verschlimmbesserung" for this. A mashup of Verbesserung = improvement and Verschlimmerung = aggravation. 🙂 Share this post Link to post
Anders Melander 1795 Posted August 17, 2023 2 hours ago, luebbe said: So it looks like a regression in 10.4 (or 10.3) to me. You need to have someone compile and run your project with 10.4.2 in order to conclude that. Right now you only know that your exe reproduces the problem and that an exe produced by one other person doesn't. Share this post Link to post
luebbe 26 Posted August 17, 2023 3 minutes ago, Anders Melander said: You need to have someone compile and run your project with 10.4.2 in order to conclude that. Right now you only know that your exe reproduces the problem and that an exe produced by one other person doesn't. We know the following: An exe produced by someone else with 10.2 is ok An exe produced by me with 10.4.2 is not ok An exe produced by someone else with 11.3 is ok An exe produced by me with 11.3 is ok (tested it in the mean time) Open question: An exe produced by someone else with 10.4.2 is ??? Share this post Link to post
Anders Melander 1795 Posted August 17, 2023 1 minute ago, luebbe said: An exe produced by someone else with 10.4.2 is ??? "Irrelevant" is the word you're looking for 🙂 If it works for you with 11.x then there is no problem. Share this post Link to post
luebbe 26 Posted August 17, 2023 1 minute ago, Anders Melander said: "Irrelevant" is the word you're looking for 🙂 If it works for you with 11.x then there is no problem. Exactly, so I will move on. At least this topic is conserved for posterity, so maybe it'll help someone else as well. Share this post Link to post