CButton.SetTextMarginmethod
Sets the margins for drawing text in a button control.
Syntax
FUNCTION SetTextMargin (BYVAL hButton AS HWND, BYVAL pMargin AS RECT PTR) AS BOOLEAN
FUNCTION SetTextMargin (BYVAL hButton AS HWND, BYREF margin AS RECT) AS BOOLEAN
FUNCTION SetTextMargin (BYVAL hButton AS HWND, BYVAL nLeft AS LONG, BYVAL nTop AS LONG, BYVAL nRight AS LONG, BYVAL nBottom AS LONG) AS BOOLEAN
Parameters
| Name | Description | |
|---|---|---|
hButton | The handle of the button control. | |
pMargin | A pointer to a RECT structure that specifies the margins to use for drawing text. | |
margin | A RECT structure that specifies the margins to use for drawing text. | |
nLeft | The left margin. | |
nTop | The top margin. | |
nRight | The right margin. | |
nBottom | The bottom margin. |
Return value
If the message succeeds, it returns TRUE. Otherwise it returns FALSE.
Description
Sets the margins used to draw text in a button control.
Remarks
To use this message, you must provide a manifest specifying Comclt32.dll version 6.0. For more information on manifests, see Enabling Visual Styles.
Reference
- Include file
CButton.inc - Defined in AfxNova/CButton.inc:414
- Documented in Windows/WIndows Controls/CButton Class.md
- Topic: CButton Class