Skip to content
⌘ NSIS Forum Archive

Header file for creating and handling listview control

16 posts

jiake#edited

Header file for creating and handling listview control

I am a Chinese NSIS fan. In a forum, a member named "gfm688" write a header file to create and handle a listview control with the report view. This header file is used to create a list view with report view and handle it. See the url below for details, 8 examples included.

A demo installer with listview control:

The source code of this demo is also included.

jiake#
I meant that you can make a page if you thought it is necessary, I wouldn't mind.

There are still something wrong in the comment of the script, but this does not affect the understanding.
jiake#edited
For the latest header file please click here:

or view the link above.
Maybe errors or bugs in the former attachment on the first floor of this thread.
MSG#
Originally Posted by jiake View Post
Maybe errors or bugs in the former attachment on the first floor of this thread.
I suggest you edit the first post as well.
jiake#
I thought maybe, in fact still some incorrect words in comments or readme file. Later I modify the example and macros in the page but this post is the beginning version, for the administrator have set that I cannot edit after 3 hours. Please edit my first post or remove the attachment, replace it with the page link and lock this thread if you can.
JohaViss#
How does one delete the selected item from the listbox?

There is a NSD_LV_InsertItem call for inserting items, but no NSD_LV_DeleteItem for removing an item.
jiake#edited
Originally Posted by JohaViss View Post
How does one delete the selected item from the listbox?
There is a NSD_LV_InsertItem call for inserting items, but no NSD_LV_DeleteItem for removing an item.
Originally Posted by Afrow UK View Post
Just send LVM_DELETEITEM.
Stu
Yes, it is very easy as Afrow said:
SendMessage listview_HWND ${LVM_DELETECOLUMN} col_idx 0
SendMessage listview_HWND ${LVM_DELETEITEM} item_idx 0

If you want to delete a specified item but not by item index, see this. A simple example modified by one of that in the attachment. Shows that how to delete selected item, delete all items, reload all items. Just using sendmessage simply.
lancelhoff#
Clickable link for Listview column text?

Is it possible to make a column item clickable? I'd like to eventually be able to turn some column item text into a clickable link.

Attached is an example screenshot:
T.Slappy#
Originally Posted by lancelhoff View Post
Is it possible to make a column item clickable? I'd like to eventually be able to turn some column item text into a clickable link.

Attached is an example screenshot:
I suppose NO, all this stuff is related to WinAPI and I found no mention about this feature there.
Btw in my real job where I work with MFC and I was trying to do this, but with no success 🙁
jiake#
The example script in the 13th floor of this thread has been updated.
Please visit the Wiki page for the latest example:

If any problems or suggestions, please contact me through email.
You can find it in signature below, or bottom of Wiki page.