MFC/Microsoft Foundation Class 2011. 1. 24. 10:47

void CALLBACK 함수명(HWND hWnd, UINT nID, UINT nEl, DWORD time)
{
//구현부분	
}

Callback 함수의 원형으로 해당 형태의 함수명를 Settime의 3번째 인자로 넣어주면
지정한 시간마다 해당 함수가 호출된다
void CALLBACK time2(HWND hWnd, UINT nID, UINT nEl, DWORD time)
{
	CWnd* m_pWnd = AfxGetMainWnd();
	CTimer_CheckDlg* m_pParent = (CTimer_CheckDlg*)m_pWnd;
	m_pParent->m_pro1.StepIt();
	m_pParent->m_pro2.StepIt();
	m_pParent->m_pro3.StepIt();
}
void CALLBACK time1(HWND hWnd, UINT nID, UINT nEl, DWORD time)
{
	CWnd* m_pWnd = AfxGetMainWnd();
	CTimer_CheckDlg* m_pParent = (CTimer_CheckDlg*)m_pWnd;
	CString time_edit;
	time_edit.Format("1번 TIME COUNT : %d",m_pParent->cnt++);
	m_pParent->m_edt = time_edit;
	m_pParent->UpdateData(FALSE);
}
BOOL CTimer_CheckDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	cnt = 0;
	SetTimer(1,1000,time1);
	SetTimer(2,1000,time2);

	m_pro1.SetRange(0,1000);
	m_pro2.SetRange(0,2000);
	m_pro3.SetRange(0,3000);
	
	return TRUE;  // return TRUE  unless you set the focus to a control
}
: