|
Func _GetShortcutPos()
Local $hListView = ControlGetHandle('Program Manager', 'FolderView', 'SysListView321'), $ix = 0
Local $aShortcutPos[2]
While 1
$aRect = _GUICtrlListView_GetItemRect($hListView, $ix)
If $aRect[1] = 0 And $aRect[2] = 0 And $aRect[3] = 0 Then ExitLoop
If ControlListView('Program Manager', 'FolderView', 'SysListView321', 'GetText', $ix) = $sShortcut Then
$aShortcutPos[0] = $aRect[0] + 60
$aShortcutPos[1] = $aRect[1]
ExitLoop
EndIf
$ix += 1
WEnd
If $aShortcutPos[0] = 0 And $aShortcutPos[1] = 0 Then Return SetError(1)
Return $aShortcutPos
EndFunc ;==>_GetShortcutPos
这段在桌面找图标的代码 在64位系统上出错, 必须用64bit编译或运行才通过
用x86运行会出错,不知道可以解决吗 |
|