Sign in to follow this  
Followers 0
kjactive

Child windows don't follow GuiResizeMode

11 posts in this topic

:D I notished that child windows do not follow the Opt GuiResizeMode docking parametre at all, and stays just where they are - is this correct or should they not do like controls with Opt - I think that they should but maybe I missed something...

;Example

#include "GUIConstants.au3"

Opt("WinSearchChildren", 1) ; what do this change...

; Create main window

$Main = GUICreate("Testing DockSize...",800,400,-1,-1,BitOR($WS_SIZEBOX,$WS_SYSMENU))

GUICtrlCreateGroup ("Group", 3, 8, 90, 200) ; group checkboxes

GUICtrlCreateButton ("Load Movie", 3,100, 90)

GUISetState()

; Create child window

$Child = GUICreate("",400,200,100,10,$WS_CHILD,-1,$Main) ; Inner child window

GUISetBkColor (0xE0FFFF)

GUISetState()

; Main IDCMP return and selection function

While 1

$msg = GUIGetMsg(1)

If $msg[0] = -3 then ExitLoop

WEnd

Kjactive :)

Share this post


Link to post
Share on other sites

:

Kjactive :)

<{POST_SNAPBACK}>

just use

$Child = GUICreate("",400,200,100,10,BitOR($WS_SIZEBOX,$WS_SYSMENU,$WS_CHILD),-1,$Main) ; Inner child window

:D

Share this post


Link to post
Share on other sites

Thanks for responce but that didn't helped me... I would like the attached child window to responce to the main window like the controls as they gain position but the child window did not responce like in another example...

to position a child window at middle of main window whit use -1 but that didn't work eighter as in previous example...

#include "GUIConstants.au3"

; Create main window

$Main = GUICreate("Testing DockSize...",800,400,-1,-1,BitOR($WS_SIZEBOX,$WS_SYSMENU))

GUICtrlCreateGroup ("Group", 3, 8, 90, 200) ; group checkboxes

GUICtrlCreateButton ("Load Movie", 3,100, 90)

GUISetState()

; Create child window

$Child = GUICreate("",400,200,-1,-1,BitOR($WS_SIZEBOX,$WS_SYSMENU,$WS_CHILD),-1,$Main) ; Inner child window

GUISetBkColor (0xE0FFFF)

GUISetState()

; Main IDCMP return and selection function

While 1

$msg = GUIGetMsg(1)

If $msg[0] = -3 then ExitLoop

WEnd

A child window responce to main window and -1 should be middle of main window but It didn't - this must be a bug?

Kjactive

Share this post


Link to post
Share on other sites

I don't really understand what you want to do.

if you want to react to click on the child window you have to create some controls.

the way you define the child mask even the system meny I mean the cross for instance.

Share this post


Link to post
Share on other sites

I want to have a docking childwindow attached in middle of a main window and if I resize the main window I want the child to be resized and still in middle positioned - The controls in main do this action automatically but the child window do not take same action...

Why do controls resize and relocate but not a docking window as in my previous example - that must be a bug or some function I overlooked

kåre

Share this post


Link to post
Share on other sites

I want to have a docking childwindow attached in middle of a main window and if I resize the main window I want the child to be resized and still in middle positioned - The controls in main do this action automatically but the child window do not take same action...

Why do controls resize and relocate but not a docking window as in my previous example - that must be a bug or some function I overlooked

kåre

<{POST_SNAPBACK}>

It is true that the resizing/redocking apply to only control inside a window. the child window is another window. So the resizing/redocking apply to control inside the child window.

You are looking to manage position between 2 windows so you need when the sizeof the main window change to resize/reposition yourself the position of the child by WinMove

So the conclusion was you overlooked :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Yes, I could imagine something like that but I think that fixed docking childwindows should have attached this auto change size and location as well as controls fixed objects with opt dock...

Childwindows is absolute related to the mother windows and I think that it's a mistake not to let these follow the same rules as any other objects in a window...

Maybe something to change in future...

Kåre

Edited by kjactive

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

It is true that the resizing/redocking apply to only control inside a window

What determines whether an object in a window is treated as a control or a Child window? the presence of a ControlId or ClassnameNN? If it were possible to assign the Child window a ControlId or ClassnameNN then perhaps this could be possible.

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Well I don't quiet get your point with quote: 'possible to assign the Child window a ControlId' windows like childs get IDs but I do not assign a window ID to a control I do oppesit, but if I got a docking childwindow in a mother window with some controls, well if I resize the mother window the control can resize automatically but the docked child window stays just the same all though it's fixed to the mother just as the controls - that's my point 'child windows in a mother window' is like a control and has to have same behave or they could end out of site or get cut into half if one minimize the mother and that's in my term bad...

Edited by kjactive

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

When a window is created, Child or otherwise, by AutoIt, the only return is the hWnd to that window....so were it possible to Optionally Return a ControlId or ClassnameNN, then perhaps what you want is possible.

It could be returned( to the script) in an array, so it would be up to the user whether or not to use it.

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
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
Sign in to follow this  
Followers 0