home *** CD-ROM | disk | FTP | other *** search
- //+----------------------------------------------------------------------------
- //
- // File: app.h
- //
- // Copyight: (c) 1997, Microsoft Corporation
- // All Rights Reserved
- // Infomation Contained Herein Is Propprietary and Confidential
- //
- // Contents: simple app defines, prototypes & external data
- // declarations
- //
- //-----------------------------------------------------------------------------
-
- #ifndef CAPP_H
- #define CAPP_H
-
- class CKeyboardApp {
- public:
-
-
- // Data Members
- public:
- BSTR m_bszAppName; // Application caption title.
-
- HINSTANCE m_hInst;
- DWORD m_idThread; // the ID of the main application thread
-
- private:
- 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
- IfmSystem* m_pFmSys; // the forms sys interface ptr
- IASForm* m_pForm; // the main application form
- IASLabel* m_pLabelCodes; // the text label for message codes
- IASLabel* m_pLabelSystem; // the text label for system message codes
-
- OLE_HANDLE m_hFC; // The form context handle
- long m_xres; // Screen x resolution
- long m_yres; // Screen y resolution
-
-
- // Operations
- public:
- CKeyboardApp(HINSTANCE hInst); // Constructor, initializes member variables
- ~CKeyboardApp(); // Destructor, cleans up all interface pointers, etc.
-
- BOOL Init(); // Main application intialization
- BOOL LoadBSTR(UINT uID, BSTR* pBStr); // Loads a resource string into a BSTR
- VOID ProcessMessage(LONG uMsg, LONG wParam, LONG lParam); // Called from various spots to handle system messages
- void UpdateSystemLabel(LPWSTR lpwstrText); // Changes text on the "system label" (the top label)
-
- private:
- HRESULT CreateSinks(); // Creates all event/class msg sinks
- HRESULT GetFormsManager(); // Gets the forms manager interface
- VOID DeleteFormControls(); // Releases all control interfaces
- HRESULT CreateMainForm(); // Creates the main form
- HRESULT CreateFormControls(); // Adds controls to the main form
- void UpdateKeyString(LONG uMsg, LONG wParam, LONG lParam); // Helper to ProcessMessage function
- void UpdateKeyLabel(LPWSTR lpwstrText); // Updates text on "key label" (the bottom label)
-
- };
-
- #endif //CAPP_H
-
-