Leaked source code of windows server 2003
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.

76 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. #include "ioipf.h"
  12. class CSimpleDoc;
  13. class CSimpleApp : public IUnknown
  14. {
  15. public:
  16. int m_nCount; // reference count
  17. HWND m_hAppWnd; // main window handle
  18. HACCEL m_hAccel; // Handle to accelerator table
  19. HINSTANCE m_hInst; // application instance
  20. COleInPlaceFrame m_OleInPlaceFrame; // IOleInPlaceFrame Implementation
  21. CSimpleDoc FAR * m_lpDoc; // pointer to document object
  22. BOOL m_fInitialized; // OLE initialization flag
  23. BOOL m_fCSHMode;
  24. BOOL m_fMenuMode;
  25. HWND m_hwndUIActiveObj; // HWND of UIActive Object
  26. HPALETTE m_hStdPal; // Color palette used by container
  27. BOOL m_fAppActive; // TRUE if app is active
  28. BOOL m_fDeactivating; // TRUE if we are in the process of deactivating
  29. // an inplace object.
  30. BOOL m_fGotUtestAccelerator;// Received a unit test accelerator
  31. HWND m_hDriverWnd; // Window of test driver
  32. CSimpleApp(); // Constructor
  33. ~CSimpleApp(); // Destructor
  34. RECT nullRect;
  35. // IUnknown Interfaces
  36. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR* ppvObj);
  37. STDMETHODIMP_(ULONG) AddRef();
  38. STDMETHODIMP_(ULONG) Release();
  39. // Initialization methods
  40. BOOL fInitApplication (HANDLE hInstance);
  41. BOOL fInitInstance (HANDLE hInstance, int nCmdShow);
  42. // Message handling methods
  43. long lCommandHandler (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  44. long lSizeHandler (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  45. long lCreateDoc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  46. BOOL HandleAccelerators (LPMSG lpMsg);
  47. void PaintApp(HDC hDC);
  48. void DestroyDocs();
  49. // In-Place support functions
  50. void AddFrameLevelUI();
  51. void AddFrameLevelTools();
  52. void ContextSensitiveHelp (BOOL fEnterMode);
  53. LRESULT QueryNewPalette(void);
  54. };
  55. LRESULT wSelectPalette(HWND hWnd, HPALETTE hPal, BOOL fBackground);
  56. #endif