Compartilhar via


SetProp (Windows CE 5.0)

Send Feedback

This function adds a new entry or changes an existing entry in the property list of a specified window.

BOOL SetProp(HWND hWnd,LPCTSTR lpString,HANDLE hData);

Parameters

  • hWnd
    [in] Handle to the window for which you want to add or change an entry in the property list.
  • lpString
    [in] Pointer to a null-terminated character string that identifies the property that you want to add or change, or a global atom that identifies the string. If this parameter is a global atom, the application must create the atom by previously calling the GlobalAddAtom function. The application must place the atom, a 16-bit value, in the low-order word of the lpString parameter; the high-order word of lpString must then be zero.
  • hData
    [in] Handle to the data that you want to copy to the property list. The data handle can identify any value useful to the application.

Return Values

A nonzero value indicates that the data handle and string were successfully added to the property list. 0 indicates failure. To get extended error information, call GetLastError.

Remarks

SetProp adds a new entry to the list if the specified character string does not exist already in the list. The new entry contains the string and the handle. If the list already contains the specified character string, SetProp replaces the current handle associated with the string with the specified handle.

Before an application returns from processing a WM_DESTROY message and destroys a window, an application should remove all entries that the application added to the property list for the window by calling RemoveProp for each entry.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

GlobalAddAtom | RemoveProp | WM_DESTROY

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.