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

  1. //+----------------------------------------------------------------------------
  2. // 
  3. // File:        app.h
  4. //
  5. // Copyight:    (c) 1997, Microsoft Corporation
  6. //                 All Rights Reserved
  7. //                Infomation Contained Herein Is Propprietary and Confidential
  8. //
  9. // Contents:     simple app defines, prototypes & external data 
  10. //                declarations
  11. //
  12. //-----------------------------------------------------------------------------
  13.  
  14. #ifndef CAPP_H
  15. #define CAPP_H
  16.  
  17. class CKeyboardApp {
  18.     public:
  19.  
  20.  
  21.     // Data Members
  22.     public:
  23.         BSTR                m_bszAppName;          // Application caption title.
  24.  
  25.         HINSTANCE       m_hInst;
  26.         DWORD            m_idThread; // the ID of the main application thread
  27.  
  28.     private:
  29.         IASEventSink*        m_pFormEventSink;    // the form's event sink
  30.         IASClassMsgSink*    m_pAppMessageSink;    // the message sink
  31.         IASEventSink*        m_pAppEventSink;    // the form's event sink
  32.         IfmManage*            m_pManage;          // the forms manager object
  33.         IfmSystem*            m_pFmSys;              // the forms sys interface ptr
  34.         IASForm*            m_pForm;            // the main application form
  35.         IASLabel*            m_pLabelCodes;        // the text label for message codes
  36.         IASLabel*            m_pLabelSystem;        // the text label for system message codes
  37.  
  38.         OLE_HANDLE            m_hFC;                // The form context handle
  39.         long                m_xres;                // Screen x resolution
  40.         long                m_yres;                // Screen y resolution
  41.  
  42.  
  43.     // Operations
  44.     public:
  45.         CKeyboardApp(HINSTANCE hInst);    // Constructor, initializes member variables
  46.         ~CKeyboardApp();                // Destructor, cleans up all interface pointers, etc.
  47.         
  48.         BOOL    Init();                    // Main application intialization
  49.         BOOL    LoadBSTR(UINT uID, BSTR* pBStr);    // Loads a resource string into a BSTR
  50.         VOID    ProcessMessage(LONG uMsg, LONG wParam, LONG lParam);    // Called from various spots to handle system messages
  51.         void    UpdateSystemLabel(LPWSTR lpwstrText);    // Changes text on the "system label" (the top label)
  52.  
  53.     private:
  54.         HRESULT CreateSinks();            // Creates all event/class msg sinks
  55.         HRESULT GetFormsManager();        // Gets the forms manager interface
  56.         VOID    DeleteFormControls();    // Releases all control interfaces
  57.         HRESULT    CreateMainForm();        // Creates the main form
  58.         HRESULT    CreateFormControls();    // Adds controls to the main form
  59.         void    UpdateKeyString(LONG uMsg, LONG wParam, LONG lParam);    // Helper to ProcessMessage function
  60.         void    UpdateKeyLabel(LPWSTR lpwstrText);    // Updates text on "key label" (the bottom label)
  61.  
  62. };
  63.  
  64. #endif //CAPP_H    
  65.  
  66.