Browse Prior Art Database

Enabling Window Scrolling during Drag-Drop Operations

IP.com Disclosure Number: IPCOM000113226D
Original Publication Date: 1994-Jul-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 76K

Publishing Venue

IBM

Related People

Morgan, SA: AUTHOR [+2]

Abstract

OS/2* enables an application to provide drag-drop support to the user in a Presentation Manager* (PM) environment. While the drag is taking place, PM freezes the appearance of all windows on the desktop to avoid any painting problems as the drag icon crosses windows which may otherwise be updating beneath it. By freezing the desktop, PM makes it possible to only drop on the visible portions of the windows at the time the drag commenced.

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

Enabling Window Scrolling during Drag-Drop Operations

      OS/2* enables an application to provide drag-drop support to
the user in a Presentation Manager* (PM) environment.  While the drag
is taking place, PM freezes the appearance of all windows on the
desktop to avoid any painting problems as the drag icon crosses
windows which may otherwise be updating beneath it.  By freezing the
desktop, PM makes it possible to only drop on the visible portions of
the windows at the time the drag commenced.

      This presents a problem when the user wants to drag an object
from a visible portion of a window and drop it on an area currently
scrolled out of sight.  Window scrolling is disallowed due to the
desktop being frozen.  The user has to expand the window such that
both the source and the target of the drag are visible before the
drag commences.  In a window that is larger than the desktop, this
may not even be possible.

      This disclosure describes a technique an application can use to
enable window scrolling during drag-drop operations, such that the
user can start the drag, then scroll the window while the drag is in
effect so that the target area scrolls into view so that the drop can
occur.

      The solution to this problem is in several parts.  When the
drag commences, the application supporting the drag must first unlock
the desktop using the WinLockWindowUpdate API.  This will enable the
desktop to update during the drag-drop operation.

      The application then needs to establish an input hook to catch
keystrokes that occur during the drag.  An input hook catches all
keystrokes before any other window procedure processes them,
regardless of the window that is the primary destination.  An input
hook is established with the WinSetHook API, passing in the HK_INPUT
parameter and the name of the message procedure that will handle the
captured input messages.

      The input hook processing should examine all keystroke
messages, the WM_CHAR message, to see i...