CBrush::FromHandle
Returns a pointer to a CBrush object when given a handle to a Windows HBRUSH object.
static CBrush* PASCAL FromHandle(
HBRUSH hBrush
);
Параметры
- hBrush
HANDLE to a Windows GDI brush.
Возвращаемое значение
A pointer to a CBrush object if successful; otherwise NULL.
Заметки
If a CBrush object is not already attached to the handle, a temporary CBrush object is created and attached. This temporary CBrush object is valid only until the next time the application has idle time in its event loop. At this time, all temporary graphic objects are deleted. In other words, the temporary object is valid only during the processing of one window message.
For more information about using graphic objects, see Graphic Objects in the Windows SDK.
Пример
See the example for CBrush::CBrush.
Требования
Header: afxwin.h