CButton.GetTextMarginmethod
Retrieves the margins used to draw text in a button control.
Syntax
FUNCTION GetTextMargin (BYVAL hButton AS HWND, BYVAL pMargin AS RECT PTR) AS BOOLEAN
FUNCTION GetTextMargin (BYVAL hButton AS HWND, BYREF pMargin AS RECT) AS BOOLEAN
FUNCTION GetTextMargin (BYVAL hButton AS HWND) AS RECT
Parameters
| Name | Description | |
|---|---|---|
pMargin | A pointer to a RECT structure that contains the margins to use for drawing text. | |
margin | A RECT structure that contains the margins to use for drawing text. |
Return value
If the message succeeds, it returns TRUE. Otherwise it returns FALSE.
Description
Retrieves 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.
Example
DIM rc AS RECT CButton.GetTextMargin(hButton, @rc) CButton.GetTextMargin(hButton, rc) rc = CButton.GetTextMargin(hButton)
Reference
- Include file
CButton.inc - Defined in AfxNova/CButton.inc:395
- Documented in Windows/WIndows Controls/CButton Class.md
- Topic: CButton Class