CWnd::UpdateDialogControls
Visual Studio 2010
Call this member function to update the state of dialog buttons and other controls in a dialog box or window that uses the ON_UPDATE_COMMAND_UI callback mechanism.
void UpdateDialogControls( CCmdTarget* pTarget, BOOL bDisableIfNoHndler );