Jump to content

WpConfirmObjectTitle: Difference between revisions

From EDM2
Created page with "{{DISPLAYTITLE:wpConfirmObjectTitle}} This method is specific to version 3, or higher, of the OS/2 operating system. This instance method displays the Object Title Confirmation dialog. ==Syntax== _wpConfirmObjectTitle(somSelf, Folder, ppDuplicate, pszTitle, cbTitle, menuID) ==Parameters== ;''somSelf'' (WPObject *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPObject. ;''Folder'' (WPFolder *) - input..."
 
(No difference)

Latest revision as of 06:04, 4 November 2025

This method is specific to version 3, or higher, of the OS/2 operating system.

This instance method displays the Object Title Confirmation dialog.

Syntax

_wpConfirmObjectTitle(somSelf, Folder, ppDuplicate, pszTitle, cbTitle, menuID)

Parameters

somSelf (WPObject *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPObject.
Folder (WPFolder *) - input
A pointer to the folder involved in the operation.
ppDuplicate (WPObject **) - input
A pointer to the address of an object with the same title in the folder.
pszTitle (PSZ) - in/out
The initial or returned name.
cbTitle (ULONG) - input
The length of the name's buffer (pszTitle).
menuID (ULONG) - input
The ID of the operation being performed. For a listing of WPMENUIDs, see the individual object classes.

Returns

ulNameClash (ULONG) - returns
A flag indicating the action taken when two objects have the same title.
Possible values are described in the following list:
  • NAMECLASH_APPEND The returned duplicate is appended to.
  • NAMECLASH_NONE No object in the target folder has the same name.
  • NAMECLASH_NONE_KEEPASSOC The file that was not renamed keeps the same associations.
  • NAMECLASH_RENAME The file is renamed.
  • NAMECLASH_RENAME_KEEPASSOC The renamed file keeps the same associations.
  • NAMECLASH_REPLACE The returned duplicate is replaced.

How to Override

This method is generally not overridden.

Example Code

#define INCL_WINWORKPLACE
#include <os2.h>

WPObject *somSelf; /* Pointer to the object on which the method is being invoked. */
WPFolder *Folder; /* A pointer to the folder involved in the operation. */
WPObject **ppDuplicate; /* A pointer to the address of an object with the same title in the folder. */
PSZ pszTitle; /* The initial or returned name. */
ULONG cbTitle; /* The length of the name's buffer (pszTitle). */
ULONG menuID; /* The ID of the operation being performed. */
ULONG ulNameClash; /* A flag indicating the action taken when two objects have the same title. */

ulNameClash = _wpConfirmObjectTitle(somSelf,
                Folder, ppDuplicate, pszTitle,
                cbTitle, menuID);