This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Populating a listview in a custom dialog box
Started by
jeff.yee
, Mar 09 2006 22:57
5 replies to this topic
Posted 09 March 2006 - 22:57
hi all,
I'm new to install shield and have a question on how to fill a listview control in a custom dialog box.
I am currently using Installshield 11.5 professional on a windows xp environment. I think I need to send messages to the control in order to add columns and other messages to add rows. My problem is that I am able to get a handle on the dialog, using the CmdGetHwndDlg method, but not able to get a handle on the control itself. I need to get the handle on the control itself in order to send a message to it.
I've tried using the GetDlgItem item and it always returns 0.
Any suggestions? or any easier way to manipulate items on the listview?
Thanks
Jeff
I'm new to install shield and have a question on how to fill a listview control in a custom dialog box.
I am currently using Installshield 11.5 professional on a windows xp environment. I think I need to send messages to the control in order to add columns and other messages to add rows. My problem is that I am able to get a handle on the dialog, using the CmdGetHwndDlg method, but not able to get a handle on the control itself. I need to get the handle on the control itself in order to send a message to it.
I've tried using the GetDlgItem item and it always returns 0.
Any suggestions? or any easier way to manipulate items on the listview?
Thanks
Jeff
Posted 10 March 2006 - 18:37
Have you tried CtrlSetList() ?
Stefan Krüger
InstallSite.org twitter facebook
Posted 13 March 2006 - 17:36
Hi Stefan,
Sorry it took so long to reply. I've tried using the CtrlSetList( ) to set the list for the listview control, but it didn't work. I tried the same thing but using the List Box control and was able to get the control populated.
Ideally, I would like to have three columns displaying the following columns:
* Driver Name
* Expected version
* Current version
Here's a snippet of the code that I used:
<snip>
listID = ListCreate( STRINGLIST );
ListAddString( listID, "hello world", AFTER );
CtrlSetList( "JeffTest", 1303, listID );
</snip>
Thank you for your help
Jeff
Sorry it took so long to reply. I've tried using the CtrlSetList( ) to set the list for the listview control, but it didn't work. I tried the same thing but using the List Box control and was able to get the control populated.
Ideally, I would like to have three columns displaying the following columns:
* Driver Name
* Expected version
* Current version
Here's a snippet of the code that I used:
<snip>
listID = ListCreate( STRINGLIST );
ListAddString( listID, "hello world", AFTER );
CtrlSetList( "JeffTest", 1303, listID );
</snip>
Thank you for your help
Jeff
Posted 13 March 2006 - 17:58
Why don't you use a ListBox?
Stefan Krüger
InstallSite.org twitter facebook
Posted 13 March 2006 - 19:19
can you display 3 columns in a listbox? if yes, how will I add the columns and add the rows so that they are seperated into the three columns
thanks
Jeff
thanks
Jeff
Posted 14 March 2006 - 12:54
I'm not sure. Sorry, I haven't worked with InstallScript projects recently. Maybe someone else can answer this question?
Stefan Krüger
InstallSite.org twitter facebook