13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

FunctionEnumPropsGetPropRemovePropSet PropDescriptionPasses the properties of a window to anenumeration function.Retrieves a handle associated with a stringfrom the window property list.Removes a string from the property list.Copies a string and a data handle to awindow's property list.Using property listsFigure 1.2Property listOnce a data handle is in a window's property list, any applicationcan access the handle if it can also access the window. This makesthe property list a convenient way to make data (for example,alternate captions or menus for the window) available to theapplication when it wishes to modify the window.Every window has its own property list. When the window iscreated, the list is empty. The SetProp function adds entries to thelist. Each entry contains a unique ANSI string and a data handle.The ANSI string identifies the handle; the handle identifies thedata associated with the window, as illustrated in Figure 1.2:ANSI String"binary data""icon""screen text"HandlehMemoryhiconhTextFor more information, see"Clipboard functions, " onpage 74.The data handle can identify any object or memory block that theapplication wishes to associate with the window. The GetPropfunction retrieves the data handle of an entry from the listwithout removing the entry. The handle can then be used toretrieve or use the data. The RemoveProp function removes anentry from the list when it is no longer needed.Although the purpose of the property list is to associate data witha window for use by the application that owns the window, thehandles in a property list are actually accessible to any applicationthat has access to the window. This means an application canretrieve and use a data handle from the property list of a windowcreated by another application. But using another application'sdata handles must be done with care. Only shared, globalmemory objects, such as GDI drawing objects, can be used byother applications. If a property list contains local or globalmemory handles or resource handles, only the application thatChapter 1, Window manager interface functions 81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!