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.

71 lines
2.3 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. bltmruc.hxx
  7. BLT MRU Combo class definition
  8. FILE HISTORY:
  9. gregj 29-Oct-1991 Created
  10. */
  11. #ifndef _BLTMRUC_HXX_
  12. #define _BLTMRUC_HXX_
  13. /*************************************************************************
  14. NAME: MRU_COMBO
  15. SYNOPSIS: class for combo box with MRU list
  16. INTERFACE:
  17. MRU_COMBO() constructor; construct with owner
  18. window, CID, .INI section name, .INI
  19. file name, max. number of MRU entries
  20. to keep, optional max. edit field length
  21. SaveText() saves the current text in the combobox
  22. into the MRU list
  23. PARENT: COMBOBOX
  24. CAVEATS:
  25. SaveText() only saves the text into the .INI file. It does
  26. not change the contents of the control itself (although, if
  27. you construct an MRU_COMBO again with the same parameters,
  28. it will pick up the change).
  29. Do not add or remove items in the list, or the control will
  30. get confused. The only way items should get into the list
  31. is from the .INI file, during the constructor.
  32. NOTES:
  33. HISTORY:
  34. gregj 29-Oct-1991 Created
  35. beng 29-Mar-1992 Const args
  36. Johnl 30-Jun-1992 Doesn't add duplicate UNCs to list
  37. **************************************************************************/
  38. DLL_CLASS MRU_COMBO : public COMBOBOX
  39. {
  40. private:
  41. NLS_STR _nlsSectionName;
  42. NLS_STR _nlsKeyOrder; /* letter keys in correct MRU order */
  43. NLS_STR _nlsFileName; /* name of INI file */
  44. INT _cMaxEntries;
  45. void FillList();
  46. BOOL IsOldUNC( const NLS_STR & nlsNewUNC ) ;
  47. public:
  48. MRU_COMBO( OWNER_WINDOW *powin, CID cid, const TCHAR *pszSectionName,
  49. const TCHAR *pszFileName, INT cMaxEntries, UINT cbMaxLen = 0 );
  50. void SaveText(); /* saves current contents as MRU item */
  51. };
  52. #endif // _BLTMRUC_HXX_ - end of file