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.
CWnd::OnCreate
CWnd                                        Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  afx_msg int OnCreate( LPCREATESTRUCT  lpCreateStruct  );
 
  Parameter        Description
 
  <lpCreateStruct> Points to a CREATESTRUCT structure containing
                   information about the CWnd object being created.
 
  Remarks
 
  Called when an application requests that the CWnd object be created by
  calling the Create or CreateEx member function. The new CWnd object
  receives this call after the CWnd object is created but before it
  becomes visible. OnCreate is called before the Create or CreateEx member
  function returns.
 
  Override this member function to perform any needed initialization of a
  derived class.
 
  The CREATESTRUCT structure contains copies of the parameters used to
  create the window.
 
  This message-handler member function calls the Default member
  function. Override this member function in your derived class to handle
  the WM_CREATE message.
 
  Return Value
 
  OnCreate must return 0 to continue the creation of the CWnd object. If
  the application returns -1, the CWnd will be destroyed.
 
  See Also
 
  CWnd::CreateEx, CWnd::OnNcCreate, WM_CREATE, CWnd::Default,
  CWnd::FromHandle
 
 
                                     -♦-