Opened 15 years ago

Closed 15 years ago

#1013 closed Bug (Fixed)

MDI childs doesn't adjust to parent windows client rect

Reported by: monoceres Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity: None
Keywords: mdi child GUI client rect Cc:


When using the $WS_EX_MDICHILD style the MDI child doesn't adjust properly to the parent window's client rect (as specified b the documentation).

The problem is illustrated in the sample below:

#include <GuiConstantsEx.au3>
#include <windowsconstants.au3>

$MainhWnd = GUICreate("Welcome", 400, 300)

$childhwnd = GUICreate("", 400, 300, 0, 0, $WS_POPUP+$WS_CHILD, $WS_EX_TOPMOST + $WS_EX_MDICHILD, $MainhWnd)
WinSetTrans($childhwnd, "", 128)

Until GUIGetMsg()=-3

Also, it seems there are no reliable way to move a MDI child within the parent window since WinMove() takes absolute screen coordinates.

Attachments (0)

Change History (6)

comment:1 Changed 15 years ago by Jpm

I am afraid to do a script breaking in making the code according to the doc, which is the most logical as title bar height can vary according to the theme
Perhaps I should just change the doc to say relative to windows area instead of client area.

comment:2 Changed 15 years ago by monoceres

So how should one handle the situation? Using the child mdi style seems very unreliable to me now since I have no idea where the child might appear on the target users machine.

I guess the GetSystemMetrics() api can solve the issue, but this is tedious todo with different styles and such, maybe something that could be solved internally?

comment:3 follow-up: Changed 15 years ago by Jpm

So you vote for a small script breaking.

comment:4 in reply to: ↑ 3 Changed 15 years ago by anonymous

Replying to Jpm:

So you vote for a small script breaking.


comment:5 Changed 15 years ago by Jpm

So I will do it
if menu is used in the parent windows it will be outside the client area

comment:6 Changed 15 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.