Post by JoDeGr8Hi,
What is the best way to track the idle state of a dialog without using
timers?
Thanks,
J
If you are looking for something closer to the dialog level, you might
consider WM_KICKIDLE. An example (assuming you have a dialog template
resource IDD_DIALOG1):
#include <afxpriv.h>
class CTestDlg : public CDialog
{
public:
CTestDlg() : CDialog(IDD_DIALOG1) { }
private:
afx_msg LRESULT OnKickIdle(WPARAM, LPARAM);
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CTestDlg, CDialog)
ON_MESSAGE(WM_KICKIDLE, OnKickIdle)
END_MESSAGE_MAP()
LRESULT CTestDlg::OnKickIdle(WPARAM, LPARAM lCount)
{
// do stuff here
return TRUE;
}