Share your advanced PureBasic knowledge/code with the community.
NoahPhense
Addict
Posts: 1999 Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida
Post
by NoahPhense » Sun Mar 28, 2004 7:29 pm
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
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
Sweet!
- np
blueznl
PureBasic Expert
Posts: 6166 Joined: Sat May 17, 2003 11:31 am
Contact:
Post
by blueznl » Wed Jun 16, 2004 12:59 pm
hey andre, the format of the english page of the archiv is sometimes a bit irregular (indents)
by the way, x_lib is NOT a winsock lib, it's just a collection of procedures
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide
right here ... )
Andre
PureBasic Team
Posts: 2137 Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:
Post
by Andre » Sun Jun 20, 2004 3:56 pm
blueznl wrote: hey andre, the format of the english page of the archiv is sometimes a bit irregular (indents)
by the way, x_lib is NOT a winsock lib, it's just a collection of procedures
I can't see any false indents, especially there are no differences between german/english/french sites.
About x_lib I will notice it
NoahPhense
Addict
Posts: 1999 Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida
Post
by NoahPhense » Wed Jul 28, 2004 7:02 pm
You still alive? You created an awesome progressbarEx.. then poof!
- np