archive-com.com » COM » E » EFG2.COM

Total: 878

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".

  • 00 GMT Message ID Organization TISCALI S p A Newsgroups alt comp lang borland delphi ReplyTo mayakron tiscalinet it How do I convert paths to DOS paths c program files myfile txt C PROGRA 1 MYFILE TXT If the file or directory really exists on a drive you can do it this way function GetDosName FileName string string var D TSearchRec begin FindFirst FileName faAnyFile D if D FindData cAlternateFileName

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0502.txt (2016-02-14)
    Open archived version from archive



  • function BrowseCallbackProc hwnd HWND uMsg UINT lParam lpData LPARAM Integer stdcall callback function used in SelectDirectory to set the status text and choose an initial dir var Path array 0 MAX PATH of Char begin case uMsg of BFFM INITIALIZED begin Initialization has been done now set our initial directory which is passed in lpData and set btw the status text too Note There s no need to cast lpData to a PChar since the following call needs a LPARAM parameter anyway SendMessage hwnd BFFM SETSELECTION 1 lpData SendMessage hwnd BFFM SETSTATUSTEXT 0 lpData end BFFM SELCHANGED begin Set the status window to the currently selected path if SHGetPathFromIDList Pointer lParam Path then SendMessage hwnd BFFM SETSTATUSTEXT 0 Integer Path end end Result 0 end function SelectDirectory const Caption InitialDir string const Root WideString ShowStatus Boolean out Directory string Boolean Another overloaded browse for folder function with the ability to select an intial directory other SelectDirectory functions are in FileCtrl pas I had to make this overloading unambiguous in its parameter list so I included a flag which indicates whether or not to show a status text line in the dialog which will receive the currently selected path if enabled

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0927b.txt (2016-02-14)
    Open archived version from archive


  • 24 26 143 218 12 Aug 2002 20 37 21 0700 Path dnews not for mail Xref dnews borland public delphi students 18891 I think this code may be helpful to you var BrowseInfo TBrowseInfo DisplayName array 0 MAX PATH of char lpItemID PItemIDList TempPath array 0 MAX PATH of char TitleName string begin FillChar BrowseInfo sizeof TBrowseInfo 0 BrowseInfo hwndOwner Form1 Handle BrowseInfo pszDisplayName DisplayName TitleName Please specify a

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2002/0812.txt (2016-02-14)
    Open archived version from archive


  • 1 1 dnews wrote in message news 3b8fb8ae 1 2 dnews I want to select a folder using SHBrowseForFolder To select an initial dir I send the BFFM SETSELECTION message to the window which works fine for normal directories I ve looked through ShlObj pas but am still having trouble understanding How does one send this message to the window Chris Yeh this is a little tricky at least IMHO What you need to do is set up a call back it s not that hard Check out the code in the ShlObj pas Search for TBrowseInfo TBrowseInfo is a record with the following fields TBrowserInfo record hwndOwner HWND pidlRoot PItemIDList pszDisplayName PAnsiChar Return display name of item selected lpszTitle PAnsiChar text to go in the banner over the tree ulFlags UINT Flags that control the return stuff lpfn TFNBFFCallBack lParam LPARAM extra info that s passed back in callbacks iImage Integer output var where to return the Image index end the lpfn field is where you plug in your call back To do this you need to create a function which matches the TFNBFFCallbacks prototype Here is the prototype BFFCALLBACK function Wnd HWND uMsg UINT lParam lpData LPARAM Integer

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0927a.txt (2016-02-14)
    Open archived version from archive


  • winapi 129135 I got to thinking that there may be an API call that I could make that would give me access to this Windows dialog directly Just put this function in your code function SelectDirectory const Caption string const Root WideString out Directory string Boolean var WindowList Pointer BrowseInfo TBrowseInfo Buffer PChar RootItemIDList ItemIDList PItemIDList ShellMalloc IMalloc IDesktopFolder IShellFolder Eaten Flags LongWord begin Result False Directory FillChar BrowseInfo SizeOf

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/2001/0407.txt (2016-02-14)
    Open archived version from archive


  • User Newsgroups borland public delphi winapi Alfons here is a procedure that will do the trick This example substitutes the path c mydir for the drive letter k I m not sure if the d parameter is needed it points to the directory where the subst command would run you may need to change this to your windows directory or not uses ShellApi procedure TForm1 Button1Click Sender TObject var a

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0421a.txt (2016-02-14)
    Open archived version from archive


  • operating in both WinNT and Win 95 98 Here is sample code for both NT and Win95 In either case the code reads the boot sector from the floppy in drive A searches for press any key and if found replaces it with pick your ear and then writes the sector back out to the disk Use great care with this code especially the Win95 version it is extremely easy

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1998/0805.txt (2016-02-14)
    Open archived version from archive


  • CD tray quite a while back And do search the past archive Probably good to add DeviceIoControl to that search term otherwise you ll be swamped with rubbish my rubbish so I may say so If I remember correctly your code was not really working as you left out some constants that are not declared in Windows pas I had to convert them from h macros Anyway this works for me Largely that is your original post so you should get most of the credits const FILE DEVICE MASS STORAGE 2D METHOD BUFFERED 0 FILE ANY ACCESS 0 FILE READ ACCESS 1 FILE WRITE ACCESS 2 IOCTL STORAGE EJECT MEDIA FILE DEVICE MASS STORAGE shl 16 OR FILE READ ACCESS shl 14 OR 202 shl 2 OR METHOD BUFFERED IOCTL STORAGE LOAD MEDIA FILE DEVICE MASS STORAGE shl 16 OR FILE READ ACCESS shl 14 OR 203 shl 2 OR METHOD BUFFERED var cd THandle ret DWORD begin Note Stefan opened CD ROM with GENERIC READ OR GENERIC WRITE That should be correct according to MS documentation but was not working for me This just GENERIC READ seems to be working on all computers cd CreateFile PChar D GENERIC READ

    Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0305a.txt (2016-02-14)
    Open archived version from archive



  •