home *** CD-ROM | disk | FTP | other *** search
- /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
- Copyright (c) 1998 Microsoft Corporation
-
- Module Name:
-
- app.h
-
- Abstract:
-
- SR App sample main application class definition.
-
- Environment:
-
- AutoPC
-
- -------------------------------------------------------------------*/
-
- #ifndef CAPP_H
- #define CAPP_H
-
- #define BLACK RGB(0,0,0)
- #define RED RGB(255,0,0)
- #define GREEN RGB(0,255,0)
- #define BLUE RGB(0,0,255)
- #define YELLOW RGB(255,255,0)
- #define VIOLET RGB(255,0,255)
- #define CYAN RGB(0,255,255)
- #define WHITE RGB(255,255,255)
-
- class CSRApp {
- public:
- HINSTANCE m_hInst;
- DWORD m_idThread; // the ID of the main application thread
-
- CSRApp(HINSTANCE hInst);
- ~CSRApp();
-
- // Attributes
- private:
- BSTR m_bstrAppName; // Application caption title.
- BSTR m_bstrNumbers;
-
- public:
- BSTR m_bstrNoColors;
- BSTR m_bstrNoColorsTitle;
- IASEventSink* m_pFormEventSink; // the form's event sink
- IASClassMsgSink* m_pAppMessageSink; // the message sink
- IASEventSink* m_pAppEventSink; // the form's event sink
- IfmManage* m_pManage; // the forms manager object
- IASActiveForms* m_pActiveForms; // the active form manager
- IfmSystem* m_pFmSys; // the forms sys interface ptr
-
- IASForm* m_pMainForm; // the Main menu form
- IASForm* m_pColorsForm;
- IASForm* m_pNumbersForm;
-
- IASLabel* m_pNumbersLabel;
-
- IAPCSpeech* m_pSpeech; // The apcspch object
- PIVCMDMENUW m_pVMColorsForm;
- PIVCMDMENUW m_pVMNumbersForm;
-
- IASPowerListBox* m_pPLBMainFormMenu; // the list box
-
- OLE_HANDLE m_hFC; // The form context handle
- long m_xres; // Screen x resolution
- long m_yres; // Screen y resolution
-
-
- // Operations
- public:
- BOOL IsColorWordsTrained();
- BOOL Init();
- BOOL LoadBSTR(UINT uID, BSTR* pBStr);
- void Quit();
- void AddNumber(int);
- HRESULT CreateColorsVoiceMenu();
-
- private:
- HRESULT CreateSinks();
- HRESULT GetFormsManager();
- HRESULT CreateForms();
- HRESULT CreateNumbersVoiceMenu();
-
- };
-
- extern CSRApp* g_pApp;
-
- #endif //CAPP_H
-
-