class CCmdUIDialog : public CDialog
{
// Construction
public:
CCmdUIDialog(LPCTSTR lpszTemplateName, CWnd* pParentWnd = NULL);
CCmdUIDialog(UINT nIDTemplate, CWnd* pParentWnd = NULL);
CCmdUIDialog();
BOOL ContinueModal();
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CCmdUIDialog)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
BOOL CCmdUIDialog::ContinueModal()
{
// Iterate all child windows and instruct to update themselves
CWnd* pWndChild=GetWindow(GW_CHILD);
int iIndex=0;
while (NULL!=pWndChild)
{
// ***CCmdUI::DoUpdate is undocumented MFC***
state.DoUpdate(this, FALSE);
pWndChild=pWndChild->GetWindow(GW_HWNDNEXT);
}
// Must call the base class
return CDialog::ContinueModal();
}
BEGIN_MESSAGE_MAP(CCmdUIDialog, CDialog)
//{{AFX_MSG_MAP(CCmdUIDialog)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()