I need to get the width and height of the taskbar. Also I need the position of the taskbar. How can I get 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.
Well, since this question is composed on how to get the task bar coordinates I’ve decided to post another version of how to achieve this by using SHAppBarMessage function with ABM_GETTASKBARPOS message parameter.
I’ve posted two versions; one with and one without given task bar handle. Note that if you are sending ABM_GETTASKBARPOS message you should specify the hWnd member in the APPBARDATA structure as it’s mentioned in the ABM_GETTASKBARPOS description. So the first version is safe for this case. The second one works though but it’s formally wrong.
Note that this version (where the TAppBarData.hWnd member is not specified) works though but it’s wrong according to the MSDN.