The following CBusyDlg serves your purpose. m_Msg links to the static text control in which you put your message.
The usage:
in your function:
{
....
CBusyDlg aDlg("This is a long process. Please wait..."

;
Your long process here ...
}
the busyDlg will automatically destroy itself when it goes out of the scope.
CBusyDlg.h:
class CBusyDlg : public CDialog
{
public:
virtual ~CBusyDlg();
CBusyDlg(CString szBuf="",CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CBusyDlg)
enum { IDD = IDD_BUSYDLG };
CString m_Msg;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CBusyDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
};
CBusyDlg.cpp
#include "BusyDlg.h"
CBusyDlg::CBusyDlg(CString szBuf, CWnd* pParent /*=NULL*/)
: CDialog(CBusyDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CBusyDlg)
if (szBuf == ""

m_Msg = _T("Please Wait ...."

;
else m_Msg = szBuf;
//}}AFX_DATA_INIT
Create(CBusyDlg::IDD,pParent);
}
void CBusyDlg:

oDataExchange(CDataExchange* pDX)
{
CDialog:

oDataExchange(pDX);
//{{AFX_DATA_MAP(CBusyDlg)
DDX_Text(pDX, IDC_MSG, m_Msg);
//}}AFX_DATA_MAP
}
CBusyDlg::~CBusyDlg()
{
DestroyWindow();
}