Treeview的API全集(1)-----www.mvps.org
x As Long
y As Long
End Type
Public Type RECT ' rct
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Enum CBoolean
CFalse = 0
CTrue = 1
End Enum
' ================================================================
' Generic WM_NOTIFY notification messages.
' The lParam of all messages points to the NMHDR struct unless noted.
Public Enum CCNotifications
NM_FIRST = -0& ' (0U- 0U) ' generic to all controls
NM_LAST = -99& ' (0U- 99U)
NM_OUTOFMEMORY = (NM_FIRST - 1)
NM_CLICK = (NM_FIRST - 2)
NM_DBLCLK = (NM_FIRST - 3)
NM_RETURN = (NM_FIRST - 4)
NM_RCLICK = (NM_FIRST - 5)
NM_RDBLCLK = (NM_FIRST - 6)
NM_SETFOCUS = (NM_FIRST - 7)
NM_KILLFOCUS = (NM_FIRST - 8)
#If (Win32_IE >= &H300) Then
NM_CUSTOMDRAW = (NM_FIRST - 12)
NM_HOVER = (NM_FIRST - 13)
#End If ' 300
#If (Win32_IE >= &H400) Then
NM_NCHITTEST = (NM_FIRST - 14) ' lParam = NMMOUSE struct
NM_KEYDOWN = (NM_FIRST - 15) ' lParam = NMKEY struct
NM_RELEASEDCAPTURE = (NM_FIRST - 16)
NM_SETCURSOR = (NM_FIRST - 17) ' lParam = NMMOUSE struct
NM_CHAR = (NM_FIRST - 18) ' lParam = NMCHAR struct
#End If '400
End Enum
' ================================================================
' Generic WM_NOTIFY notification structures
' The NMHDR structure contains information about a notification message. The pointer
' to this structure is specified as the lParam member of the WM_NOTIFY message.
Public Type NMHDR
hwndFrom As Long ' Window handle of control sending message
idFrom As Long ' Identifier of control sending message
code As Long ' Specifies the notification code
End Type
#If (Win32_IE >= &H400) Then
Public Type NMMOUSE
hdr As NMHDR
dwItemSpec As Long
dwItemData As Long
pt As POINTAPI
dwHitInfo As Long ' any specifics about where on the item or control the mouse is
End Type
' Generic structure to request an object of a specific type.
Public Type NMOBJECTNOTIFY
hdr As NMHDR
iItem As Long
piid As Long
pObject As Long
hResult As Long
dwFlags As Long ' control specific flags (hints as to where in iItem it hit)
End Type
' Generic structure for a key
Public Type NMKEY
hdr As NMHDR
nVKey As Long
uFlags As Long
End Type
' Generic structure for a character
Public Type NMCHAR
hdr As NMHDR
ch As Long
dwItemPrev As Long ' Item previously selected
dwItemNext As Long ' Item to be selected
End Type
'
#End If ' WIN32_IE >= &H400
' ==============================================================
' Shared common control messages
#If (Win32_IE >= &H400) Then
Public Const CCM_FIRST = &H2000
Public Const CCM_SETBKCOLOR = (CCM_FIRST + 1) ' lParam is bkColor
Public Type COLORSCHEME
dwSize As Long
clrBtnHighlight As Long ' highlight color, COLORREF
clrBtnShadow As Long ' shadow color, COLORREF
End Type
Public Const CCM_SETCOLORSCHEME = (CCM_FIRST + 2) ' lParam is color scheme
Public Const CCM_GETCOLORSCHEME = (CCM_FIRST + 3) ' fills in COLORSCHEME pointed to by lParam
Public Const CCM_GETDROPTARGET = (CCM_FIRST + 4)
Public Const CCM_SETUNICODEFORMAT = (CCM_FIRST + 5)
Public Const CCM_GETUNICODEFORMAT = (CCM_FIRST + 6)
' For tooltips
Public Const INFOTIPSIZE = 1024
#End If ' WIN32_IE >= &H400
' ================================================================
' Treeview control definitions
' Classname
Public Const WC_TREEVIEW = "SysTreeView32"
' Treeview styles
Public Enum TVStyles
TVS_HASBUTTONS = &H1
TVS_HASLINES = &H2
TVS_LINESATROOT = &H4
TVS_EDITLABELS = &H8
TVS_DISABLEDRAGDROP = &H10
TVS_SHOWSELALWAYS = &H20
TVS_RTLREADING = &H40
#If (Win32_IE >= &H300) Then
TVS_NOTOOLTIPS = &H80
TVS_CHECKBOXES = &H100
TVS_TRACKSELECT = &H200
#If (Win32_IE >= &H400) Then
TVS_SINGLEEXPAND = &H400
TVS_INFOTIP = &H800
TVS_FULLROWSELECT = &H1000
TVS_NOSCROLL = &H2000
TVS_NONEVENHEIGHT = &H4000
#End If ' 400
#End If ' 300
TVS_SHAREDIMAGELISTS = &H0
TVS_PRIVATEIMAGELISTS = &H400
End Enum
'typedef struct _TREEITEM FAR* HTREEITEM;
' ================================================================
' TVITEM struct
Public Type TVITEM ' was TV_ITEM
mask As TVITEM_mask
hItem As Long
state As TVITEM_state
stateMask As Long
pszText As Long ' pointer
cchTextMax As Long
iImage As Long
iSelectedImage As Long
cChildren As Long
lParam As Long
End Type
#If (Win32_IE >= &H400) Then
' only used for Get and Set messages (not for notifications)
Public Type TVITEMEX
mask As TVITEM_mask
hItem As Long
state As TVITEM_state
stateMask As Long
pszText As Long ' pointer
cchTextMax As Long
iImage As Long
iSelectedImage As Long
cChildren As Long
lParam As Long
iIntegral As Long
End Type
#End If
Public Enum TVITEM_mask
TVIF_TEXT = &H1
TVIF_IMAGE = &H2
TVIF_PARAM = &H4
TVIF_STATE = &H8
TVIF_HANDLE = &H10
TVIF_SELECTEDIMAGE = &H20
TVIF_CHILDREN = &H40
#If (Win32_IE >= &H400) Then
TVIF_INTEGRAL = &H80
#End If
TVIF_DI_SETITEM = &H1000 ' Notification
End Enum
Public Enum TVITEM_state
TVIS_SELECTED = &H2
TVIS_CUT = &H4
TVIS_DROPHILITED = &H8
TVIS_BOLD = &H10
TVIS_EXPANDED = &H20
TVIS_EXPANDEDONCE = &H40
#If (Win32_IE >= &H300) Then
TVIS_EXPANDPARTIAL = &H80
#End If
TVIS_OVERLAYMASK = &HF00
TVIS_STATEIMAGEMASK = &HF000
TVIS_USERMASK = &HF000
End Enum
' TVITEM(EX).pszText
Public Const LPSTR_TEXTCALLBACK = (-1)
' TVITEM.iImage, TVITEM.iSelectedImage
Public Const I_IMAGECALLBACK = (-1)
' TVITEM.cChildren
Public Const I_CHILDRENCALLBACK = (-1)
' ================================================================
' Treeview messages
Public Enum TVHandles
TVI_ROOT = &HFFFF0000
TVI_FIRST = &HFFFF0001
TVI_LAST = &HFFFF0002
TVI_SORT = &HFFFF0003
End Enum
Public Type TVINSERTSTRUCT ' was TV_INSERTSTRUCT
hParent As Long
hInsertAfter As Long
#If (Win32_IE >= &H400) Then
' Union
' {
' use larger of two structs
itemex As TVITEMEX
' TVITEM item;
' } DUMMYUNIONNAME;
#Else
item As TVITEM
#End If
End Type
相关推荐
LuaForWindows无法安装解决的插件
LuaForWindows在安装的过程中需要连接服务器下载资源,有时候服务器连接不上,那么就安装不了。这个插件就是解决此问题的。
邻家书苑Android源码拆解:Java与SQLite构建社区图书借阅闭环
在Android原生开发中,数据持久化与业务状态管理始终是构建实用App的核心能力。本文以一款基于Java语言的社区图书借阅应用为例,解析如何利用SQLite完成用户、图书、借阅记录的表结构设计,并通过状态机驱动借阅流程的完整闭环。从RecyclerView列表优化到FileProvider适配,从AndroidX迁移到内存泄漏规避,梳理了Java版Android项目从环境配置到功能实现的关键路径。对于需要快速理解真实业务型App架构的开发者,这份源码展示了不依赖后端服务、纯本地单机的实现方案,其状态流转与
LuaForWindows安装.zip
LuaForWindows安装包,及安装失败解决插件(无法与无服务建立连接)
LuaForWindows安装失败(无法连接服务器).zip
代码下载链接: https://pan.quark.cn/s/bb86782a3ab5 在Windows系统下部署LuaForWindows时遭遇连接服务器失败的问题,可通过直接运行文件内Microsoft_Visual_C++_2005_SP1_Redistributable_Package.exe来实现插件安装
LuaForWindows安装失败(无法与服务器建立连接).zip
LuaForWindows安装失败(无法与服务器建立连接)解决方案,直接点击文件中Microsoft_Visual_C++_2005_SP1_Redistributable_Package.exe安装插件就行


API
