Jump to content

Child window/control size is different between ControlGetPos and AutoIt_Info


 Share

Recommended Posts

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? :)

screen.681.png

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

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 by VladV
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...