The CONTAINERMETRICS structure holds the information that controls the container's behavior.
typedef struct _CONTAINERMETRICS
{
L_INT nSize;
L_UINT32 dwMask;
COLORREF crBorder;
L_INT nHandleWidth;
L_INT nHandleHeight;
COLORREF crHandle;
L_BOOL fEnableHandles;
RECT rcLimits ;
LOGFONTW logTextFont ;
CONTAINERALIGNMENT nTextAlignment ;
HPALETTE hPalette ;
} CONTAINERMETRICS, *pCONTAINERMETRICS ;
Size of this structure.
Flags that indicate which members of this structure contain valid information. This member must be filled prior to calling L_ContainerGetMetrics or L_ContainerSetMetrics. Possible values are given below. These values can be combined using the bitwise OR operator ( | ).
Value | Meaning |
---|---|
CMF_ALL | All the fields will be used. |
CMF_BORDERCOLOR | Indicates that the crBorder field will be used. |
CMF_HANDLEWIDTH | Indicates that the nHandleWidth field will be used. |
CMF_HANDLEHEIGHT | Indicates that the nHandleHeight field will be used. |
CMF_HANDLECOLOR | Indicates that the crHandle field will be used. |
CMF_ENABLEHANDLES | Indicates that the fEnableHandles field will be used. |
CMF_LIMITS | Indicates that the rcLimits field will be used. |
CMF_LOGTEXTFONT | Indicates that the logTextFont field will be used. |
CMF_TEXTALIGNMENT | Indicates that the nTextAlignment will be used. |
CMF_PALETTE | Indicates that the hPalette field will be used. |
Specifies the color of the pen used for drawing objects within the container. The default color is RGB ( 0, 0, 0 ).
Specifies the width, in logical units, of the handle used when editing an object. The default value is 4.
Specifies the height, in logical units, of the handle used when editing an object. The default value is 4.
Specifies the color of the pen used when drawing the handle. The default color is RGB (0, 0, 0 ).
Flag that indicates whether the handle used when editing objects within the container is enabled or disabled. Possible values are:
Value | Meaning |
---|---|
TRUE | The handle is enabled. (Default) |
FALSE | The handle is disabled. |
RECT structure that contains the boundaries of the container. Any point outside the specified boundaries will not be processed. The container transformation values (scaling and offset) are taken into consideration when determining whether the point is inside the container. The default container boundaries are {0, 0, 0, 0 }. Be sure to set the limits value before getting data from the container.
Pointer to a LOGFONTW structure that contains the characteristics of the logical font used with the container text object(s). The default values for this field are:
Value | Meaning |
---|---|
logTextFont.lfHeight | 14 |
logTextFont.lfWidth | 0 |
logTextFont.lfEscapement | 0 |
logTextFont.lfOrientation | 0 |
logTextFont.lfWeight | FW_NORMAL |
logTextFont.lfItalic | FALSE |
logTextFont.lfUnderline | FALSE |
logTextFont.lfStrikeOut | FALSE |
logTextFont.lfCharSet | ANSI_CHARSET |
logTextFont.lfOutPrecision | OUT_DEFAULT_PRECIS |
logTextFont.lfClipPrecision | CLIP_DEFAULT_PRECIS |
logTextFont.lfQuality | DEFAULT_QUALITY |
logTextFont.lfPitchAndFamily | FF_DONTCARE |
logTextFont.lfFaceName | Times New Roman |
A constant that specifies the text alignment of the container's text object(s). Possible values for the CONTAINERALIGNMENT enumeration are:
Value | Meaning |
---|---|
CONTAINER_ALIGNMENT_LEFT | (Default Value) Left-aligns text in the container text object. |
CONTAINER_ALIGNMENT_HCENTER | Centers text in the container text object. |
CONTAINER_ALIGNMENT_RIGHT | Right-aligns text in the container text object. |
The HPALETTE handle of the palette used to draw the container objects. This should be the same palette used to paint the window that owns the container. The default value for this member is NULL.