void CWarningPanelUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue) { if (_tcscmp(pstrName, _T("type")) == 0) { if (_tcscmp(pstrValue, _T("error")) == 0) SetWarningType(MB_ICONERROR); if (_tcscmp(pstrValue, _T("warning")) == 0) SetWarningType(MB_ICONWARNING); } else CTextPanelUI::SetAttribute(pstrName, pstrValue); }
void WarningPanelUI::SetAttribute(const char* name, const char* value) { if (str::Eq(name, "type")) { if (str::Eq(value, "error")) SetWarningType(MB_ICONERROR); if (str::Eq(value, "warning")) SetWarningType(MB_ICONWARNING); } else TextPanelUI::SetAttribute(name, value); }