Skip to main content

[archive] Issue with Floating Windows becoming Undocked

  • June 22, 2010
  • 1 reply
  • 0 views

[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

1 reply

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