$aRet = _PickIconDlg(@SystemDir & "\shell32.dll", 8, WinGetHandle(""))
If Not @error Then MsgBox(64, "Results", StringFormat("IconFile Selected: %s\nIconID Selected: %i", $aRet[0], $aRet[1]))
Func _PickIconDlg($sFileName, $nIconIndex=0, $hWnd=0)
Local $nRet, $aRetArr[2]
$nRet = DllCall("shell32.dll", "int", "PickIconDlg", _
"hwnd", $hWnd, _
"wstr", $sFileName, "int", 1000, "int*", $nIconIndex)
If Not $nRet[0] Then Return SetError(1, 0, -1)
$aRetArr[0] = $nRet[2]
$aRetArr[1] = $nRet[4]
Return $aRetArr
EndFunc
|