Source code of Windows XP (NT5)
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.

48 lines
1.5 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. void SetSelected(bool bValue) { m_bSelected = bValue; }
  16. void SetSelected(BOOL bValue) { bValue? m_bSelected = true : m_bSelected = false; }
  17. void SetName(LPCTSTR pcszName) { m_bstrName = pcszName; }
  18. LPCTSTR GetName() { return m_bstrName; }
  19. void SetPropertyName(LPCTSTR pcszPropertyName) { m_bstrPropertyName = pcszPropertyName; }
  20. LPCTSTR GetPropertyName() { return m_bstrPropertyName; }
  21. CColumnItem& operator=(const CColumnItem& colItem);
  22. protected:
  23. CComBSTR m_bstrName;
  24. CComBSTR m_bstrPropertyName;
  25. bool m_bSelected;
  26. };
  27. class CColumnManagerDlg
  28. {
  29. public:
  30. CColumnManagerDlg(CSimpleArray<CColumnItem*> *pArrayColumns);
  31. ~CColumnManagerDlg();
  32. INT_PTR CALLBACK ColumnManagerDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);
  33. STDMETHODIMP InitializeDialog();
  34. STDMETHODIMP PopulateColumnsList();
  35. STDMETHODIMP AddColumnItemToList(CColumnItem* pszItem);
  36. STDMETHODIMP OnOK();
  37. protected:
  38. HWND m_hWnd;
  39. HWND m_hwndListView;
  40. CSimpleArray<CColumnItem*> *m_pArrayColumns;
  41. };