DictionaryObj.h
上传用户:biuytresa
上传日期:2007-12-07
资源大小:721k
文件大小:2k
源码类别:

DNA

开发平台:

Visual C++

  1. #if !defined(AFX_DICTIONARYOBJ_H__84B0BC03_AD8B_11D2_A2DC_A31D6122660F__INCLUDED_)
  2. #define AFX_DICTIONARYOBJ_H__84B0BC03_AD8B_11D2_A2DC_A31D6122660F__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // DictionaryObj.h : header file
  7. //
  8. #include "Interface.h"
  9. #define MaxWordLength 32
  10. struct DictWord
  11. {
  12. char wordForLang1[MaxWordLength];
  13. char wordForLang2[MaxWordLength];
  14. };
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CDictionaryObj command target
  17. class CDictionaryObj : public CCmdTarget
  18. {
  19. DECLARE_DYNCREATE(CDictionaryObj)
  20. CDictionaryObj();           // protected constructor used by dynamic creation
  21. // Attributes
  22. public:
  23. // Operations
  24. public:
  25. // Overrides
  26. // ClassWizard generated virtual function overrides
  27. //{{AFX_VIRTUAL(CDictionaryObj)
  28. //}}AFX_VIRTUAL
  29. // IDictionary
  30. BEGIN_INTERFACE_PART(Dictionary, IDictionary)
  31. INIT_INTERFACE_PART(CDictionary, Dictionary)
  32. STDMETHOD_(BOOL, Initialize)();
  33. STDMETHOD_(BOOL, LoadLibrary)(LPOLESTR);
  34. STDMETHOD_(BOOL, InsertWord)(LPOLESTR, LPOLESTR);
  35. STDMETHOD_(void, DeleteWord)( LPOLESTR);
  36. STDMETHOD_(BOOL, LookupWord)(LPOLESTR, LPOLESTR *);
  37. STDMETHOD_(BOOL, RestoreLibrary)(LPOLESTR);
  38. STDMETHOD_(void, FreeLibrary)();
  39. END_INTERFACE_PART_STATIC(Dictionary) 
  40. // ISpellCheck
  41. BEGIN_INTERFACE_PART(SpellCheck, ISpellCheck)
  42. INIT_INTERFACE_PART(CDictionary, SpellCheck)
  43. STDMETHOD_(BOOL, CheckWord)(LPOLESTR, LPOLESTR *);
  44. END_INTERFACE_PART_STATIC(SpellCheck)
  45. // Implementation
  46. protected:
  47. virtual ~CDictionaryObj();
  48. // Generated message map functions
  49. //{{AFX_MSG(CDictionaryObj)
  50. // NOTE - the ClassWizard will add and remove member functions here.
  51. //}}AFX_MSG
  52. DECLARE_MESSAGE_MAP()
  53. DECLARE_INTERFACE_MAP()
  54. DECLARE_OLECREATE(CDictionaryObj)
  55. private :
  56. struct DictWord *m_pData;
  57. char *m_DictFilename[128];
  58. int m_nWordNumber, m_nStructNumber;
  59. };
  60. /////////////////////////////////////////////////////////////////////////////
  61. //{{AFX_INSERT_LOCATION}}
  62. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  63. #endif // !defined(AFX_DICTIONARYOBJ_H__84B0BC03_AD8B_11D2_A2DC_A31D6122660F__INCLUDED_)