#include "ltwrappr.h"
L_INT LImageViewerCell::GetRulerAttributes(pAttributes);
Gets the current attributes of the cell rulers.
Pointer to a RULERATTRIBS structure to be updated with the current cell ruler attributes.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
1 | An error occurred. Refer to Return Codes. |
Before calling LImageViewerCell::GetRulerAttributes apply the following:
To set new cell properties, call LImageViewerCell::GetRulerAttributes.
For more information on the available attributes that can be used to control the shape of the ruler, refer to the RULERATTRIBS structure.
Required DLLs and Libraries
This example changes the ruler by showing the measurement unit next to it.
L_INT LImageViewerCell_GetRulerAttributesExample(LImageViewerCell& ImageViewerCell)
{
RULERATTRIBS RulerAttributes = {0};
RulerAttributes.uFlags = RULERATTRIBS_ALL;
RulerAttributes.uStructSize = sizeof(RULERATTRIBS);
ImageViewerCell.GetRulerAttributes(&RulerAttributes);
RulerAttributes.bShowMeasurement = TRUE;
ImageViewerCell.SetRulerAttributes(&RulerAttributes);
return SUCCESS;
}