Jump to content

wpclsQuerySettingsPageSize

From EDM2
Revision as of 21:53, 25 May 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpclsQuerySettingsPageSize}} This class method returns the default size of a Settings page in dialog units for instances of this object class. ==Syntax== _wpclsQuerySettingsPageSize(somSelf, pSizl) ==Parameters== ;''somSelf'' (M_WPObject *) - input :Pointer to the WPObject class object. ;''pSizl'' (PSIZEL) - in/out :Pointer to the default Settings page dimensions. A pointer to the SIZEL structure containing the ''cx'' and ''cy'' dimensions of t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This class method returns the default size of a Settings page in dialog units for instances of this object class.

Syntax

_wpclsQuerySettingsPageSize(somSelf, pSizl)

Parameters

somSelf (M_WPObject *) - input
Pointer to the WPObject class object.
pSizl (PSIZEL) - in/out
Pointer to the default Settings page dimensions. A pointer to the SIZEL structure containing the cx and cy dimensions of the default Settings page for this class.

Returns

rc (BOOL) - returns
Success indicator.
TRUE
The method class call was successful.
FALSE
The method class call was unsuccessful.

Remarks

An object class that has abnormally shaped Settings pages (for example, very wide pages) can use this method to ensure that, when a Settings notebook is initially displayed for an instance of the object class, the notebook is sized appropriately to avoid clipping. The size specified by this method is used **only** the very first time the notebook is displayed; afterward, the size and position are saved by the system on a per-object basis.

Usage

This method can be called at any time.

How to Override

Object classes with unusual size requirements for their Settings pages must override this class method and change the cx and cy values as necessary to accommodate their Settings page sizes.

Example Code

This example changes the size of the Settings page for the Person object. This size is only used when the settings are initially displayed. After that, the size and position are saved on a per-object basis.

SOM_Scope BOOL   SOMLINK PersonM_wpclsQuerySettingsPageSize(M_Person *somSelf,
                PSIZEL pSizl)
{
    /* M_PersonData *somThis = M_PersonGetData(somSelf); */
    M_PersonMethodDebug("M_Person","PersonM_wpclsQuerySettingsPageSize");

    pSizl->Cx = 600;
    pSizl->Cy = 1200;

    /* return (parent_wpclsQuerySettingsPageSize(somSelf,pSizl)); */

    return ( TRUE );
}

Related Methods