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.

56 lines
1.2 KiB

  1. // Copyright 1995-1997 Microsoft Corporation. All Rights Reserved.
  2. #if _MSC_VER > 1000
  3. #pragma once
  4. #endif
  5. #ifndef _POPUP_H_
  6. #define _POPUP_H_
  7. #include "htmlhelp.h"
  8. #include "fsclient.h"
  9. #include "cinput.h"
  10. /////////////////////////////////////////////////////////////////////
  11. //
  12. // Global Function Prototypes
  13. //
  14. HWND doDisplayTextPopup(HWND hwndMain, LPCSTR pszFile, HH_POPUP* pPopup);
  15. /////////////////////////////////////////////////////////////////////
  16. //
  17. // CPopupWindow
  18. //
  19. class CPopupWindow
  20. {
  21. public:
  22. CPopupWindow();
  23. ~CPopupWindow();
  24. HWND CreatePopupWindow(HWND hwndCaller, PCSTR pszFile, HH_POPUP* pPopup);
  25. void CleanUp(void);
  26. BOOL ReadTextFile(PCSTR pszFile);
  27. protected:
  28. HWND doPopupWindow(void);
  29. void CalculateRect(POINT pt); // assumes text in m_mem, result in m_rcWindow
  30. void SetColors(COLORREF clrForeground, COLORREF clrBackground);
  31. CFSClient* m_pfsclient;
  32. CInput* m_pin;
  33. RECT m_rcWindow;
  34. HWND m_hwndCaller;
  35. COLORREF m_clrForeground;
  36. COLORREF m_clrBackground;
  37. HWND m_hwnd;
  38. PSTR m_pszText;
  39. HFONT m_hfont;
  40. RECT m_rcMargin;
  41. CTable* m_ptblText;
  42. PCSTR m_pszTextFile;
  43. friend LRESULT CALLBACK PopupWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  44. };
  45. extern CPopupWindow* g_pPopupWindow;
  46. #endif // _POPUP_H_