Matg40 Posted April 19, 2007 Share Posted April 19, 2007 Hi! I tried to work with relative coords, but I can´t get the borderwidth of the window. I read a value from registry (-15), but the resulting coords aren´t correct. I took x + x(window) + x(control) + (-borderwidth) ; '-' because it´s a negative value => big errors Then I took x + x(window) + x(control) + (-borderwidth/2) ; '-' because it´s a negative value => little errors, but not correct... Is there another way to read the borderwidth? Made I an error? Best regards, Matg40 Link to comment Share on other sites More sharing options...
PaulIA Posted April 19, 2007 Share Posted April 19, 2007 Hi! I tried to work with relative coords, but I can´t get the borderwidth of the window. I read a value from registry (-15), but the resulting coords aren´t correct. I took x + x(window) + x(control) + (-borderwidth) ; '-' because it´s a negative value => big errors Then I took x + x(window) + x(control) + (-borderwidth/2) ; '-' because it´s a negative value => little errors, but not correct... Is there another way to read the borderwidth? Made I an error? Best regards, Matg40AFAIK, the correct way to get the border width of a window is with the GetSystemMetrics API call. Using Auto3Lib, it would look like this: #include <A3LWinAPI.au3> _Lib_ConsoleWrite("Window border width: " & _API_GetSystemMetrics($SM_CXBORDER)) You can used GetSystemMetrics to find out a host of other things too. Check out this MSDN link for more information. All fo the SM_ constants are defined in Auto3Lib if you want to play around with them. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Matg40 Posted April 20, 2007 Author Share Posted April 20, 2007 Hi! Thanks for the answer !!! There´re some very interesting system information functions, too... Best regards, Matg40 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now