How determine if mouse points to(hover on) maximise button of window even if this window is not of my application.
Is there API for that ?
How determine if mouse points to(hover on) maximise button of window even if this
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You may send a
WM_NCHITTESTto that window. The return value will correspond to the object type on the requested coordinates.Something like this:
Edit:
You may send this message to any window (not necessarily belong to your thread/process). Since no pointers are involved (such as string pointers) – there’s no problem.
However you should note that sending (not posting) a message to a window belonging to another thread is a pretty heavy operation, during which your thread is suspended. There may even happen a situation where your thread hangs, because the thread of the application that serves that window hangs.
You may consider using
SendMessageTimeoutto guarantee your thread won’t hang.