Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windowing
Window Properties
Functions
 RemoveProp Function
RemoveProp Function

The RemoveProp function removes an entry from the property list of the specified window. The specified character string identifies the entry to be removed.

Syntax

HANDLE RemoveProp(      
    HWND hWnd,     LPCTSTR lpString );

Parameters

hWnd
[in] Handle to the window whose property list is to be changed.
lpString
[in] Pointer to a null-terminated character string or contains an atom that identifies a string. If this parameter is an atom, it must have been created using the GlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of lpString; the high-order word must be zero.

Return Value

The return value identifies the specified data. If the data cannot be found in the specified property list, the return value is NULL.

Remarks

The return value is the hData value that was passed to SetProp; it is an application-defined value. Note, this function only destroys the association between the data and the window. If appropriate, the application must free the data handles associated with entries removed from a property list. The application can remove only those properties it has added. It must not remove properties added by other applications or by the system itself.

The RemoveProp function returns the data handle associated with the string so that the application can free the data associated with the handle.

Windows 95/98/Me:  RemovePropW is supported by the Microsoft Layer for Unicode (MSLU). RemovePropA is also supported to provide more consistent behavior across all Windows operating systems. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.

Windows Vista: RemoveProp is subject to the restrictions of User Interface Privilege Isolation (UIPI). A process can only call this function on a window belonging to a process of lesser or equal integrity level. When UIPI blocks property changes, GetLastError will return 5.

Example

For an example, see Deleting a Window Property.

Function Information

Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systems Windows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker