I have an application which running smoothly in 32bit, but my client now requested it make it as 64bit. So i've gone thru migration from PB12.1 to PB12.6 B4138. Now I have a problem with one windows API (WindowFromPoint) it doesnt return proper handle in 64bit exe, but if I run the source which is in 32bit its working properly.
Function is declared from uo, as no matter what data type i use to declare, longptr, long or ulong still doesnt return correct value. Btw longptr it just return 0
Function longlong WindowFromPoint(long xx, long yy) library "User32.dll"
my uo which is calling the ext funtion instance declared as:
longlong hWnd, hPic, hLab
hWnd = Long(Handle(This))
hPic = Long(Handle(Glyph))
hLab = Long(Handle(Label))
this function (iswithin - bool) always returns false as ll_hnd and hWnd didnt match, while in 32bit it always match and working properly.
ll_hnd = Externs.WindowFromPoint(lpPoint.X, lpPoint.Y)
Return (ll_hnd = hWnd Or ll_hnd = hPic Or ll_hnd = hLab) And IsParentActive()
The iswithin function is called from mousemove event:
IF ObjectAtPoint <> This AND IsValid(ObjectAtPoint) THEN ObjectAtPoint.TriggerEvent("MouseLeave")
IF IsWithin() THEN
ObjectAtPoint = This
SetTimer(hWnd, 1, 1, 0)
IF FDown THEN
If Globals.ib_new_ui Then
If FCaptured Then StickyHighlight(cPressed) Else StickyHighlight(cHover)
//IF FCaptured THEN Lower(2)
ELSEIF FCaptured THEN
When iswithin return false, the button that supposed to be clickable is just like disabled. What could be wrong with this api WindowFromPoint?
This is the only api that is blocking my application and we cannot use it.