Export (0) Print
Expand All
MFC
Expand Minimize

CTaskDialog::IsSupported

Determines whether the computer that is running the application supports the CTaskDialog.

static BOOL IsSupported();

TRUE if the computer supports the CTaskDialog; FALSE otherwise.

Use this function to determine at runtime if the computer that is running your application supports the CTaskDialog Class. If the computer does not support the CTaskDialog, you should provide another method of communicating information to the user. Your application will crash if it tries to use a CTaskDialog on a computer that does not support the CTaskDialog class.


	// TODO: Replace the string below with the actual message to the user
    CString message("Important information to the user");
	// TODO: Replace the string below with the title of this project
    CString title("Project Title");

    CString emptyString;

    if (CTaskDialog::IsSupported())
	{
		CTaskDialog::ShowDialog(message, emptyString, title, 0, 0, 
            TDCBF_OK_BUTTON);
	}
	else
	{
        AfxMessageBox(message);
	}


Header: afxtaskdialog.h

Community Additions

ADD
Show:
© 2014 Microsoft