函数功能:该函数从给定窗口的属性列表中检索数据句柄。给定的字符串标识了要检索的句柄。该字符串和句柄必须在前一次调用SetProp函数时已经加到属性表中。    函数原型:HANDLE GetProp(HWND hWnd,LPCTSTR lpString);    参数:    hWnd:指向要搜索属性表的窗口。    LpString:指向以null结尾的字符串指针,或者包含一个标识字符串的原子。如果该参数是一个原子,那么它必须是使用GlobalAddAtom函数创建的。原子是16位的数据值,它必须是放置在lpstring参数的低位率中,而高位字必须为O。    返回值:如果属性表中包含了给定的字符串,那么返回值为相关的数据句柄。否则,返回值为NULL。    速查:Windows NT:3.1以上版本;Windows:95以上版本;Windows CE:不支持:头文件:winuser.h;库文件:user32。lib;Unicode:在Windows NT环境中以Unicode和ANSI版本实现。
'in a module
Declare Function GetProp Lib "user32" Alias "GetPropA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Declare Function SetProp Lib "user32" Alias "SetPropA" (ByVal hwnd As Long, ByVal lpString As String, ByVal hData As Long) As Long
Declare Function RemoveProp Lib "user32" Alias "RemovePropA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Declare Function EnumProps Lib "user32" Alias "EnumPropsA" (ByVal hwnd As Long, ByVal lpEnumFunc As Long) As Long
Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (ByVal lpString1 As String, ByVal lpString2 As Long) As Long
Function PropEnumProc(ByVal hwnd As Long, ByVal lpszString As Long, ByVal hData As Long) As Boolean
    Dim Buffer As String
    'create ab buffer
    Buffer = Space(lstrlen(lpszString) + 1)
    'copy the string to the buffer
    lstrcpy Buffer, lpszString
    'show the buffer
    Form1.Print Buffer
    'continue enumeration
    PropEnumProc = True
End Function
'in a form
Private Sub Form_Load()
    'set the form's graphic mode to persistent
    Me.AutoRedraw = True
    'create a new property and set its value to 123
    SetProp Me.hwnd, "TestProp", 123
    'retrieve the value and show it
    MsgBox "Property Value:" + Str(GetProp(Me.hwnd, "TestProp"))
    'begin the enumeration
    EnumProps Me.hwnd, AddressOf PropEnumProc
    'remove the property
    RemoveProp Me.hwnd, "TestProp"
End Sub