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::CreatePen
CPen                                        Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  BOOL CreatePen( int nPenStyle, int nWidth, DWORD crColor );
 
  Parameter   Description
 
  <nPenStyle> Specifies the style for the pen. For a list of possible
              values, see the <nPenStyle> parameter to the CPen
              constructor.
 
  <nWidth>    Specifies the width of the pen (in logical units).
 
  <crColor>   Contains an RGB color for the pen.
 
  Remarks
 
  Initializes a pen with the specified style, width, and color. The pen
  can be subsequently selected as the current pen for any device context.
 
  Pens that have a width greater than 1 pixel should always have either
  the PS_NULL, PS_SOLID, or PS_INSIDEFRAME style.
 
  Return Value
 
  TRUE if the function is successful; otherwise FALSE.
 
  See Also
 
  CPen::CreatePenIndirect, CPen::CPen
 
 
                                     -♦-