This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Handling ListView Control events with InstallScript
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 08, 2010
11:31 AM
Handling ListView Control events with InstallScript
Hi all.
I've just finished creating ListView control in InstallScript.
It was quite easy.
It just required to send messages to create ListView, like LVM_INSERTCOLUMN,LVM_INSERTITEM,LVM_SETITEM.
and to send messages to get the text from the selected item:
nItemID = SendMessage(hListWnd, LVM_GETNEXTITEM, -1, LVIS_SELECTED);
nBuffSize = SendMessage(hListWnd, LVM_GETITEMTEXT, nItemID, &lvit);
But how to catch the ListView message when its selected item changes?
I tried to catch it with DefineDialog + DLG_MSG_ALL/DLG_MSG_CUSTOMCTRL but didn't get any message related to it.
Do you have any clue?
I've just finished creating ListView control in InstallScript.
It was quite easy.
It just required to send messages to create ListView, like LVM_INSERTCOLUMN,LVM_INSERTITEM,LVM_SETITEM.
and to send messages to get the text from the selected item:
nItemID = SendMessage(hListWnd, LVM_GETNEXTITEM, -1, LVIS_SELECTED);
nBuffSize = SendMessage(hListWnd, LVM_GETITEMTEXT, nItemID, &lvit);
But how to catch the ListView message when its selected item changes?
I tried to catch it with DefineDialog + DLG_MSG_ALL/DLG_MSG_CUSTOMCTRL but didn't get any message related to it.
Do you have any clue?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 09, 2010
05:29 AM
Just to save your time, this code doesn't work:
Any other ideas?
#define LVN_FIRST (-100) // listview
#define LVN_ITEMACTIVATE (LVN_FIRST-14)
while (!bDone)
nId = WaitOnDialog( szDlg );
...
while(!PeekMessageA(&msg,hwndDlg,0,0,0))
if (msg.message = LVN_ITEMACTIVATE) then
SprintfBox(MB_OK,"","MESS=%d, HI=%d, LO=%d", msg.message, HIWORD(msg.wParam), LOWORD(msg.wParam));
endif;
endwhile;
...
endwhile;
Any other ideas?
