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.

75 lines
2.1 KiB

  1. //**********************************************************************
  2. // File name: hlp_app.hxx
  3. //
  4. // Definition of CSimpleApp
  5. //
  6. // Copyright (c) 1992 - 1993 Microsoft Corporation. All rights reserved.
  7. //**********************************************************************
  8. #if !defined( _HLP_APP_HXX_)
  9. #define _HLP_APP_HXX_
  10. #include <ole2.h>
  11. class CSimpleDoc;
  12. //These two should be global vars
  13. extern HWND m_hAppWnd; // main window handle
  14. extern HINSTANCE m_hInst; // application instance
  15. class CSimpleApp : public IUnknown
  16. {
  17. public:
  18. int m_nCount; // reference count
  19. HMENU m_hMainMenu;
  20. HMENU m_hFileMenu;
  21. HMENU m_hEditMenu;
  22. HMENU m_hHelpMenu;
  23. HMENU m_hCascadeMenu;
  24. // COleInPlaceFrame m_OleInPlaceFrame; // IOleInPlaceFrame Implementation
  25. CSimpleDoc FAR * m_lpDoc; // pointer to document object
  26. BOOL m_fInitialized; // OLE initialization flag
  27. BOOL m_fCSHMode;
  28. BOOL m_fMenuMode;
  29. HWND m_hwndUIActiveObj; // HWND of UIActive Object
  30. HPALETTE m_hStdPal; // Color palette used by container
  31. BOOL m_fAppActive; // TRUE if app is active
  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