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.

76 lines
2.4 KiB

  1. /*++
  2. Module Name:
  3. mvEdit.cpp
  4. Abstract:
  5. This module contains the declaration of the CMultiValuedStringEdit.
  6. This class displays the dialog to edit multi-valued string.
  7. */
  8. #ifndef __MVEDIT_H_
  9. #define __MVEDIT_H_
  10. #include "resource.h" // main symbols
  11. #include "DfsEnums.h"
  12. /////////////////////////////////////////////////////////////////////////////
  13. // CMultiValuedStringEdit
  14. class CMultiValuedStringEdit :
  15. public CDialogImpl<CMultiValuedStringEdit>
  16. {
  17. public:
  18. CMultiValuedStringEdit(int nDlgTitle = 0, int nText = 0, UINT uiStringLengthLimit = 0);
  19. ~CMultiValuedStringEdit();
  20. enum { IDD = IDD_MVSTRINGEDIT };
  21. BEGIN_MSG_MAP(CMultiValuedStringEdit)
  22. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  23. MESSAGE_HANDLER(WM_HELP, OnCtxHelp)
  24. MESSAGE_HANDLER(WM_CONTEXTMENU, OnCtxMenuHelp)
  25. MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
  26. COMMAND_ID_HANDLER(IDOK, OnOK)
  27. COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
  28. COMMAND_ID_HANDLER(IDC_MVSTRINGEDIT_STRING, OnString)
  29. COMMAND_ID_HANDLER(IDC_MVSTRINGEDIT_ADD, OnAdd)
  30. COMMAND_ID_HANDLER(IDC_MVSTRINGEDIT_REMOVE, OnRemove)
  31. END_MSG_MAP()
  32. // Command Handlers
  33. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  34. LRESULT OnCtxHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  35. LRESULT OnCtxMenuHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  36. LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  37. LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  38. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  39. LRESULT OnString(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  40. LRESULT OnAdd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  41. LRESULT OnRemove(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  42. // Methods to access data in the dialog.
  43. HRESULT put_Strings(
  44. IN BSTR i_bstrValues,
  45. IN BSTR i_bstrSeparators
  46. );
  47. HRESULT get_Strings(BSTR *o_bstrValues);
  48. protected:
  49. CComBSTR m_bstrSeparators;
  50. CComBSTR m_bstrValues;
  51. int m_nDlgTitle;
  52. int m_nText;
  53. UINT m_uiStringLengthLimit;
  54. };
  55. HRESULT InvokeMultiValuedStringEditDlg(
  56. IN BSTR* io_pbstr,
  57. IN BSTR i_bstrSeparators,
  58. IN int i_nDlgTitle = 0,
  59. IN int i_nText = 0,
  60. IN UINT i_uiStringLengthLimit = 0
  61. );
  62. #endif //__MVEDIT_H_