VladV Posted April 29, 2021 Share Posted April 29, 2021 Hello All! I am trying to manage a very old software with MDI interface... I've just discovered that for internal windows (=controls), the size given by ControlGetPos is different (smaller) than control size in AutoIt_Info - see screenshot attached. The handle is the same! Tried in actual 3, 3, 14, 5 and in beta 3, 3, 15, 3. Is it a bug or just a feature? Link to comment Share on other sites More sharing options...
Nine Posted April 29, 2021 Share Posted April 29, 2021 Not only the sizes but the positions are different. Looking at the difference, I think one is looking at client area while the other is looking at overall area. There is a difference of 8 in the left positon and there is a difference of 16 (2*8) in the width. That cannot be just a coincidence, right ? But without any replicable code, it is hard to guess further “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
VladV Posted April 29, 2021 Author Share Posted April 29, 2021 (edited) Bonjour/Hello Nine! I've tried different values for CaretCoordMode / GUICoordMode / MouseCoordMode / PixelCoordMode with the same result. Which of these values, you think, may affect SIZE values? My final trial code was very simple: Local $h=0x12345 ; control's handle copied from AutoIt_Info Local $a=ControlGetPos($h, "", 0) MsgBox($MB_SYSTEMMODAL+$MB_ICONERROR, "test", $a[2] & " x " & $a[3]) Edited April 29, 2021 by VladV Link to comment Share on other sites More sharing options...
JockoDundee Posted April 29, 2021 Share Posted April 29, 2021 1 hour ago, VladV said: Which of these values, you think, may affect SIZE values? IMHO, the problem is due to Windows Aero (and after). Basically, Windows put an invisible border around (most?) windows so that the window manager can do window tiling. (Who uses that?) I’ve never seen a generic solution to dealing with 3rd party apps Windows, aside from seeing what the offset is and subtracting 8 from the left and adding 8 to the right. Code hard, but don’t hard code... 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