Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.3 KiB

  1. // Copyright (c) 1997-1999 Microsoft Corporation
  2. #include "precomp.h"
  3. #ifdef EXT_DEBUG
  4. #undef THIS_FILE
  5. static char THIS_FILE[] = __FILE__;
  6. #endif
  7. #include "ChkListHandler.h"
  8. #include "resource.h"
  9. //---------------------------------------
  10. CCheckListHandler::CCheckListHandler()
  11. {
  12. m_hDlg = 0;
  13. m_hwndList = 0;
  14. }
  15. //---------------------------------------
  16. void CCheckListHandler::Attach(HWND hDlg, int chklistID)
  17. {
  18. m_hDlg = hDlg;
  19. m_hwndList = GetDlgItem(hDlg, chklistID);
  20. }
  21. //---------------------------------------
  22. CCheckListHandler::~CCheckListHandler()
  23. {
  24. Empty();
  25. }
  26. //---------------------------------------
  27. void CCheckListHandler::Empty(void)
  28. {
  29. if (m_hwndList != NULL)
  30. {
  31. UINT_PTR cItems = SendMessage(m_hwndList, CLM_GETITEMCOUNT, 0, 0);
  32. while (cItems > 0)
  33. {
  34. cItems--;
  35. }
  36. }
  37. SendMessage(m_hwndList, CLM_RESETCONTENT, 0, 0);
  38. }
  39. //-----------------------------------------------------------------------------
  40. void CCheckListHandler::Reset(void)
  41. {
  42. SendMessage(m_hwndList, CLM_RESETCONTENT, 0, 0);
  43. }
  44. //-------------------------------------------------------
  45. #define AllFlagsOn(dw1, dw2) (((dw1) & (dw2)) == (dw2)) // equivalent to ((dw1 | dw2) == dw1)
  46. void CCheckListHandler::HandleListClick(PNM_CHECKLIST pnmc)
  47. {
  48. }