Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.2 KiB

  1. //**********************************************************************
  2. // File name: app.h
  3. //
  4. // Definition of CSimpleApp
  5. //
  6. // Copyright (c) 1992 - 1993 Microsoft Corporation. All rights reserved.
  7. //**********************************************************************
  8. #if !defined( _APP_H_)
  9. #define _APP_H_
  10. #include <ole2.h>
  11. class CSimpleDoc;
  12. class CSimpleApp : public IUnknown
  13. {
  14. public:
  15. int m_nCount; // reference count
  16. HWND m_hAppWnd; // main window handle
  17. HWND m_hDriverWnd; // window handle for the driver app.
  18. HINSTANCE m_hInst; // application instance
  19. CSimpleDoc FAR * m_lpDoc; // pointer to document object
  20. BOOL m_fInitialized; // OLE initialization flag
  21. HMENU m_hMainMenu;
  22. HMENU m_hFileMenu;
  23. HMENU m_hEditMenu;
  24. HMENU m_hHelpMenu;
  25. HMENU m_hCascadeMenu; // OLE object's verb
  26. // Drag/Drop related fields
  27. int m_nDragDelay; // time delay (in msec) before drag should start
  28. int m_nDragMinDist; // min. distance (radius) before drag should start
  29. int m_nScrollDelay; // time delay (in msec) before scroll should start
  30. int m_nScrollInset; // Border inset distance to start drag scroll
  31. int m_nScrollInterval; // scroll interval time (in msec)
  32. CSimpleApp(); // Constructor
  33. ~CSimpleApp(); // Destructor
  34. // IUnknown Interfaces
  35. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR* ppvObj);
  36. STDMETHODIMP_(ULONG) AddRef();
  37. STDMETHODIMP_(ULONG) Release();
  38. // Initialization methods
  39. BOOL fInitApplication (HANDLE hInstance);
  40. BOOL fInitInstance (HANDLE hInstance, int nCmdShow);
  41. // Message handling methods
  42. long lCommandHandler (HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);
  43. long lSizeHandler (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  44. long lCreateDoc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  45. BOOL HandleAccelerators (LPMSG lpMsg);
  46. void PaintApp(HDC hDC);
  47. void DestroyDocs();
  48. };
  49. #endif // _APP_H_