Partager via


Using Window Properties (Windows Embedded CE 6.0)

1/6/2010

A window property is any data that an application assigns to a window. A window property is usually a handle to the window-specific data, but a window property can be any 32-bit value. Each window property is identified by a string name.

Applications typically use window properties to associate data with a subclassed window or a window in a multiple-document interface (MDI) application. In either case, using the extra bytes specified in the CreateWindow function or class structure to store the data is inconvenient for the following reasons:

  • An application could be unable to determine how many extra bytes are available or how the space is being used. By using window properties instead, the application can associate data with a window without accessing the extra bytes.
  • An application must access the extra bytes by using offsets. By using window properties instead, an application can access the data by using string identifiers instead of offsets.

The following table lists the functions that Windows Embedded CE provides to enable applications to use window properties.

Function Description

EnumPropsEx

Enumerates all of the entries in the property list of a window by passing the entries, one by one, to a specified callback function. EnumPropsEx continues until either EnumPropsEx enumerates the last entry in the property list or the callback function returns FALSE.

GetProp

Retrieves a data handle identified by a specified character string from the property list of a specified window.

PropEnumProcEx

Receives property entries from the property list for a window. PropEnumProcEx is an application-defined callback function used with the EnumPropsEx function.

RemoveProp

Removes an entry identified by a specified character string from the property list of a specified window.

SetProp

Adds a new entry or changes an existing entry in the property list of a specified window.

See Also

Other Resources

GWES Application Development