title: Entry point for MFC application
body: <p>I have created new emty project. Then have added cpp and header hello world files taken from Jeff Prosise 'Programming Windows with MFC' book. Have set <code>Use of MFC</code> to <code>Use MFC in a Shared DLL</code></p>
  
  <p>Got error <code>entry point must be defined</code> 
  How to fix this problem? </p>
  
  <p>CPP:</p>
  
  <pre><code>#include &lt;afxwin.h&gt;
  #include "Hello.h"
  
  CMyApp myApp;
  
  /////////////////////////////////////////////////////////////////////////
  // CMyApp member functions
  
  BOOL CMyApp::InitInstance ()
  {
      m_pMainWnd = new CMainWindow;
  
  
     m_pMainWnd-&gt;ShowWindow (m_nCmdShow);
      m_pMainWnd-&gt;UpdateWindow ();
      return TRUE;
  }
  
  /////////////////////////////////////////////////////////////////////////
  // CMainWindow message map and member functions
  
  BEGIN_MESSAGE_MAP (CMainWindow, CFrameWnd)
      ON_WM_PAINT ()
  END_MESSAGE_MAP ()
  
  CMainWindow::CMainWindow ()
  {
      Create (NULL, _T ("The Hello Application"));
  }
  
  void CMainWindow::OnPaint ()
  {
      CPaintDC dc (this);
  
      CRect rect;
      GetClientRect (&amp;rect);
  
      dc.DrawText (_T ("Hello, MFC"), -1, &amp;rect, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
  }
  </code></pre>
  
  <p>H:</p>
  
  <pre><code>class CMyApp : public CWinApp
  {
  public:
      virtual BOOL InitInstance ();
  };
  
  class CMainWindow : public CFrameWnd
  {
  public:
      CMainWindow ();
  
  protected:
      afx_msg void OnPaint ();
      DECLARE_MESSAGE_MAP ()
  };
  </code></pre>