Listing 2: idledlg.cpp A dialog class for updating controls
// IdleDlg.cpp : implementation file // #include "stdafx.h" #include "afxpriv.h" #include "IdleDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif //////////////////////////////////////////////////////////////// // CIdleDlg dialog CIdleDlg::CIdleDlg(UINT nIDTemplate, CWnd* pParent /*=NULL*/) : CDialog(nIDTemplate, pParent) { } CIdleDlg::CIdleDlg( LPCTSTR lpszTemplateName, CWnd* pParent /*=NULL*/) : CDialog(lpszTemplateName, pParent) { } BEGIN_MESSAGE_MAP(CIdleDlg, CDialog) //{{AFX_MSG_MAP(CIdleDlg) ON_MESSAGE(WM_KICKIDLE, OnKickIdle) //}}AFX_MSG_MAP END_MESSAGE_MAP() //////////////////////////////////////////////////////////////// // CIdleDlg message handlers LRESULT CIdleDlg::OnKickIdle(WPARAM /*wParam*/, LPARAM /*lParam*/) { UpdateDialogControls(this, TRUE); return FALSE; } //End of File