Click to See Complete Forum and Search --> : File


gautamp
May 17th, 2001, 06:53 AM
Most of the API functions for files demand a file number.If i want to use these functions, how can i get the file no of a file selected with a commann dialog box?

gautamp
May 17th, 2001, 06:53 AM
Most of the API functions for files demand a file number.If i want to use these functions, how can i get the file no of a file selected with a commann dialog box?

Cakkie
May 17th, 2001, 07:22 AM
You can use the openfile API for that. This function gives you a token to the file opened. One of the parameters if the filename. The filename can be retrieved by the ShowOpen (or ShowSave) method from the commondialog.



Tom Cannaerts
slisse@planetinternet.be

Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook

shree
May 17th, 2001, 08:32 AM
The OpenFile() API function is provided only for compatibility with 16-bit versions of Windows. Win32-based applications should use the CreateFile() function.