#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Dim $IniName,$cbData
$Form1 = GUICreate("combo test", 300, 200)
$combo = GUICtrlCreateCombo("", 20, 20, 150)
GUISetState(@SW_SHOW)
$IniName = IniReadSectionNames("GR.ini")
If @error Then
MsgBox(16, "出错!", "配置文件可能有错误!")
Else
Dim $keys
For $i = 1 To $IniName[0]
$cbData &= $IniName[$i]
$keys = IniReadSection("GR.ini", $IniName[$i])
If @error Then
;
Else
$cbData &= ' --- '
For $j = 1 To $keys[0][0]
$cbData &= $keys[$j][0]
If $j=$keys[0][0] Then ContinueLoop
$cbData &= ', '
Next
EndIf
$cbData &= '|'
Next
GUICtrlSetData($combo, $cbData)
EndIf
|