wpSetTitleAndRenameFile
Appearance
This method is specific to version 3, or higher, of the OS/2 operating system.
This instance method sets the current title of an object and renames the file to match the title.
Syntax
_wpSetTitleAndRenameFile(somSelf, pszNewTitle, fConfirmations)
Parameters
- somSelf (WPFileSystem *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPFileSystem.
- pszNewTitle (PSZ) - input
- Pointer to the new title of object.
- A pointer to a zero terminated string which contains the new title of the object.
- fConfirmations (ULONG) - input
- Confirmation flag.
- Possible values are described in the following list:
- CONFIRM_RENAMEFILEWITHEXT Prompt the user to confirm renaming the file to match the title.
- CONFIRM_KEEPASSOC Prompt for confirmation when renaming files with extensions that are used to associate a file with an application. For example, if the user has an association between an editor and the file extension DOC, and the user renames a DOC file to have a TXT extension, the file is no longer associated with the editor. The user should be prompted to confirm the name change.
- 0 Do not prompt the user to confirm renaming the file to match the title.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion.
- FALSE Error occurred.
How to Override
This method is generally not overridden.
Usage
This method can be called at any time.
Remarks
wpSetTitle is preferred for setting an object's title unless you want to override the confirmations; for example, if you want to rename a file and change its title without prompting the user.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPFileSystem *somSelf; /* Pointer to the object on which the method is being invoked. */
PSZ pszNewTitle; /* Pointer to new the title of object. */
ULONG fConfirmations; /* Confirmation flag. */
BOOL rc; /* Success indicator. */
rc = _wpSetTitleAndRenameFile(somSelf, pszNewTitle,
fConfirmations);