home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Win32_Samples / win32 / srapp / app.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  2.3 KB  |  92 lines

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2.  
  3. Copyright (c) 1998 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     app.h
  8.  
  9. Abstract:
  10.  
  11.     SR App sample main application class definition.
  12.  
  13. Environment:
  14.  
  15.     AutoPC
  16.  
  17. -------------------------------------------------------------------*/
  18.  
  19. #ifndef CAPP_H
  20. #define CAPP_H
  21.  
  22. #define BLACK        RGB(0,0,0)
  23. #define RED         RGB(255,0,0)
  24. #define GREEN       RGB(0,255,0)
  25. #define BLUE        RGB(0,0,255)
  26. #define YELLOW      RGB(255,255,0)
  27. #define VIOLET      RGB(255,0,255)
  28. #define CYAN        RGB(0,255,255)
  29. #define WHITE       RGB(255,255,255)
  30.  
  31. class CSRApp {
  32.     public:
  33.         HINSTANCE       m_hInst;
  34.         DWORD            m_idThread; // the ID of the main application thread
  35.  
  36.         CSRApp(HINSTANCE hInst);
  37.         ~CSRApp();
  38.  
  39. // Attributes
  40.     private:
  41.         BSTR                m_bstrAppName;          // Application caption title.
  42.         BSTR                m_bstrNumbers;
  43.  
  44.     public:
  45.         BSTR                m_bstrNoColors;
  46.         BSTR                m_bstrNoColorsTitle;
  47.         IASEventSink*        m_pFormEventSink;    // the form's event sink
  48.         IASClassMsgSink*    m_pAppMessageSink;    // the message sink
  49.         IASEventSink*        m_pAppEventSink;    // the form's event sink
  50.         IfmManage*            m_pManage;          // the forms manager object
  51.         IASActiveForms*        m_pActiveForms;        // the active form manager
  52.         IfmSystem*            m_pFmSys;              // the forms sys interface ptr
  53.  
  54.         IASForm*            m_pMainForm;        // the Main menu form
  55.         IASForm*            m_pColorsForm;
  56.         IASForm*            m_pNumbersForm;
  57.  
  58.         IASLabel*            m_pNumbersLabel;
  59.  
  60.         IAPCSpeech*            m_pSpeech;            // The apcspch object
  61.         PIVCMDMENUW            m_pVMColorsForm;    
  62.         PIVCMDMENUW            m_pVMNumbersForm;
  63.  
  64.         IASPowerListBox*    m_pPLBMainFormMenu;    // the list box
  65.  
  66.         OLE_HANDLE            m_hFC;                // The form context handle
  67.         long                m_xres;                // Screen x resolution
  68.         long                m_yres;                // Screen y resolution
  69.  
  70.  
  71. // Operations
  72.     public:
  73.         BOOL    IsColorWordsTrained();
  74.         BOOL    Init();
  75.         BOOL    LoadBSTR(UINT uID, BSTR* pBStr);
  76.         void    Quit();
  77.         void    AddNumber(int);
  78.         HRESULT CreateColorsVoiceMenu();
  79.  
  80.     private:
  81.         HRESULT CreateSinks();
  82.         HRESULT GetFormsManager();
  83.         HRESULT    CreateForms();
  84.         HRESULT    CreateNumbersVoiceMenu();
  85.  
  86. };
  87.  
  88. extern    CSRApp* g_pApp;
  89.  
  90. #endif //CAPP_H    
  91.  
  92.