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.

89 lines
3.1 KiB

  1. /*======================================================================================//
  2. | Process Control //
  3. | //
  4. |Copyright (c) 1998 Sequent Computer Systems, Incorporated. All rights reserved. //
  5. | //
  6. |File Name: NameRulePages.h //
  7. | //
  8. |Description: Definition of name rule property pages //
  9. | //
  10. |Created: Paul Skoglund 07-1998 //
  11. | //
  12. |Rev History: //
  13. | //
  14. |=======================================================================================*/
  15. #ifndef __NAMERULEPAGES_H_
  16. #define __NAMERULEPAGES_H_
  17. #include "Globals.h"
  18. #include "ppage.h"
  19. BOOL NameRuleDlg(PCNameRule &out, PCNameRule *Initializer = NULL, BOOL bReadOnly = FALSE);
  20. class CBaseNode;
  21. class CNRulePage :
  22. public CMySnapInPropertyPageImpl<CNRulePage>
  23. {
  24. public :
  25. CNRulePage(int nTitle, PCNameRule *out = NULL, PCNameRule *in = NULL);
  26. ~CNRulePage();
  27. enum { IDD = IDD_NAMERULE_PAGE };
  28. CComBSTR m_bName;
  29. CComBSTR m_bMask;
  30. CComBSTR m_bComment;
  31. MATCH_TYPE m_Type;
  32. BEGIN_MSG_MAP(CNRulePage)
  33. MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
  34. MESSAGE_HANDLER(WM_HELP, OnWMHelp)
  35. COMMAND_HANDLER(IDC_NAME, EN_CHANGE, OnEditChange)
  36. COMMAND_HANDLER(IDC_MATCHMASK, EN_CHANGE, OnEditChange)
  37. COMMAND_HANDLER(IDC_COMMENT, EN_CHANGE, OnEditChange)
  38. COMMAND_HANDLER(IDC_BTN_ALIAS, BN_CLICKED, OnAliasMacro)
  39. COMMAND_RANGE_HANDLER(IDC_DIR, IDC_STRING, OnMaskTypeEdit)
  40. CHAIN_MSG_MAP(CMySnapInPropertyPageImpl<CNRulePage>)
  41. END_MSG_MAP()
  42. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  43. LRESULT OnWMHelp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  44. LRESULT OnEditChange(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  45. LRESULT OnMaskTypeEdit(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  46. LRESULT OnAliasMacro(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  47. BOOL OnHelp();
  48. BOOL OnKillActive() { return Validate(TRUE); }
  49. BOOL OnApply();
  50. BOOL UpdateData(BOOL bSaveAndValidate = TRUE);
  51. BOOL Validate(BOOL bSave = FALSE);
  52. void SetReadOnly() { m_bReadOnly = TRUE;}
  53. private:
  54. PCNameRule *m_OutBuffer;
  55. BOOL m_bReadOnly;
  56. union {
  57. struct
  58. {
  59. int matchtype : 1;
  60. int matchmask : 1;
  61. int matchname : 1;
  62. int comment : 1;
  63. } Fields;
  64. int on;
  65. } PageFields;
  66. HANDLE m_hBtnImage;
  67. HMENU m_hMenu;
  68. };
  69. #endif // __NAMERULEPAGES_H_