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.

51 lines
1.7 KiB

  1. //-------------------------------------------------------------------------
  2. // File: ColumnMgrDlg.h
  3. //
  4. // Author : Kishnan Nedungadi
  5. //
  6. // created : 3/27/2000
  7. //-------------------------------------------------------------------------
  8. INT_PTR CALLBACK ColumnManagerDlgProc(HWND hDLG, UINT iMessage, WPARAM wParam, LPARAM lParam);
  9. class CColumnItem
  10. {
  11. public:
  12. CColumnItem(LPCTSTR pcszName, LPCTSTR pcszPropertyName, bool bSelected=false);
  13. CColumnItem(const CColumnItem& colItem);
  14. bool IsSelected() { return m_bSelected; }
  15. bool IsPrevSelected() { return m_bPrevSelected;}
  16. void SetSelected(bool bValue) { m_bSelected = bValue; }
  17. void SetSelected(BOOL bValue) { bValue? m_bSelected = true : m_bSelected = false; }
  18. void SetPrevSelected(bool bvalue) { m_bPrevSelected = bvalue;}
  19. void SetName(LPCTSTR pcszName) { m_bstrName = pcszName; }
  20. LPCTSTR GetName() { return m_bstrName; }
  21. void SetPropertyName(LPCTSTR pcszPropertyName) { m_bstrPropertyName = pcszPropertyName; }
  22. LPCTSTR GetPropertyName() { return m_bstrPropertyName; }
  23. CColumnItem& operator=(const CColumnItem& colItem);
  24. protected:
  25. CComBSTR m_bstrName;
  26. CComBSTR m_bstrPropertyName;
  27. bool m_bSelected;
  28. bool m_bPrevSelected;
  29. };
  30. class CColumnManagerDlg
  31. {
  32. public:
  33. CColumnManagerDlg(CSimpleArray<CColumnItem*> *pArrayColumns);
  34. ~CColumnManagerDlg();
  35. INT_PTR CALLBACK ColumnManagerDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);
  36. STDMETHODIMP InitializeDialog();
  37. STDMETHODIMP PopulateColumnsList();
  38. STDMETHODIMP AddColumnItemToList(CColumnItem* pszItem);
  39. STDMETHODIMP OnOK();
  40. protected:
  41. HWND m_hWnd;
  42. HWND m_hwndListView;
  43. CSimpleArray<CColumnItem*> *m_pArrayColumns;
  44. };