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.
CPen::FromHandle
CPen                                        Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  static CPen* FromHandle( HPEN hPen );
 
  Parameter   Description
 
  <hPen>      HPEN handle to Windows GDI pen.
 
  Remarks
 
  Returns a pointer to a CPen object given a handle to a Windows GDI pen
  object. If a CPen object is not attached to the handle, a temporary CPen
  object is created and attached. This temporary CPen object is valid only
  until the next time the application has idle time in its event loop, at
  which time all temporary graphic objects are deleted. In other words,
  the temporary object is only valid during the processing of one window
  message.
 
  Return Value
 
  A pointer to a CPen object if successful; otherwise NULL.
 
                                     -♦-