Add the icon module (VB) to the listview control title)

Source: Internet
Author: User
Add the icon module (VB) to the listview control title)
'Add to the module below.
The call is very simple and you can see it directly.
Private type lvcolumn
Mask as long
FMT as long
CX as long
Psztext as string
Cchtextmax as long
Isubitem as long
Iimage as long
Iorder as long
End type

Declare function sendmessagecolumn lib "USER32" alias "sendmessagea" (byval hwnd as long, byval MSG as long, byval wparam as long, lparam as any) as long
Const lvm_first = & h1000
'Listview column header Constants
Const lvcf_fmt = & H1
Const lvcf_width = & H2
Const lvcf_text = & h4
Const lvcf_subitem = & H8
Const lvcf_image = & H10
Const lvcf_order = & H20
'
Const lvcfmt_left = & H0
Const lvcfmt_right = & H1
Const lvcfmt_center = & H2
Const lvcfmt_justifymask = & h3
Const lvcfmt_image = & h800
Const lvcfmt_bitmap_on_right = & h1000
Const lvcfmt_col_has_images = & h8000

Public sub columnheaderseticon (lview as listview, column as columnheader, IMG as listimage)
Dim Col as lvcolumn
Dim RET as long
Col. Mask = lvcf_fmt or lvcf_image
Col. FMT = lvcfmt_left or lvcfmt_image or lvcfmt_col_has_images
Col. iimage = IMG. Index-1
Ret = sendmessagecolumn (lview. hwnd, lvm_first + 26, column. Index-1, col)
End sub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.