Highlighted
Absent Member.
Absent Member.
386 views

[archive] Issue with Floating Windows becoming Undocked

[Migrated content. Thread originally posted on 17 June 2010]

Hi... tried going to support and it was suggested to come here since it might involve the use of Windows API's.


Anyways, we are having an issue where child window becomes undocked from a parent window if the parent is moved.

The parent window is created in the first program:
DISPLAY STANDARD WINDOW HANDLE IN PROG-WIN-HANDLE
MODELESS BIND TO THREAD
LINES WINDOW-LINES
SIZE WINDOW-COLUMNS
SCREEN LINE WINDOW-LINE-NO
SCREEN COL WINDOW-COL-NO
CELL SIZE = LABEL FONT SMALL-FONT
CONTROL FONT SMALL-FONT
TITLE "Customer Inquiry"
BACKGROUND-LOW AUTO-RESIZE

At a later point in the program, it calls a program to produce the child window (which produces a data grid onto the parent window). This window is added as so:

DISPLAY FLOATING WINDOW HANDLE IN PROG-WIN-HANDLE
MODELESS BIND TO THREAD
CELL SIZE = LABEL FONT SMALL-FONT
CONTROL FONT SMALL-FONT
LINES 21.9 SIZE 108 AT LINE 8

....

So, when both programs are called you have the parent window and the child window on top of it with a data grid. When the user clicks and drags the title bar across the desktop, the parent window moves, but the child window stays where it was.

We've looked into a number of solutions, but haven't found a way to keep the two windows attached.

I've attached a couple screen shots to show the issue.

---

Any ideas on what to try?

Thanks for any and all help!
Mike
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

RE: [archive] Issue with Floating Windows becoming Undocked

You're going to have to inquire on screen 1 when it is moved and adjust screen 2 accordingly. I do not think there is a runtime mechanism that moves a second window when anoth window is moved, you'll need to program for that.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.