Attaching Data to a Window

A window can keep a list of associated data called property items. Each property item contains a 32-bit handle for storing data and is uniquely identified by a character string. The window manages the list of properties, and the application can retrieve the data associated with a property item knowing only the window handle and the unique character string. You can use this feature to store virtually any information that relates to a particular window without using global variables. You can associate data with a window by using extra window data and the SetWindowLong and SetWindowWord functions. (However, in such cases, the data is not structured, and the application has to know the exact offsets for each value that ...

Get Microsoft Windows 2000 API SuperBible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.