Posted: Sun Sep 07, 2003 7:58 pm
Andre, thanks for the code archive, it make's a great reference. Just one suggestion, how about a "What's new" section? Also noticed some graphics files missing (I'll take note which next time I use it).
http://www.purebasic.com
https://www.purebasic.fr/english/
Probably I will add a "new" symbol to newly added codes in future versions.dmoc wrote:Andre, thanks for the code archive, it make's a great reference. Just one suggestion, how about a "What's new" section? Also noticed some graphics files missing (I'll take note which next time I use it).
Code: Select all
Declare.s GetSpecialfolder(CSIDL)
#CSIDL_DESKTOP = 0
#CSIDL_PROGRAMS = 2
#CSIDL_CONTROLS = 3
#CSIDL_PRINTERS = 4
#CSIDL_PERSONAL = 5
#CSIDL_FAVORITES = 6
#CSIDL_STARTUP = 7
#CSIDL_RECENT = 8
#CSIDL_SENDTO = 9
#CSIDL_BITBUCKET = $A
#CSIDL_STARTMENU = $B
#CSIDL_DESKTOPDIRECTORY = $10
#CSIDL_DRIVES = $11
#CSIDL_NETWORK = $12
#CSIDL_NETHOOD = $13
#CSIDL_FONTS = $14
#CSIDL_TEMPLATES = $15
Structure shItemID
cb.l
abID.b
EndStructure
Structure ItemIDlist
mkid.shItemID
EndStructure
a$= "Start menu folder: " + GetSpecialfolder(#CSIDL_STARTMENU)
b$= "Favorites folder: " + GetSpecialfolder(#CSIDL_FAVORITES)
c$= "Programs folder: " + GetSpecialfolder(#CSIDL_PROGRAMS)
d$= "Desktop folder: " + GetSpecialfolder(#CSIDL_DESKTOP)
e$= "Startup folder: " + GetSpecialfolder(#CSIDL_STARTUP)
MessageRequester("Info",a$+Chr(13)+b$+Chr(13)+c$+Chr(13)+d$+chr$(13)+e$,0)
Procedure.s GetSpecialfolder(CSIDL)
r = SHGetSpecialFolderLocation_(0, CSIDL, @IDL.ITEMIDLIST)
If r = #NOERROR
Path$ = Space(512)
r = SHGetPathFromIDList_(IDL\mkid\cb, Path$)
folder$ = Trim(Path$)
Else
folder$=""
EndIf
ProcedureReturn folder$
EndProcedure
Not my problem.TronDoc wrote:@André:
Don't get TOO MANY of these EXCELLENT examples in
your code archive! We will not have a reason to visit
the forums anymore nor the time to learn them all!
<joking>Joe
high key wrote:I didn't find a code for special folders in André's CodeArchive, so I converted the example from the API-Guide:
Code: Select all
MessageRequester("Info",a$+Chr(13)+b$+Chr(13)+c$+Chr(13)+d$+chr$(13)+e$,0)
Code: Select all
MessageRequester("Info",a$+Chr(13)+b$+Chr(13)+c$+Chr(13)+d$+chr(13)+e$,0)
Normally the CodeArchive will be released every 5-6 weeks in a new version.eddy wrote:@Andre
You can update or correct some codes ?