[module] Dlg 5.01
#1
Posted 05 March 2007 - 01:16 PM
#2
Posted 05 March 2007 - 01:21 PM
VarSetCapacity(i, 4, 0)
InsertInteger(idx, i, 0)
r := DllCall("shell32.dll\PickIconDlg", "uint", hGui, "uint", &wIcon, "uint", size, "int", &i)if I do this without VarSetCapacity and InsertInteger it will not work, the windows will receive ascii codes. Like, if you set idx := 1 31st icon will be selected as ASCII(1) = 31.Now, this is strange, I expect dll call to handle this as I specify "uint" as an parameter.
#3
Posted 05 March 2007 - 01:37 PM
<!-- m -->http://www.autohotke...topic16755.html<!-- m -->
#4
Posted 05 March 2007 - 02:02 PM
Hmm.. something is wrong with the function. Suddenly it stoped returning new path upon selection.... The index is returned correctly but the path stays the same as on input for some reason, even if you change it.
#5
Posted 05 March 2007 - 02:43 PM
#6
Posted 05 March 2007 - 02:46 PM
I changed the func, and left something that was there in my initial runs.. count of chars that i removed latter...
Btw, it counts null char, that is the reason for 1025 ~ Max_PATH*2 + 1
ok, just redownload
#7
Posted 05 March 2007 - 03:09 PM
#8
Posted 05 March 2007 - 03:30 PM
#9
Posted 05 March 2007 - 07:37 PM
#10
n-l-i-d
Posted 05 March 2007 - 10:14 PM
Icon doesn't insert correctly into your example for me.
Wondering... Does anybody know what the exact system requirements are for these emerging COM/OLE scripts? Does it need NT or IE or anything?
#11
Posted 05 March 2007 - 10:54 PM
s := "c:\windows\system32\shell32.dll" idx := 4 ChooseIcon(s, idx)
About COM, nothing special, just IE.
#12
n-l-i-d
Posted 05 March 2007 - 10:57 PM
I guess COM/OLE needs IE3, from reading a bit, and it should be available from Win95 on... Now I'm still wondering if all the COM scripts here actually would work on a Win95 system with IE3.
#13
Posted 05 March 2007 - 10:58 PM
Hmm, where did you get MAX_PATH is 512?Btw, it counts null char, that is the reason for 1025 ~ Max_PATH*2 + 1
AFAIK, MAX_PATH is 260 = 3 + 256 + 1, and the last 1 is indeed for the terminating null (:the first 3 is for drive like C:\).
#14
Posted 05 March 2007 - 11:02 PM
I'm afraid that you're a bit confused. There is no COM here, comdlg32.dll is Common Dialog (:there is indeed a custom comdlg32.ocx which is used by VB).I guess COM/OLE needs IE3, from reading a bit, and it should be available from Win95 on... Now I'm still wondering if all the COM scripts here actually would work on a Win95 system with IE3.
#15
Posted 06 March 2007 - 08:38 AM




