UICheckBox.cpp 500 B

123456789101112131415161718192021222324252627
  1. #include "stdafx.h"
  2. #include "UICheckBox.h"
  3. namespace DuiLib
  4. {
  5. LPCTSTR CCheckBoxUI::GetClass() const
  6. {
  7. return DUI_CTR_CHECKBOX;
  8. }
  9. LPVOID CCheckBoxUI::GetInterface(LPCTSTR pstrName)
  10. {
  11. if( _tcscmp(pstrName, DUI_CTR_CHECKBOX) == 0 ) return static_cast<CCheckBoxUI*>(this);
  12. return COptionUI::GetInterface(pstrName);
  13. }
  14. void CCheckBoxUI::SetCheck(bool bCheck, bool bTriggerEvent)
  15. {
  16. Selected(bCheck, bTriggerEvent);
  17. }
  18. bool CCheckBoxUI::GetCheck() const
  19. {
  20. return IsSelected();
  21. }
  22. }