I've never used WindowFromPoint,but seeing that one signature works in x32 and the other in x64,what i would do is check if my program is running in a 32 or 64 bits OS and call one or the other. To check what type of OS it's running you may check
this(StackOverflow)[
^]