Jump to content

Strange Parent Child problem


Cavok
 Share

Recommended Posts

I am working on some kind of Toolbar for an external application. The external application has a GUI to which I want to link my toolbar. The next two statements are used to get the handle of the external GUI and the creation of the toolbar respectively:

$Xh_Par = WinGetHandle($MAIN_WINDOW_TITLE)
$Xh_ToolBar = GUICreate($XTitle, $tool_width, $tool_height, $tool_left, $tool_top, "", $WS_EX_TOOLWINDOW, $Xh_Par)

As can be seen from the code, I link the toolbar as a child to the external parent window. Besides the toolbar as a child window, the external application can also create its own child windows in its parent window. This gives no problems, till I want to move one of these child windows. After moving a child window the window drops BEHIND the parent window. Clicking on the parent window displays the child window again. This only happens with the child windows of the external application, not with my toolbar as a child window.

The problem seems to be solved by setting the Toolbar window as always on top with the extended style $WS_EX_TOPMOST. However I do not want to display the toolbar when other applications are active (e.g. Word, Excel etc...), so I am looking for another way to solve this problem.

Is this a common problem withing AutoIT or am I doing something wrong? Hope some one can help me with a solution to solve this problem. Thanks in advance.

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