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.

150 lines
4.2 KiB

  1. #if !defined(AFX_STREDIT_H__50303D0C_054D_11D2_AB62_00C04FA30E4A__INCLUDED_)
  2. #define AFX_STREDIT_H__50303D0C_054D_11D2_AB62_00C04FA30E4A__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // StrEdit.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CStringEditorView form view
  10. #ifndef __AFXEXT_H__
  11. #include <afxext.h>
  12. #endif
  13. class CFullEditListCtrl ;
  14. class CStringEditorDoc ;
  15. class CStringEditorView : public CFormView
  16. {
  17. protected:
  18. CStringEditorView(); // protected constructor used by dynamic creation
  19. DECLARE_DYNCREATE(CStringEditorView)
  20. // Form Data
  21. public:
  22. //{{AFX_DATA(CStringEditorView)
  23. enum { IDD = IDD_StringEditor };
  24. CEdit m_ceSearchBox;
  25. CEdit m_ceGotoBox;
  26. CButton m_cbGoto;
  27. CFullEditListCtrl m_cflstStringData;
  28. CString m_csGotoID;
  29. CString m_csSearchString;
  30. CString m_csLabel1;
  31. CString m_csLabel2;
  32. //}}AFX_DATA
  33. // Attributes
  34. public:
  35. // Operations
  36. public:
  37. bool SaveStringTable(CStringEditorDoc* pcsed, bool bprompt) ;
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CStringEditorView)
  41. public:
  42. virtual void OnInitialUpdate();
  43. virtual BOOL PreTranslateMessage(MSG* pMsg);
  44. protected:
  45. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  46. virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  47. //}}AFX_VIRTUAL
  48. // Implementation
  49. protected:
  50. virtual ~CStringEditorView();
  51. bool SearchHelper(CString cssrchstr, int nfirstrow, int numrows) ;
  52. bool FindSelRCIDEntry(int nrcid, bool berror) ;
  53. #ifdef _DEBUG
  54. virtual void AssertValid() const;
  55. virtual void Dump(CDumpContext& dc) const;
  56. #endif
  57. // Generated message map functions
  58. //{{AFX_MSG(CStringEditorView)
  59. afx_msg void OnSEGotoBtn();
  60. afx_msg void OnSESearchBtn();
  61. afx_msg void OnDestroy();
  62. afx_msg void OnFileSave();
  63. //}}AFX_MSG
  64. afx_msg LRESULT OnCommandHelp(WPARAM wParam, LPARAM lParam);
  65. DECLARE_MESSAGE_MAP()
  66. protected:
  67. CStringArray m_csaStrings ; // String table's strings
  68. CUIntArray m_cuiaRCIDs ; // String table's RC IDs
  69. unsigned m_uStrCount ; // Number of strings
  70. bool m_bFirstActivate ; // True iff first time activated
  71. };
  72. /////////////////////////////////////////////////////////////////////////////
  73. /////////////////////////////////////////////////////////////////////////////
  74. // CStringEditorDoc document
  75. class CStringEditorDoc : public CDocument
  76. {
  77. protected:
  78. CStringEditorDoc() ; // protected constructor used by dynamic creation
  79. DECLARE_DYNCREATE(CStringEditorDoc)
  80. CStringsNode* m_pcsnStrNode ; // Used to reference editor's string node
  81. CProjectRecord* m_pcprOwner ; // Used to reference editor's project document
  82. CStringTable* m_pcstRCData ; // Used to reference project's string table
  83. // Attributes
  84. public:
  85. // The next 3 functions are used to reference the pointers passed to this
  86. // class's constructor.
  87. CStringsNode* GetStrNode() { return m_pcsnStrNode ; }
  88. CProjectRecord* GetOwner() { return m_pcprOwner ; }
  89. CStringTable* GetRCData() { return m_pcstRCData ; }
  90. // Operations
  91. public:
  92. CStringEditorDoc(CStringsNode* pcsn, CProjectRecord* pcpr,
  93. CStringTable* pcst) ;
  94. bool SaveStringTable() ;
  95. // Overrides
  96. // ClassWizard generated virtual function overrides
  97. //{{AFX_VIRTUAL(CStringEditorDoc)
  98. public:
  99. virtual void Serialize(CArchive& ar); // overridden for document i/o
  100. virtual BOOL CanCloseFrame(CFrameWnd* pFrame);
  101. virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  102. protected:
  103. virtual BOOL OnNewDocument();
  104. virtual BOOL SaveModified();
  105. //}}AFX_VIRTUAL
  106. // Implementation
  107. public:
  108. virtual ~CStringEditorDoc();
  109. #ifdef _DEBUG
  110. virtual void AssertValid() const;
  111. virtual void Dump(CDumpContext& dc) const;
  112. #endif
  113. // Generated message map functions
  114. protected:
  115. //{{AFX_MSG(CStringEditorDoc)
  116. // NOTE - the ClassWizard will add and remove member functions here.
  117. //}}AFX_MSG
  118. DECLARE_MESSAGE_MAP()
  119. };
  120. //{{AFX_INSERT_LOCATION}}
  121. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  122. #endif // !defined(AFX_STREDIT_H__50303D0C_054D_11D2_AB62_00C04FA30E4A__INCLUDED_)