[v1.1] Bug in EnumChildFindPoint() in Script2.cpp Topic is solved

Report problems with documented functionality
just me
Posts: 9466
Joined: 02 Oct 2013, 08:51
Location: Germany

[v1.1] Bug in EnumChildFindPoint() in Script2.cpp

03 Jul 2023, 04:25

This bug is related to MouseGetPos and maybe others. I have not found a previous bug report.
v1.1:

Code: Select all

	// The given point must be inside aWnd's bounds.  Then, if there is no hwnd found yet or if aWnd
	// is entirely contained within the previously found hwnd, update to a "better" found window like
	// Window Spy.  This overcomes the limitations of WindowFromPoint() and ChildWindowFromPoint():
	if (pah.pt.x >= rect.left && pah.pt.x <= rect.right && pah.pt.y >= rect.top && pah.pt.y <= rect.bottom)
	{
It was already fixed in v2:

Code: Select all

	// The given point must be inside aWnd's bounds.  Then, if there is no hwnd found yet or if aWnd
	// is entirely contained within the previously found hwnd, update to a "better" found window like
	// Window Spy.  This overcomes the limitations of WindowFromPoint() and ChildWindowFromPoint().
	// The pixel at (left, top) lies inside the control, whereas MSDN says "the pixel at (right, bottom)
	// lies immediately outside the rectangle" -- so use < instead of <= below:
	if (pah.pt.x >= rect.left && pah.pt.x < rect.right && pah.pt.y >= rect.top && pah.pt.y < rect.bottom)
	{

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 73 guests