Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Algorithm for Managing a Locked Panel's Mouse in OS/2 Presentation Manager

IP.com Disclosure Number: IPCOM000107396D
Original Publication Date: 1992-Feb-01
Included in the Prior Art Database: 2005-Mar-21
Document File: 1 page(s) / 39K

Publishing Venue

IBM

Related People

Swearingen, C: AUTHOR

Abstract

The locking of a panel to mouse input is a common need in applications. The problem solved is to provide a consistent method to lock the users mouse when it is over a particular panel.

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

Algorithm for Managing a Locked Panel's Mouse in OS/2 Presentation Manager

       The locking of a panel to mouse input is a common need
in applications.  The problem solved is to provide a consistent
method to lock the users mouse when it is over a particular panel.

      Two characteristics of a mouse on a locked panel are the mouse
pointer shape changes and any mouse button clicks should
conditionally beep.

      The invention for managing a locked mouse is illustrated in the
following algorithm by monitoring for the WM_HITTEST message.  It is
necessary to process the WM_HITTEST message differently when peeking
the queue to check for mouse clicks as the OS/2* Presentation
Manager* (PM) WinPeekMsg API generates a WM_HITTEST message when
called.
case WM_HITTEST:
      if (the panel is considered locked)  {
         if (we are not currently peeking the queue) {
            set a flag saying we are peeking the queue
            peek the queue
            turn the flag off saying we are peeking the queue
            if (the top message on the queue is a mouse click) {
               conditionally beep
               activate the application if necessary
            }
            if (the mouse is not captured) {
               issue an instruction to change the mouse shape
            }
            return(telling the c...