kapiaba Posted December 16, 2014 Report Share Posted December 16, 2014 Usando cGetDir() muito interessante. #include "FiveWin.ch" #define BIF_NONEWFOLDERBUTTON 0x200 #define BIF_RETURNONLYFSDIRS 0x0001 #define BIF_DONTGOBELOWDOMAIN 0x0002 #define BIF_STATUSTEXT 0x0004 #define BIF_RETURNFSANCESTORS 0x0008 #define BIF_EDITBOX 0x0010 #define BIF_VALIDATE 0x0020 #define BIF_NEWDIALOGSTYLE 0x0040 #define BIF_USENEWUI (BIF_NEWDIALOGSTYLE | BIF_EDITBOX) #define BIF_BROWSEINCLUDEURLS 0x0080 #define BIF_BROWSEFORCOMPUTER 0x1000 #define BIF_BROWSEFORPRINTER 0x2000 #define BIF_BROWSEINCLUDEFILES 0x4000 #define BIF_SHAREABLE 0x8000 #define MAX_PATH 260 FUNCTION Main() LOCAL cTitle, cPath, cCarpDest, cPathDest cTitle := "Seleccione Carpeta" IF FWVERSION = "FWHX 13.06" cPath := GETCURDIR() ELSE cPath := CURDRIVE() + ":\" + GETCURDIR() ENDIF cCarpDest := "Seleccione la carpeta donde copiar las novedades" cPathDest := cGetDir( cTitle, cPath,, cCarpDest, ; BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + ; BIF_USENEWUI + BIF_NONEWFOLDERBUTTON ) IF .NOT. EMPTY( cPathDest ) ? cPathDest ENDIF RETURN NIL Gostaria de mais comentários a respeito disso, porfa. abs Michaelegot, Audreyfet, Ronaldbuch and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Eduardo Bilato Posted December 18, 2014 Report Share Posted December 18, 2014 Bacana Quote Link to comment Share on other sites More sharing options...
oribeiro Posted December 19, 2014 Report Share Posted December 19, 2014 Muito bom! Tem algum exemplo com cGetFile() parametrizado? Quote Link to comment Share on other sites More sharing options...
kapiaba Posted January 6, 2015 Author Report Share Posted January 6, 2015 Ops, desculpe a demora. #include 'fivewin.ch' #define OFN_PATHMUSTEXIST 0x00000800 #define OFN_NOCHANGEDIR 0x00000008 #define OFN_ALLOWMULTISELECT 0x00000200 #define OFN_EXPLORER 0x00080000 // new look commdlg #define OFN_LONGNAMES 0x00200000 // force long names for 3.x modules #define OFN_ENABLESIZING 0x00800000 #define OFN_HIDEREADONLY 0x00000004 // Oculta a caixa de seleção Somente leitura. #define OFN_NONETWORKBUTTON 0x20000 // Desabilita o botão [ REDE ] da Dlg function aGetFiles( cMask, cTitle, nDefaultMask, cInitDir ) local cSelect, nAt, aFiles := {} /* local nFlags := nOr( OFN_PATHMUSTEXIST , OFN_NOCHANGEDIR , ; OFN_ALLOWMULTISELECT , OFN_EXPLORER , ; OFN_LONGNAMES, OFN_ALLOWMULTISELECT ) */ local nFlags := nOr( OFN_PATHMUSTEXIST, OFN_NOCHANGEDIR, OFN_ALLOWMULTISELECT, ; OFN_LONGNAMES, OFN_NONETWORKBUTTON ) SKINBUTTONS() //cSelect := cGetFile( cMask, cTitle, nDefaultMask, cInitDir, .f., .t., nFlags ) cSelect := cGetFile( "Bitmap (*.bmp)| *.bmp|"+ ; "DIB (*.dib)| *.dib|" + ; "PCX (*.pcx)| *.pcx|" + ; "JPEG (*.jpg)| *.jpg|" + ; "GIF (*.gif)| *.gif|" + ; "TARGA (*.tga)| *.tga|" + ; "RLE (*.rle)| *.rle|" + ; "Todos os Arquivos (*.*)|*.*|" ; ,"Selecione a Foto Desejada",1,,.F.,, nFlags ) cSelect := Left( cSelect, At( Chr( 0 ) + Chr( 0 ), cSelect ) - 1 ) if ! Empty( cSelect ) cSelect := StrTran( cSelect, Chr( 0 ), "," ) aFiles := hb_aTokens( cSelect, "," ) if Len( aFiles ) > 1 for nAt := 2 TO Len( aFiles ) aFiles[ nAt ] := aFiles[ 1 ] + "\" + aFiles[ nAt ] next nAt ADel( aFiles, 1 ) ASize( aFiles, Len( aFiles ) - 1 ) endif endif return aFiles abs Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.