abmSetTextSettingOnPos function
|
Remarks
|
Given a text position, changes its text settings.
|
|
Return value
|
None.
|
|
Syntax
|
void abmSetTextSettingOnPos (
HWND hWndBtn,
short nPosition,
TEXT_DESC *pdesc,
short nFlag
);
|
Parameters
|
Description
|
|
hWndBtn
|
Windows handle associated to the button.
|
|
nPosition
|
The numeric value of the text whose settings will be changed. Supported values are the following:
|
Mnemonic constant
|
Meaning
|
|
TEXTPOS_CAPTION (0)
|
Sets the caption text settings
|
|
TEXTPOS_LT (1)
|
Sets the Left-Top text settings
|
|
TEXTPOS_CT (2)
|
Sets the Center-Top text settings
|
|
TEXTPOS_RT (3)
|
Sets the Right-Top text settings
|
|
TEXTPOS_LM (4)
|
Sets the Left-Middle text settings
|
|
TEXTPOS_RM (5)
|
Sets the Right-Middle text settings
|
|
TEXTPOS_LB (6)
|
Sets the Left-Bottom text settings
|
|
TEXTPOS_CB (7)
|
Sets the Center-Bottom text settings
|
|
TEXTPOS_RB (8)
|
Sets the Right-Bottom text settings
|
|
|
pdesc
|
Address of the the TEXT_DESC structure containing the new text settings.
|
|
nFlag
|
Discontinued, will be ignored
|
|
Visual Basic example
Dim txtDesc As TEXT_DESC
abmGetTextSettingOnPos btn1.hWnd, TEXTPOS_CAPTION, txtDesc
txtDesc.colorNormal = RGB (0, 255, 0)
txtDesc.colorMouseOver = RGB (0, 0, 255)
txtDesc.nAngle = 45
abmSetTextSettingOnPos btn1.hWnd, TEXTPOS_CAPTION, txtDesc, 0
With this code, after the call to the abmSetTextSettingOnPos function, the button btn1 will have a light green caption text, rotated by 45 degrees clockwise, that will change into light blue when the mouse will pass over the button surface.
Visual C++ example
TEXT_DESC txtDesc;
abmGetTextSettingOnPos (btn1.GetSafeHwnd (), TEXTPOS_CAPTION, &txtDesc);
txtDesc.colorNormal = RGB (0, 255, 0);
txtDesc.colorMouseOver = RGB (0, 0, 255);
txtDesc.nAngle = 45;
abmSetTextSettingOnPos (btn1.GetSafeHwnd (), TEXTPOS_CAPTION, &txtDesc, 0);
With this code, after the call to the abmSetTextSettingOnPos function, the button btn1 will have a light green caption text, rotated by 45 degrees clockwise, that will change into light blue when the mouse will pass over the button surface.