网站首页  词典首页

请输入您要查询的函数:

 

术语 setprop
释义 SetProp
语法:
BOOL SetProp( HWND hWnd,
LPCTSTR lpString,
HANDLE hData
);
SetProp功能
该SetProp函数添加一个新条目或改变,在指定的窗口属性列表现有项目。该函数将一个新的条目到列表如果指定字符串不存在已经在列表中。新条目包含字符串和处理。否则,函数替换字符串的电流处理指定的处理。
参数
hWnd
[in]的窗口句柄的属性列表接收新条目。
lpString
[in]指向一个空结束的字符串或包含一个原子标识一个字符串。如果这个参数是一个原子,它必须是一个全球性原子因先前调用GlobalAddAtom函数创建。原子必须被放置在低lpString命令字;的高位字必须为零。
hData
[in]句柄数据要复制到的财产清单。数据处理可以识别任何值有用的应用程序。
返回值
如果数据处理和字符串添加到属性列表,则返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
前一个窗口被销毁(也就是在从处理WM_NCDESTROY消息返回),应用程序必须删除所有已添加到属性列表项。应用程序必须使用RemoveProp函数来删除这些项。
在Windows 95/98/Me:SetPropW是支持的Unicode(MSLU)微软层。 SetPropA也支持,提供更一致的行为,在所有Microsoft Windows操作系统。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
Windows Vista的:SetProp是受用户界面特权隔离(UIPI)的限制。一个进程可以只要求属于一个较低的Level或等于完整的工艺窗口这个功能。当UIPI块属性更改,GetLastError函数将返回5。
例如
有关示例,请参见添加一个窗口属性。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
窗口属性概述,GlobalAddAtom,RemoveProp,WM_NCDESTROY
==英文原文==SetProp Function
The SetProp function adds a new entry or changes an existing entry in the property list of the specified window. The function 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. Otherwise, the function replaces the string's current handle with the specified handle.
Syntax
BOOL SetProp( HWND hWnd,
LPCTSTR lpString,
HANDLE hData
);
Parameters
hWnd
[in] Handle to the window whose property list receives the new entry.
lpString
[in] Pointer to a null-terminated string or contains an atom that identifies a string. If this parameter is an atom, it must be a global atom created by a previous call to the GlobalAddAtom function. The atom must be placed in the low-order word of lpString; the high-order word must be zero.
hData
[in] Handle to the data to be copied to the property list. The data handle can identify any value useful to the application.
Return Value
If the data handle and string are added to the property list, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
Before a window is destroyed (that is, before it returns from processing the WM_NCDESTROY message), an application must remove all entries it has added to the property list. The application must use the RemoveProp function to remove the entries.
Windows 95/98/Me: SetPropW is supported by the Microsoft Layer for Unicode (MSLU). SetPropA is also supported to provide more consistent behavior across all Microsoft 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: SetProp 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 Adding a Window Property .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Window Properties Overview , GlobalAddAtom , RemoveProp , WM_NCDESTROY
==原始网址==http://msdn.microsoft.com/en-us/library/ms633568(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:21:10