2.2.4.32.4 OriginObject::AutoSize

Description

Use for autosizing origin objects

Syntax

BOOL AutoSize( DWORD dwCntrl = 0, DWORD lParam = 0, void * pVoid = NULL, BOOL bUndo = FALSE, void * pOpt = NULL )

Parameters

dwCntrl
[input] control bits see AUTOSIZE
lParam
[input] object dependent parameter (in case of Worksheet used to pass report OUID)
pVoid
[input] object dependent parameter (in case of Worksheet or Grid used to pass GRIDLIMITS)
bUndo
[input] autosize is undoable if set to TRUE
pOpt
[input] object dependent parameter (in case of Worksheet used to pass ORANGE)

Return

TRUE if succeeds else FALSE.

Examples

EX1

void wks_fitsize_selection()
{
   Worksheet wks = Project.ActiveLayer();
   int iret = wks.AutoSize(AS_SELECTION);
}

EX2

void wks_fitsize_range(int r1, int c1, int r2, int c2)
{
    ORANGE rng;
    rng.r1 = r1;
    rng.c1 = c1;
    rng.r2 = r2;
    rng.c2 = c2;
    
    Worksheet wks = Project.ActiveLayer();
    int iret = wks.AutoSize(AS_INVALIDATE, 0, NULL, FALSE, &rng);
}

Remark

See Also

Header to Include

origin.h