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

Process for a MicroSoft Windows SetWindowLong

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

Publishing Venue

IBM

Related People

Redpath, RJ: AUTHOR

Abstract

A method is described to supply a process to perform SetWindowLong() on any MicroSoft Windows* control for version 3.0 and 3.1. The identification of a Window Long Word access is a concatenation of the hex value window handle and the index number. The process is shown below through the function SetWindowULong, QueryWindowULong, and RemoveProps. Properties are used to store the first half and second half of a long. Two properties are used to store a long value since properties can only store words. The first half property is prepended with an 'A', and the second half is prepended with a 'B' for indentification/access.

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

Process for a MicroSoft Windows SetWindowLong

      A method is described to supply a process to perform
SetWindowLong() on any MicroSoft Windows* control for version 3.0 and
3.1.  The identification of a Window Long Word access is a
concatenation of the hex value window handle and the index number.
The process is shown below through the function SetWindowULong,
QueryWindowULong, and RemoveProps.  Properties are used to store the
first half and second half of a long.  Two properties are used to
store a long value since properties can only store words.  The first
half property is prepended with an 'A', and the second half is
prepended with a 'B' for indentification/access.
 void SetWindowULong (
         int   index,
         HWND  hwnd,
         ULONG data)
 {
    char name[10];
    sprintf (name, "A%x%x", hwnd,index);
    SetProp (hwnd, name, HIWORD(data));
    sprintf (name, "B%x%x", hwnd,index);
    SetProp (hwnd, name, LOWORD(data));
 }
  ULONG QueryWindowULong (int   index,
                         HWND  hwnd)
 {
    char name[10];
    WORD loword;
    WORD hiword;
    sprintf (name, "A%x%x", hwnd,index);
    hiword = GetProp (hwnd, name);
    sprintf (name, "B%x%x", hwnd,index);
    loword = GetProp (hwnd, name);
     return (MAKELONG(loword,hiword));
 }
  BOOL CALLBACK RemoveProps (
                  int    index,
             ...