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.

137 lines
3.5 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. devcb.hxx
  7. Definitions for device combo boxes
  8. These are BLT comboboxes with various tasty fillings already supplied.
  9. This package depends on both BLT and LMOBJ.
  10. FILE HISTORY:
  11. beng 22-Sep-1991 Separated from bltlc.hxx
  12. */
  13. #ifndef _DEVCB_HXX_
  14. #define _DEVCB_HXX_
  15. #include "string.hxx"
  16. #include "lmobj.hxx" // Get device enumerations
  17. // The following defines specify which domains are to be included in the
  18. // DOMAIN_COMBO. A combination of them is passed to the DOMAIN_COMBO
  19. // constructor.
  20. #define DOMCB_PRIM_DOMAIN (0x0001)
  21. #define DOMCB_LOGON_DOMAIN (0x0002)
  22. #define DOMCB_OTHER_DOMAINS (0x0004)
  23. #define DOMCB_DS_DOMAINS (0x0008)
  24. /*************************************************************************
  25. NAME: DOMAIN_COMBO
  26. SYNOPSIS: combo box with additional logic for containing domains
  27. INTERFACE: DOMAIN_COMBO() constructor; initializes the
  28. combo's list with the specified
  29. domains
  30. PARENT: COMBOBOX
  31. CAVEATS:
  32. See the COMBOBOX header for a note about the cbMaxLen
  33. parameter to the constructor.
  34. This class currently has no means of appearing in an APP_WINDOW.
  35. NOTES:
  36. CODEWORK. While it would be nice if the cbMaxLen parameter to the
  37. constructor could default to DNLEN, BLT does not otherwise require
  38. netcons.h. If netcons.h moves into lmui.hxx in the future, this
  39. default value may be a good idea.
  40. HISTORY:
  41. RustanL 20-Nov-1990 Created
  42. RustanL 22-Feb-1991 Modified as a result of changing
  43. the LIST_CONTROL hierarchy
  44. beng 05-Oct-1991 Win32 conversion
  45. **************************************************************************/
  46. DLL_CLASS DOMAIN_COMBO : public COMBOBOX
  47. {
  48. public:
  49. DOMAIN_COMBO( OWNER_WINDOW * powin,
  50. CID cid,
  51. UINT fsDomains,
  52. UINT cbMaxLen );
  53. };
  54. /*************************************************************************
  55. NAME: DEVICE_COMBO
  56. SYNOPSIS: combo box with added logic for containing device names
  57. INTERFACE: DEVICE_COMBO() constructor
  58. Refresh() clears the listbox, and then
  59. fills it with fresh information;
  60. preserves the selection, if
  61. possible (otherwise, uses no
  62. selection)
  63. QueryDevice() convenient way to get the
  64. device name string of the currently
  65. selected item (returns empty
  66. string if no item is selected)
  67. DeleteCurrentDeviceName()
  68. deletes the currently selected
  69. item; does nothing if there is
  70. no selection
  71. PARENT: COMBOBOX
  72. CAVEATS:
  73. This class currently has no means of appearing in an APP_WINDOW.
  74. HISTORY:
  75. RustanL 20-Nov-1990 Created
  76. RustanL 22-Feb-1991 Modified as a result of changing
  77. the LIST_CONTROL hierarchy
  78. beng 05-Oct-1991 Win32 conversion
  79. **************************************************************************/
  80. DLL_CLASS DEVICE_COMBO : public COMBOBOX
  81. {
  82. private:
  83. LMO_DEVICE _lmodevType;
  84. LMO_DEV_USAGE _devusage;
  85. BOOL _fDefSelLast; // indicates that default selection should
  86. // be the last in the list.
  87. APIERR FillDevices();
  88. public:
  89. DEVICE_COMBO( OWNER_WINDOW * powin,
  90. CID cid,
  91. LMO_DEVICE lmodevType,
  92. LMO_DEV_USAGE devusage );
  93. APIERR Refresh();
  94. APIERR QueryDevice( NLS_STR * pnlsDevice ) const;
  95. VOID DeleteCurrentDeviceName();
  96. };
  97. #endif // _DEVCB_HXX_ - end of file