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.
CStatic::Create
◄CStatic►                                     ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  BOOL Create( const char FAR* lpText, DWORD dwStyle, const RECT& rect,
               CWnd* pParentWnd, UINT nID = 0xffff );
 
  Parameter    Description
 
  <lpText>     Specifies the text to place in the control. If NULL, no
               text will be visible.
 
  <dwStyle>    Specifies the static control's window ◄style►.
 
  <rect>       Specifies the position and size of the static control. It
               can be either a RECT structure or a CRect object.
 
  <pParentWnd> Specifies the CStatic parent window, usually a CDialog or
               CModalDialog object. It must not be NULL.
 
  <nID>        Specifies the static control's resource ID.
 
  Remarks
 
  You construct a CStatic object in two steps. First call the constructor
  CStatic, then call Create, which creates the Windows static control and
  attaches it to the CStatic object.
 
  Apply the following ◄window styles► to a static control:
 
  Style        Application
 
  WS_CHILD     Always.
 
  WS_VISIBLE   Usually.
 
  WS_DIABLED   Rarely.
 
  Apply any combination of ◄static control styles► to the static control.
 
  Return Value
 
  TRUE if successful; otherwise FALSE.
 
  See Also
 
  ◄CStatic::CStatic►
 
 
                                     -♦-