Aug 18, 2008
05:33 AM
Hi, I find a lot and finally make a solution which is correct or not i dont know. You need to create a custom action and need to map this function to this custom action. export prototype PopulateListCombo(HWND); //PopulateCombo function PopulateListCombo(hMSI) LIST StringList; STRING svString, sPath; NUMBER nResult, nPath; NUMBER hDatabase, hCBOView, hView, hRec; STRING szText; number index, nCount; STRING sQuery; begin index=0; hDatabase=MsiGetActiveDatabase(hMSI); sQuery="SELECT * FROM ComboBox WHERE Property='PROPNAME'"; nResult = MsiDatabaseOpenView(hDatabase,sQuery,hCBOView); hRec=MsiCreateRecord(4); StringList = ListCreate (STRINGLIST); ListAddString(StringList,"ZAQ",AFTER); ListAddString(StringList,"FAK",AFTER); ListAddString(StringList,"MAM",AFTER); nResult = ListGetFirstString (StringList, svString); MsiRecordSetString(hRec,1,'TESTPROP'); MsiRecordSetInteger(hRec,2,index); MsiRecordSetString(hRec,3,svString); MsiRecordSetString(hRec,4,svString); MsiViewModify(hCBOView,MSIMODIFY_INSERT_TEMPORARY,hRec); nResult = ListGetNextString (StringList, svString); while (nResult != END_OF_LIST) index=index+1; MsiRecordSetString(hRec,1,'TESTPROP'); MsiRecordSetInteger(hRec,2,index); MsiRecordSetString(hRec,3,svString); MsiRecordSetString(hRec,4,svString); MsiViewModify(hCBOView,MSIMODIFY_INSERT_TEMPORARY,hRec); nResult = ListGetNextString (StringList, svString); endwhile; MsiCloseHandle(hRec); MsiViewClose (hView); end; Remember to put your combo box Property name in to this line, Instead of TESTPROP. MsiRecordSetString(hRec,1,'TESTPROP');; I hope this will save some of your time. /Zaq
... View more
Aug 17, 2008
02:39 AM
Hi, I am working in Basic MSI project. I am trying to populate a combo box from a List of string. I read that CtrlGetText() will not work with basic msi. Then can anyone please help me that how i can populate a combo box runtime from a list of string. Zaq
... View more
Labels
- Labels:
-
InstallShield 2008
Latest posts by zakirulq
Subject | Views | Posted |
---|---|---|
567 | Aug 18, 2008 05:33 AM | |
4568 | Aug 17, 2008 02:39 AM |
Activity Feed
- Posted here is the solution on InstallShield Forum. Aug 18, 2008 05:33 AM
- Posted Need to Populate ComboBox data on InstallShield Forum. Aug 17, 2008 02:39 AM