Contents Index Topic Contents | ||
Previous Topic: PathIsURL Next Topic: PathMakeSystemFolder |
PathMakePretty
BOOL PathMakePretty( LPTSTR lpPath );Converts a path to all lowercase characters to give the path a consistent appearance.
- Returns TRUE if the path has been converted, or FALSE otherwise.
- lpPath
- Address of the path to be converted.
Example:
#include <windows.h> #include <iostream.h> #include "Shlwapi.h" void main( void ) { // Path name 1. char buffer_1[] = "C:\\TEST\\FILE"; char *lpStr1; lpStr1 = buffer_1; // Path name 2. char buffer_2[] = "c:\\test\\file"; char *lpStr2; lpStr2 = buffer_2; // Test path name 1. cout << "The content of the unconverted path is : " << lpStr1 << endl; cout << "The \"PathMakePretty\" function returns the value " << PathMakePretty(lpStr1) << " = TRUE & converts" << endl; cout << "The content of the converted path is : " << lpStr1 << endl; // Test path name 2. cout << "\nThe content of the unconverted path is : " << lpStr2 << endl; cout << "The \"PathMakePretty\" function returns the value " << PathMakePretty(lpStr2) << " = FALSE & no conversion" << endl; cout << "The content of the converted path is : " << lpStr2 << endl; } OUTPUT: ============= The content of the unconverted path is : C:\TEST\FILE The "PathMakePretty" function returns the value 1 = TRUE & converts The content of the converted path is : C:\test\file The content of the unconverted path is : c:\test\file The "PathMakePretty" function returns the value 0 = FALSE & no conversion The content of the converted path is : c:\test\file
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.