Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CBrush::FromHandle
CBrush                                      Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  static CBrush* FromHandle( HBRUSH hBrush );
 
  Parameter   Description
 
  <hBrush>    HANDLE to a Windows GDI brush.
 
  Remarks
 
  Returns a pointer to a CBrush object when given a handle to a Windows
  HBRUSH object. 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. Another way of saying this is that the temporary object is only
  valid during the processing of one window message.
 
  Return Value
 
  A pointer to a CBrush object if successful; NULL if not.
 
                                     -♦-