Jump to content

WinReplaceObjectClass: Difference between revisions

From EDM2
Ak120 (talk | contribs)
No edit summary
Line 1: Line 1:
#REDIRECT [[OS2 API:PMI:WinReplaceObjectClass]]
 
== WinReplaceObjectClass ==
; WinReplaceObjectClass(oldClassName, newClassName, functionReplacementFlag) : Replaces a registered class with the new registered class.
 
=== Parameters ===
; oldClassName - [[PSZ]] - input : Old classname string.
; newClassName - [[PSZ]] - input : New classname string.
; functionReplacementFlap -[[BOOL]] - input : Flag for function replacement.
 
=== Constants ===
Flag values for functionality replacement:
;[[TRUE]] : Replace the old class name with the new class name.
;[[FALSE]] : Undo the replacement of the old class name with the new class name.
 
=== Returns ===
This function returns a [[APIRET]] with the values of:
*[[TRUE]]
*[[FALSE]]
 
=== Define (C/C++) ===
INCL_WINWORKPLACE
 
=== Calling conversion ===
[[Cdecl32]]
 
=== Example Code ===
...
[[OS2 API:DataType:PSZ|PSZ]]  oldClassname;
[[OS2 API:DataType:PSZ|PSZ]]  newClassname;
[[OS2 API:DataType:BOOL|BOOL]] fReplace;
[[OS2 API:DataType:BOOL|BOOL]] rc;
...
rc = WinReplaceObjectClass (oldClassname, newClassname, fReplace);
...
 
=== Related Functions ===
[[OS2 API:WinCreateObject|WinCreateObject]]
[[OS2 API:WinDeregisterObjectClass|WinDeregisterObjectClass]]
[[OS2 API:WinRegisterObjectClass|WinRegisterObjectClass]]
 
=== Notes ===
The new class name must be a descendant of old class name.  If it isn't, an error will be returned.
 
[[Category:Win]]

Revision as of 02:00, 14 January 2017

WinReplaceObjectClass

WinReplaceObjectClass(oldClassName, newClassName, functionReplacementFlag)
Replaces a registered class with the new registered class.

Parameters

oldClassName - PSZ - input
Old classname string.
newClassName - PSZ - input
New classname string.
functionReplacementFlap -BOOL - input
Flag for function replacement.

Constants

Flag values for functionality replacement:

TRUE
Replace the old class name with the new class name.
FALSE
Undo the replacement of the old class name with the new class name.

Returns

This function returns a APIRET with the values of:

Define (C/C++)

INCL_WINWORKPLACE

Calling conversion

Cdecl32

Example Code

...
PSZ   oldClassname;
PSZ   newClassname;
BOOL fReplace;
BOOL rc;
...
rc = WinReplaceObjectClass (oldClassname, newClassname, fReplace);
...

Related Functions

WinCreateObject WinDeregisterObjectClass WinRegisterObjectClass

Notes

The new class name must be a descendant of old class name. If it isn't, an error will be returned.