基于对话框的空闲消息处理

//.h head file #include <afxpriv.h> // For WM_KICKIDLE public: afx_msg LRESULT OnKickIdle(WPARAM, LPARAM); //.CPP BEGIN_MESSAGE_MAP(CIdleDlg, CDialog) ON_MESSAGE(WM_KICKIDLE, OnKickIdle) END_MESSAGE_MAP() // Handle MFC private message WM_KICKIDLE. LPARAM is the idle count. // Return TRUE/FALSE continue/discontinue idle processing. LRESULT CIdleDlg::OnKickIdle(WPARAM, LPARAM lCount) { // Do idle processing here, just like CWinApp::OnIdle //can call main idle process AfxGetApp()->OnIdle(lCount); //Add your code here TRACE("CIdleDlg::OnKickIdle, do priority %d stuff/n", lCount); return (TRUE);//continue }

你可能感兴趣的:(mfc,processing)