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

Simulating the Look and Feel of the Workplace Shell's System Menu

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

Publishing Venue

IBM

Related People

Morgan, SA: AUTHOR [+2]

Abstract

One of the distinctive features of a window that is part of of the OS/2* 2.1 Workplace Shell* is the appearance of its system menu. Presentation Manager* (PM) default action is to supply every window with a system menu that consists of the basic actions that can be done to the window, such as Restore, Move, Size, Minimize, Maximize, Hide, Close and Window List. Workplace Shell applications instead present a system menu that is the same as the popup menu for the opened application, with the default PM system menu appearing as a submenu from a Window menu item on the system menu pulldown.

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

Simulating the Look and Feel of the Workplace Shell's System Menu

      One of the distinctive features of a window that is part of of
the OS/2* 2.1 Workplace Shell* is the appearance of its system menu.
Presentation Manager* (PM) default action is to supply every window
with a system menu that consists of the basic actions that can be
done to the window, such as Restore, Move, Size, Minimize, Maximize,
Hide, Close and Window List.  Workplace Shell applications instead
present a system menu that is the same as the popup menu for the
opened application, with the default PM system menu appearing as a
submenu from a Window menu item on the system menu pulldown.

      For applications that do not inherit from the Workplace Shell,
but that need to have the look and feel of a Workplace Shell
application, such as the LAN NetView* View user interface, this
presents a difficult implementation problem.  This disclosure
describes a technique that any application can use to obtain a system
menu that has the same look and feel as a Workplace Shell window.

      The application needs to perform the conversion between system
menu styles only once per window, when the user first clicks on the
system menu icon to display the system menu.  The PM architecture of
the system menu has the actual menu itself as a submenu under the
system menu icon.  This submenu is obtained with a MM_QUERYITEM
message with the ID of the system menu submenu.  This will return a
structure with the window handle of the system menu which has the PM
default menu items on it.

      This submenu is then removed from the PM system menu by sending
a MM_REMOVEITEM message to the system menu.  The submenu is not
destroyed, it is just detached from the system menu icon.  It can
still be referenced by the application because its window handle was
obtained above.

      A new, empty menu, with the same ID as the submenu previously
removed, is now created using the WinCreateMenu API and attached to
the system menu icon with a MM_INSERTITEM message.  This is followe...