Sign in to follow this  
Followers 0
Ghabry

MDI-CHILD gets invisible when overlapped by another window

3 posts in this topic

Hi,

I created a GUI which contains of an embedded Child window.

It's working but when I move the (Child)Window outside the screen or overlap it with another Window the Child disappears.

Is there a way to fix this problem?

#include <GUIConstants.au3>

$FormMain = GUICreate("Test", 633, 441, 10, 10)
GUISetState(@SW_SHOW)
$Form2 = GUICreate("Child", 300, 300, 10, 10, $WS_CHILD, $WS_EX_MDICHILD, $FormMain)
$Labeltext = GUICtrlCreateLabel("Overlap this window by another", 100, 100, 100, 100)
GUISetBkColor ( 0xE0FFFF)
GUISetState(@SW_SHOW)

While 1
    Sleep(100)
WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I do not have autoit now to test it, but I'm guessing it's because the child GUI loses focus and it won't show in the task bar. Try pressing Alt+TAb to see if you can bring it back.

To solve this, I usually disable the parent GUI using @SW_DISABLE and then I re-enable it back once the child GUI is closed using @SW_ENABLE. This makes the child GUI stand on top of the Parent all the time...

If that's not your problem, then sorry for being nosy :):)

Edited by Nahuel

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I'm not certain about the correct styles usage on this, but it works for me.

slow repaint of window when overlapped by another window needs to be addressed

#include <WindowsConstants.au3>

$FormMain = GUICreate("Test", 633, 441, 10, 10,$WS_CLIPSIBLINGS)
GUISetState(@SW_SHOW)
$Form2 = GUICreate("Child", 300, 300, 10, 10, $WS_CHILD, -1, $FormMain)
$Labeltext = GUICtrlCreateLabel("Overlap this window by another", 100, 100, 100, 100)
GUISetBkColor ( 0xE0FFFF)
GUISetState(@SW_SHOW)
DllCall("user32.dll", "int", "SetParent", "hwnd", $Form2, "hwnd", $FormMain)

While (GUIGetMsg() <> -3)
    Sleep(100)
WEnd
Edited by rover

I see fascists...

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