Purpose
Routine to calculate the growth factor of
an individual control within a dialog box.
Syntax
unsigned int CWB_ENTRY cwbNL_CalcControlGrowthXY(
HWND windowHandle,
HDC hDC,
float* growthFactorX,
float* growthFactorY);
Parameters
- HWND windowHandle - input
- Window handle of the control for which to calculate the growth factor.
- HDC hDC - input
- Device context. Used by GetTextExtentPoint32 to determine
extent needed for the translated string in the control.
- float* growthFactorX - output
- +/- growth to the width needed to contain the string for the control.
- float* growthFactorY - output
- +/- growth to the height needed to contain the string for the control.
Return Codes
The following list shows common return
values.
- CWB_OK
- Successful Completion
Usage
It is assumed that the translated
text has been loaded into the control prior to calling this function. A control
that does not contain text will return a 1.00 growth factor. This means that
it does not need to change size.