.判断开始 (msg = #WM_NOTIFY 且 wparam = GetDlgCtrlID (树型框1.取窗口句柄 ()))
CopyMemory_NMHDR (hdr, lparam, 12)
' 输出调试文本 (hdr.code)
.判断开始 (hdr.code = #NM_CUSTOMDRAW)
CopyMemory_NMLVCUSTOMDRAW (lvcd, lparam, 60)
.判断开始 (lvcd.nmcd.dwDrawStage = #CDDS_PREPAINT)
返回 (#CDRF_NOTIFYITEMDRAW)
.判断 (lvcd.nmcd.dwDrawStage = #CDDS_ITEMPREPAINT)
' 输出调试文本 (lvcd.nmcd.dwItemSpec)
.判断开始 (lvcd.nmcd.dwItemSpec = 取树型现选项句柄 ())
lvcd.背景颜色 = #深青
.默认
lvcd.背景颜色 = #白色
.判断结束
' lvcd.clrText = lvcd.nmcd.lItemlParam ' 改变项目的颜色值 颜色值为项目的数值
' lvcd.clrTextBk = lvcd.nmcd.lItemlParam
' lvcd.nmcd.uItemState = 0
.如果真 (lvcd.nmcd.lItemlParam ≠ 0)
lvcd.文本颜色 = lvcd.nmcd.lItemlParam
.如果真结束
调试输出 (wparam, lparam)
CopyMemory_NMLVCUSTOMDRAWTolParam (lparam, lvcd, 60)
返回 (#CDRF_NEWFONT)
下一篇 免模块注册软件例子