为什么我的代码都是这样同一个图表的呢?
测试代码:
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; 在ListView中增加一个列
; _hWinView = 句柄
; 输入:_dwColumn = 增加的列编号
; _dwWidth = 列的宽度
; _lpszHead = 列的标题字符串
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
_ListViewAddColumn proc _hWinView,_dwColumn,_dwWidth,_lpszHead
local @stLVC:LV_COLUMN
local hIml:DWORD
local hIcon1:DWORD
local hIcon2:DWORD
local hIcon3:DWORD
invoke ImageList_Create,16,16,ILC_MASK or ILC_COLOR24,1,10
mov hIml,eax
invoke LoadIcon,hInstance,10000
mov hIcon1,eax
invoke ImageList_AddIcon,hIml,eax
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
invoke LoadIcon,hInstance,10001
mov hIcon2,eax
invoke ImageList_AddIcon,hIml,eax
invoke DestroyIcon,hIcon1
invoke DestroyIcon,hIcon2
invoke SendMessage,_hWinView,LVM_SETIMAGELIST,LVSIL_SMALL,hIml
; mov eax,LVS_EX_FULLROWSELECT or LVS_EX_GRIDLINES or LVS_EX_SUBITEMIMAGES
; invoke SendMessage,_hWinView,LVM_SETEXTENDEDLISTVIEWSTYLE,0,eax
invoke RtlZeroMemory,addr @stLVC,sizeof LV_COLUMN
mov @stLVC.imask,LVCF_FMT or LVCF_TEXT or LVCF_WIDTH or LVCF_SUBITEM
mov @stLVC.fmt,LVCFMT_LEFT
push _lpszHead
pop @stLVC.pszText
mov @stLVC.cchTextMax,SIZEOF _lpszHead
push _dwWidth
pop @stLVC.lx
mov @stLVC.iSubItem,1
invoke SendMessage,_hWinView,LVM_INSERTCOLUMN,_dwColumn,addr @stLVC
invoke SendMessage,_hWinView,LVM_SETEXTENDEDLISTVIEWSTYLE,LVS_EX_GRIDLINES or LVS_EX_FULLROWSELECT,LVS_EX_GRIDLINES or LVS_EX_FULLROWSELECT
ret
_ListViewAddColumn endp
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>