www.pudn.com > HanMsg.rar > InitDialog.cpp


// InitDialog.cpp : implementation file 
// 
#include "stdafx.h" 
#include "Msg.h" 
#include "InitDialog.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// InitDialog dialog 
 
InitDialog::InitDialog(CWnd* pParent /*=NULL*/) 
	: CDialog(InitDialog::IDD, pParent) 
{ 
 
	//{{AFX_DATA_INIT(MsgDialog) 
	//{{AFX_DATA_INIT(InitDialog) 
		// NOTE: the ClassWizard will add member initialization here 
	//}}AFX_DATA_INIT 
} 
 
 
void InitDialog::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(InitDialog) 
		// NOTE: the ClassWizard will add DDX and DDV calls here 
	DDX_Control(pDX, IDC_BMPSHOWW, m_bmpprog); 
	//DDX_Control(pDX, IDC_BMPSHOWW, m_bmpprog); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(InitDialog, CDialog) 
	//{{AFX_MSG_MAP(InitDialog) 
	ON_WM_TIMER() 
	ON_WM_PAINT() 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// InitDialog message handlers 
 
BOOL InitDialog::OnInitDialog()  
{ 
	CDialog::OnInitDialog(); 
	 
	// TODO: Add extra initialization here 
	 
	//设置初始化对话框定时 
	SetTimer(1,1000,NULL);//2000->1000 
 
	return TRUE;  // return TRUE unless you set the focus to a control 
	              // EXCEPTION: OCX Property Pages should return FALSE 
} 
 
void InitDialog::OnTimer(UINT nIDEvent)  
{ 
	// TODO: Add your message handler code here and/or call default 
	 
	//退出初始化对话框 
//MessageBox(TEXT("OnTimer"),NULL,MB_OK); 
	PostMessage(WM_CLOSE);  
	KillTimer(1); 
	CDialog::OnTimer(nIDEvent); 
} 
 
void InitDialog::OnPaint()  
{ 
	CPaintDC dc(this); // device context for painting 
	 
	// TODO: Add your message handler code here 
	 
	// Do not call CDialog::OnPaint() for painting messages 
}