Поделиться через


CColorDialog::DoModal

Call this function to display the Windows common color dialog box and allow the user to select a color.

virtual INT_PTR DoModal( );

Возвращаемое значение

IDOK or IDCANCEL. If IDCANCEL is returned, call the Windows CommDlgExtendedError function to determine whether an error occurred.

IDOK and IDCANCEL are constants that indicate whether the user selected the OK or Cancel button.

Заметки

If you want to initialize the various color dialog-box options by setting members of the m_cc structure, you should do this before calling DoModal but after the dialog-box object is constructed.

After calling DoModal, you can call other member functions to retrieve the settings or information input by the user into the dialog box.

Пример

See the example for CColorDialog::CColorDialog.

Требования

Header: afxdlgs.h

См. также

Основные понятия

CColorDialog Class

CColorDialog Members

Hierarchy Chart

CDialog::DoModal

CColorDialog::CColorDialog