Browse Prior Art Database

Handling Saved Dialog Size and Position Following a Display Device Resolution Change

IP.com Disclosure Number: IPCOM000114925D
Original Publication Date: 1995-Feb-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 2 page(s) / 111K

Publishing Venue

IBM

Related People

Morgan, SA: AUTHOR [+2]

Abstract

One of the requirements of the Common User Access* (CUA) standards that apply to graphical user interfaces on an OS/2* Presentation Manager* (PM) platform is that the last size and position of a dialog is saved and reused the next time the dialog is displayed to the user. The user can size and move dialogs so that the usability of the interface is enhanced for that particular user. After this is done and the dialog is dismissed, the user expects that the next time the dialog displays it will be positioned at the same place and in the same size that it was when it was dismissed.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Handling Saved Dialog Size and Position Following a Display Device
Resolution Change

      One of the requirements of the Common User Access* (CUA)
standards that apply to graphical user interfaces on an OS/2*
Presentation Manager* (PM) platform is that the last size and
position of a dialog is saved and reused the next time the dialog is
displayed to the user.  The user can size and move dialogs so that
the usability of the interface is enhanced for that particular user.
After this is done and the dialog is dismissed, the user expects that
the next time the dialog displays it will be positioned at the same
place and in the same size that it was when it was dismissed.

      In PM programming, size and position of a dialog on the screen
is specified in absolute pels.  A given display has a fixed number of
pels in the vertical and horizontal directions, based on the display
screen resolution.  For a fixed resolution, coordinates specified in
pels causes a dialog to display in the same place and the same size
each time, as last seen by the user.

      A problem arises when the user changes the display the
workstation uses to show user applications.  This can occur because
the user has upgraded equipment; the display may have malfunctioned
and been replaced; or during testing of different displays using the
same workstation.  If the new display has a different screen
resolution than the previous one, the saved coordinates in pels are
not appropriate for the new display, and the dialogs shown on the new
display using the saved coordinates from the old display are not
optimally presented on the screen.

      When a dialog is first displayed to the user during the initial
running of the application, the dialog is sized and positioned per
the calculation as to its optimal values.  When dismissed, the final
size and position are saved, including any changes made by the user.
In order to save and restore the size and position of a dialog the
next time the dialog is displayed, the coordinates need to be written
to disk, such as in an initialization file.  When next requested to
be displayed, the initialization file is read and the previously
saved
coordinates for the dialog are used for this instance of the dialog.

      This common technique needs to be enhanced to handle the case
where the display is changed between runnings of the application.
The solution to the problem of stored coordinates based on one screen
resolution being used to display a dialog on a screen of different
resolution is to store the screen resolution of the saved data in the
same data structure that stores the size and position coordinates for
each dialog.  The current screen resolution can be determined by
using a DevQueryCaps OS/2 API call.
  The data structure stored for each dialog now contains:
  o  Dialog x position
  o  Dialog y position
  o  Dialog width
  o  Dialog height
  o  Screen horizontal resolution
  o  Sc...