Jump to content

Child GUI problem


Xandl
 Share

Recommended Posts

Hello,

I have an issue with the new beta(13). Assigning a parent to a GUICreate'ed

window seems not to work correct, or I am doing something wrong.

The same code works with the new release(12) version.

The problem is, that the second window does not show up with the beta,

but it gets created invisible.

Just try it by comment/uncomment the lines flagged as 'does not/work'.

#include <WindowsConstants.au3>
$GMainWin = GUICreate('$sAppTitle',300,200,Default,Default)
GUISetState(@SW_SHOW)

;$GcnpGui = GUICreate('$sCtrlTitle',240,160,Default,Default,Default,Default)            ; does work
$GcnpGui = GUICreate('$sCtrlTitle',240,160,Default,Default,Default,Default,$GMainWin)  ; does not work
GUISetState(@SW_SHOW)


While GUIGetMsg() <> -3
    Sleep(30)
WEnd

So please tell me, is there something wrong with my code?

ciao

Xandl

Link to comment
Share on other sites

Hello Zedna,

I tried using '-1', but it does not work for me either. These examples should show what I mean.

Does work with current beta(13):

$GMainWin = GUICreate('$sAppTitle',300,200,-1,-1)
GUISetState(@SW_SHOW,$GMainWin)

$GcnpGui = GUICreate('$sCtrlTitle',240,160,-1,-1,-1,-1)         ; does work
GUISetState(@SW_SHOW,$GcnpGui)

While GUIGetMsg() <> -3
    Sleep(30)
WEnd

Does not work with current beta:

$GMainWin = GUICreate('$sAppTitle',300,200,-1,-1)
GUISetState(@SW_SHOW,$GMainWin)

$GcnpGui = GUICreate('$sCtrlTitle',240,160,-1,-1,-1,-1,$GMainWin)  ; does not work
GUISetState(@SW_SHOW,$GcnpGui)

While GUIGetMsg() <> -3
    Sleep(30)
WEnd

Both examples do work as expected with the current release(12).

The OS is Win XP SP2, no themes used.

ciao

Xandl

Link to comment
Share on other sites

Ooops, the problem with my reproduction example was just a matter of seize :)

(seize of the main window)

This might even work more correct as the release version, but the window placement is different:

$GMainWin = GUICreate('$sAppTitle',600,400,-1,-1)
GUISetState(@SW_SHOW,$GMainWin)

;$GcnpGui = GUICreate('$sCtrlTitle',240,160,-1,-1,-1,-1)            ; does work
$GcnpGui = GUICreate('$sCtrlTitle',240,160,-1,-1,-1,-1,$GMainWin)  ; does not work
GUISetState(@SW_SHOW,$GcnpGui)

While GUIGetMsg() <> -3
    Sleep(30)
WEnd
With the current release version, the child window is centered, on the contrary, using the current beta version, the child window is displayed more far at the right bottom of the screen. I must be having a slightly different problem in my script, using different styles, as I can tab through the controls there and hovering over the buttons with the mouse shows them up, which I was not able to reproduce with these examples.

So all in all for the moment, the window placement differs, but I dont remember to read something about it in Jon's beta post (http://www.autoitscript.com/forum/index.php?showtopic=19717&view=findpost&p=532941).

ciao

Xandl

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...