Browse Prior Art Database

Two-State Control (IBM Value Add)

IP.com Disclosure Number: IPCOM000099409D
Original Publication Date: 1990-Jan-01
Included in the Prior Art Database: 2005-Mar-14
Document File: 1 page(s) / 36K

Publishing Venue

IBM

Related People

Redpath, RJ: AUTHOR

Abstract

To minimize the number of new controls added to PM, the idea of a two-state control has been developed. This provides flexibility for creating future and custom-defined controls.

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

Two-State Control (IBM Value Add)

       To minimize the number of new controls added to PM, the
idea of a two-state control has been developed.  This provides
flexibility for creating future and custom-defined controls.

      A Class is defined called CS_2STATE which has a class specific
data structure.  The structure is presented below. type struct
    HAB       hab;
    HBITMAP   bmp1,bmp2;
    CLASS2STATE; WinCreateWindow(parent, CS_2STATE(PSZ)0,
    WS_VISIBLE, 10,10,30,30,
    HWND_DESKTOP, HWND_TOP, ID,
    (PVOID)&ClassStructure, (PVOID)user_msg);
    The programmer defines a message which is associated with the
control.  This message is sent to the owner of the control to notify
when it has been switched.  The id is used to identify which control
is reacting.  The format of the programmer-defined message which is
returned to the parent window by the control when an action has
occurred is: PM1
    HIUSHORT  id
    LOUSHORT  toggle value (0 or 1) PM2
    HIUSHORT  0
    LOUSHORT  0
    To remove the control simply use the return value from the
WinCreateWindow() function to the WinDestroyWindow(HWND) function.
In addition, the window handle which is returned by the
WinCreateWindow() function can be used by the WinSet WindowPos()
function to resize the control.

      The class CS_2STATE can be used to build any custom controls
which are two-state based.  The programmer uses the class-specific
data str...