| 300 | } |
| 301 | |
| 302 | void CButtonUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue) |
| 303 | { |
| 304 | if( _tcscmp(pstrName, _T("normalimage")) == 0 ) SetNormalImage(pstrValue); |
| 305 | else if( _tcscmp(pstrName, _T("hotimage")) == 0 ) SetHotImage(pstrValue); |
| 306 | else if( _tcscmp(pstrName, _T("pushedimage")) == 0 ) SetPushedImage(pstrValue); |
| 307 | else if( _tcscmp(pstrName, _T("focusedimage")) == 0 ) SetFocusedImage(pstrValue); |
| 308 | else if( _tcscmp(pstrName, _T("disabledimage")) == 0 ) SetDisabledImage(pstrValue); |
| 309 | else if( _tcscmp(pstrName, _T("foreimage")) == 0 ) SetForeImage(pstrValue); |
| 310 | else if( _tcscmp(pstrName, _T("hotforeimage")) == 0 ) SetHotForeImage(pstrValue); |
| 311 | else if( _tcscmp(pstrName, _T("hotbkcolor")) == 0 ) |
| 312 | { |
| 313 | if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue); |
| 314 | LPTSTR pstr = NULL; |
| 315 | DWORD clrColor = _tcstoul(pstrValue, &pstr, 16); |
| 316 | SetHotBkColor(clrColor); |
| 317 | } |
| 318 | else if( _tcscmp(pstrName, _T("hottextcolor")) == 0 ) |
| 319 | { |
| 320 | if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue); |
| 321 | LPTSTR pstr = NULL; |
| 322 | DWORD clrColor = _tcstoul(pstrValue, &pstr, 16); |
| 323 | SetHotTextColor(clrColor); |
| 324 | } |
| 325 | else if( _tcscmp(pstrName, _T("pushedtextcolor")) == 0 ) |
| 326 | { |
| 327 | if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue); |
| 328 | LPTSTR pstr = NULL; |
| 329 | DWORD clrColor = _tcstoul(pstrValue, &pstr, 16); |
| 330 | SetPushedTextColor(clrColor); |
| 331 | } |
| 332 | else if( _tcscmp(pstrName, _T("focusedtextcolor")) == 0 ) |
| 333 | { |
| 334 | if( *pstrValue == _T('#')) pstrValue = ::CharNext(pstrValue); |
| 335 | LPTSTR pstr = NULL; |
| 336 | DWORD clrColor = _tcstoul(pstrValue, &pstr, 16); |
| 337 | SetFocusedTextColor(clrColor); |
| 338 | } |
| 339 | else CLabelUI::SetAttribute(pstrName, pstrValue); |
| 340 | } |
| 341 | |
| 342 | void CButtonUI::PaintText(HDC hDC) |
| 343 | { |
nothing calls this directly
no outgoing calls
no test coverage detected