balabuev 102 Posted February 1, 2021 I've encountered the following strange behavior of the mouse processing. xakvJV4k1M.mp4 Child controls are standard TScrollBox and TStringGrid controls. In this case: - Pressing mouse button over some specific region of a child control's client area magically treated as a mouse event over the scroll-bar. Mouse-down messages are not dispatched to the control in this case. - Clicking on the client area (of the same control) outside of mentioned specific region works normally. - At the same time clicking on scroll-bars also works normally. I've highlighted these inplicit magic regions on the following screenshot. They looks like scroll-bars, shifted some distance to the top: I see such strange behavior for the first time ever. And its interesting, what potentially I should do from WinAPI viewpoint to get such strange offset? Share this post Link to post
FPiette 383 Posted February 1, 2021 (edited) Could you show a minimal reproducible example of the behavior you observe? Publish the .pas and .dfm so that we can easily check if we reproduce the behavior here. Edited February 1, 2021 by FPiette Share this post Link to post
balabuev 102 Posted February 1, 2021 I thought that the reason may be somewhere inside the docking controls code, but, amazingly, I was able to reproduce the issue with simple standard controls. The project is attached: - Run the project - Press Button1, which will create the second borderless form - Press Button2, which will shift the form down slightly. - Try to press mouse button and drag to the right, as shown in attached video: c40EKHZBnq.mp4 Demo project sources: 102.rar Share this post Link to post
balabuev 102 Posted February 2, 2021 (edited) I've checked on Delphi 7 , Delphi 2010, Delphi XE, Delphi XE2, Delphi 10.4.1 - everywhere I've encountered this issue. I think it's more probably an issue of the current Windows build, but I may be wrong. My Windows build: 18363.1316 Edited February 2, 2021 by balabuev Share this post Link to post