All Manuals > CAPI User Guide > 8 Modifying CAPI Windows > 8.2 Resizing and positioning


8.2.1 Positioning CAPI windows

You should not assume that a window is located where it has just been programmatically positioned. Instead you should query the current position by top-level-interface-geometry .

So if you wish to display CAPI interface windows W1 and W2 relative to each other. You should:

  1. Display W1 (by display ), then
  2. Query position of W1 , then
  3. Arrange for W2 to have the desired relative position, for example in its make-instance or later by set-hint-table , then
  4. Display W2 .

The reason for this is that the window system may disallow certain positions (for example on the Mac OS X menu bar) therefore you cannot be certain of the position of W1 .

CAPI User Guide (Windows version) - 30 Aug 2011