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.

81 lines
2.2 KiB

  1. // stdafx.h : include file for standard system include files,
  2. // or project specific include files that are used frequently, but
  3. // are changed infrequently
  4. //
  5. #if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
  6. #define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10. #ifndef WIN32_LEAN_AND_MEAN
  11. #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
  12. #endif // WIN32_LEAN_AND_MEAN
  13. #define MAX_SIZE 4096
  14. #define NORM_SIZE 256
  15. #define WM_RECOEVENT WM_APP // Window message used for recognition events
  16. #define GRAM_ID 11111
  17. // Windows Header Files:
  18. #include <windows.h>
  19. #include <commdlg.h>
  20. // C RunTime Header Files
  21. #include <stdio.h>
  22. // Other Header Files
  23. #ifndef __CFGDUMP_
  24. #define __CFGDUMP_
  25. #include <tchar.h>
  26. #include <atlbase.h>
  27. #include <ole2.h>
  28. #include <oleauto.h>
  29. #include <richedit.h>
  30. #include <richole.h>
  31. #include "tom.h"
  32. #include <mlang.h>
  33. #include <sapi.h>
  34. #include <sphelper.h>
  35. #include <spddkhlp.h>
  36. #include <sapiint.h>
  37. #include "resource.h"
  38. #endif
  39. /****************************************************************************
  40. * CRecoDlgListItem *
  41. *------------------*
  42. *
  43. * This class stores the recognition result as well as a text string associated
  44. * with the recognition. Note that the string will sometimes be <noise> and
  45. * the pResult will be NULL. In other cases the string will be <Unrecognized>
  46. * and pResult will be valid.
  47. *
  48. ********************************************************************* RAL ***/
  49. class CRecoDlgListItem
  50. {
  51. public:
  52. CRecoDlgListItem(ISpRecoResult * pResult, const WCHAR * pwsz, BOOL fHypothesis) :
  53. m_cpRecoResult(pResult),
  54. m_dstr(pwsz),
  55. m_fHypothesis(fHypothesis)
  56. {}
  57. ISpRecoResult * GetRecoResult() const { return m_cpRecoResult; }
  58. int GetTextLength() const { return m_dstr.Length(); }
  59. const WCHAR * GetText() const { return m_dstr; }
  60. BOOL IsHypothesis() const { return m_fHypothesis; }
  61. private:
  62. CComPtr<ISpRecoResult> m_cpRecoResult;
  63. CSpDynamicString m_dstr;
  64. BOOL m_fHypothesis;
  65. };
  66. #endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)