webapp.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. //////////////////////////////////////////////////////////////////////////
  2. //
  3. //  webapp.h
  4. //
  5. //      The purpose of this application is to demonstrate how a C++
  6. //      application can host IE4, and manipulate the OC vtable.
  7. //
  8. //      This file contains the specification of the WebApp class.
  9. //
  10. //  (C) Copyright 1997 by Microsoft Corporation. All rights reserved.
  11. //
  12. //////////////////////////////////////////////////////////////////////////
  13. #ifndef _WEBAPP_H_
  14. #define _WEBAPP_H_
  15. #include <exdisp.h>
  16. #include <mshtml.h>
  17. #include "container.h"
  18. class CEventSink;
  19. class CWebApp
  20. {
  21.     private:
  22.         HINSTANCE       m_hInstance;        // application instance
  23.         HWND            m_hwnd;             // window handle
  24.         CContainer      *m_pContainer;      // container object
  25.         IWebBrowser2    *m_pweb;            // IE4 IWebBrowser interface pointer
  26.     public:
  27.         CWebApp();
  28.         BOOL Register(HINSTANCE hInstance);
  29.         void InitializeData();
  30.         void Create();
  31.         void MessageLoop();
  32.     private:
  33.         static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  34.         // Window Messages
  35.         void OnCreate(HWND hwnd);
  36.         void OnDestroy();
  37.         void OnSize(int width, int height);
  38.         void OnKeyDown(UINT msg, WPARAM wParam, LPARAM lParam);
  39.         void OnSetFocus(HWND hwndLose);
  40.         void OnExit();
  41.         void OnRelease();
  42.         // Calls to IE4 WebOC
  43.         void Navigate(BSTR url);
  44. };
  45. #endif