OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Getting and Setting Properties

You can use the GetProperty and SetProperty functions to query and modify the values of a Doc/View object's properties.

The GetProperty function lets you find out the value of a property. Its syntax is

int GetProperty(int index, void far* dest, int textlen = 0);

GetProperty parameters

ParameterDescription
indexProperty index.
destUsed by GetProperty to contain the property data.
textlenIndicates the size of the memory array pointed to by dest. If textlen is 0, the property data is not returned; instead, GetProperty returns 0. Otherwise the data is returned in a textlen size buffer.

The SetProperty function lets you set the value of a property. Its syntax is

bool SetProperty(int index, const void far* src)

SetProperty parameters

ParameterDescription
indexProperty index
srcContains the data to which the property is being set. src must be in the correct native format for the property.

A derived class that duplicates property names should use the same behavior and data type for the duplicate properties as they had in the parent class.