Modify

Opened 17 years ago

Closed 17 years ago

#1013 closed Bug (Fixed)

MDI childs doesn't adjust to parent windows client rect

Reported by: monoceres Owned by: J-Paul Mesnage
Milestone: 3.3.1.2 Component: AutoIt
Version: 3.3.1.0 Severity: None
Keywords: mdi child GUI client rect Cc:

Description

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)
GUISetBkColor(0)
GUISetState()

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


Do
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 by J-Paul Mesnage, 17 years ago

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 by monoceres, 17 years ago

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 by J-Paul Mesnage, 17 years ago

So you vote for a small script breaking.

in reply to:  3 comment:4 by anonymous, 17 years ago

Replying to Jpm:

So you vote for a small script breaking.

Yes.

comment:5 by J-Paul Mesnage, 17 years ago

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

comment:6 by J-Paul Mesnage, 17 years ago

Milestone: 3.3.1.2
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed in version: 3.3.1.2

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.