Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.29 KB

GetFileTitle.md

File metadata and controls

58 lines (39 loc) · 1.29 KB

Home

Function name : GetFileTitle

Group: Common Dialog Box - Library: comdlg32


Retrieves the name of the specified file.


Code examples:

Extracting the name and extension parts of a path string

Declaration:

short GetFileTitle(
  LPCTSTR lpszFile,  // path and file name
  LPTSTR lpszTitle,  // file name buffer
  WORD cbBuf         // length of buffer
);  

FoxPro declaration:

DECLARE SHORT GetFileTitle IN Comdlg32;
	STRING   lpszFile,;
	STRING @ lpszTitle,;
	INTEGER  cbBuf  

Parameters:

lpszFile [in] Pointer to the name and location of a file.

lpszTitle [out] Pointer to a buffer that receives the name of the file.

cbBuf [in] Specifies the length, in TCHARs, of the buffer pointed to by the lpszTitle parameter.


Return value:

If the function succeeds, the return value is zero. If the file name is invalid, the return value is unknown.


Comments:

In other words this function extracts the file and extension parts from a legal Win32 path string. Although that does not mean that file should exist.