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.

83 lines
2.0 KiB

  1. #ifndef _SELECT_H_INCLUDED
  2. #define _SELECT_H_INCLUDED
  3. //
  4. // The common select dialog.
  5. //
  6. #include "cookie.h"
  7. #include "cache.h"
  8. #include "compdata.h"
  9. typedef enum _SELECT_TYPE {
  10. SELECT_CLASSES=0,
  11. SELECT_ATTRIBUTES,
  12. SELECT_AUX_CLASSES
  13. } SELECT_TYPE;
  14. class CSchmMgmtSelect : public CDialog
  15. {
  16. public:
  17. CSchmMgmtSelect( ComponentData *pScope,
  18. SELECT_TYPE st=SELECT_CLASSES,
  19. SchemaObject **pSchemaObject=NULL );
  20. ~CSchmMgmtSelect();
  21. BOOL fDialogLoaded;
  22. SELECT_TYPE SelectType;
  23. SchemaObject **pSchemaTarget;
  24. ComponentData *pScopeControl;
  25. virtual void DoDataExchange( CDataExchange *pDX );
  26. static const DWORD help_map[];
  27. BOOL OnHelp(WPARAM wParam, LPARAM lParam) { return ShowHelp( GetSafeHwnd(), wParam, lParam, help_map, FALSE ); };
  28. BOOL OnContextHelp(WPARAM wParam, LPARAM lParam) { return ShowHelp( GetSafeHwnd(), wParam, lParam, help_map, TRUE ); };
  29. afx_msg void OnDblclk();
  30. DECLARE_MESSAGE_MAP()
  31. };
  32. class CSchemaObjectsListBox : public CListBox
  33. {
  34. private:
  35. ComponentData * m_pScope;
  36. SELECT_TYPE m_stType;
  37. int m_nRemoveBtnID;
  38. CStringList * m_pstrlistUnremovable;
  39. int m_nUnableToDeleteID;
  40. BOOL m_fModified;
  41. CPtrList m_stringList;
  42. public:
  43. CSchemaObjectsListBox();
  44. virtual ~CSchemaObjectsListBox();
  45. void InitType( ComponentData * pScope,
  46. SELECT_TYPE stType = SELECT_CLASSES,
  47. int nRemoveBtnID = 0,
  48. CStringList * pstrlistUnremovable = NULL,
  49. int nUnableToDeleteID = 0 );
  50. BOOL AddNewObjectToList( void );
  51. BOOL RemoveListBoxItem( void );
  52. void OnSelChange( void );
  53. BOOL IsModified( void ) { ASSERT(m_pScope); return m_fModified; }
  54. void SetModified( BOOL fModified = TRUE ) { ASSERT(m_pScope); m_fModified = fModified; }
  55. };
  56. #endif