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.

67 lines
2.3 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. DWORD m_dwSourceEffect; // Allowed effects to source
  33. DWORD m_dwTargetEffect; // Allowed target effects
  34. CSimpleApp(); // Constructor
  35. ~CSimpleApp(); // Destructor
  36. // IUnknown Interfaces
  37. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR* ppvObj);
  38. STDMETHODIMP_(ULONG) AddRef();
  39. STDMETHODIMP_(ULONG) Release();
  40. // Initialization methods
  41. BOOL fInitApplication (HANDLE hInstance);
  42. BOOL fInitInstance (HANDLE hInstance, int nCmdShow);
  43. // Message handling methods
  44. LRESULT lCommandHandler (HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);
  45. long lSizeHandler (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  46. long lCreateDoc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  47. BOOL HandleAccelerators (LPMSG lpMsg);
  48. void PaintApp(HDC hDC);
  49. void DestroyDocs();
  50. void UpdateDragDropEffects(int iMenuPos, int iMenuCommand, DWORD dwEffect,
  51. DWORD *pdwEffectToUpdate);
  52. };
  53. #endif // _APP_H_