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.6 KiB

  1. //-----------------------------------------------------------------------------
  2. // File: flexinfobox.h
  3. //
  4. // Desc: Implements a simple text box that displays a text string.
  5. // CFlexInfoBox is derived from CFlexWnd. It is used by the page
  6. // for displaying direction throughout the UI. The strings are
  7. // stored as resources. The class has a static buffer which will
  8. // be filled with the string by the resource API when needed.
  9. //
  10. // Copyright (C) 1999-2000 Microsoft Corporation. All Rights Reserved.
  11. //-----------------------------------------------------------------------------
  12. #ifndef __FLEXINFOBOX_H__
  13. #define __FLEXINFOBOX_H__
  14. class CFlexInfoBox : public CFlexWnd
  15. {
  16. TCHAR m_tszText[MAX_PATH]; // Text string of the message
  17. int m_iCurIndex; // Current text index
  18. COLORREF m_rgbText, m_rgbBk, m_rgbSelText, m_rgbSelBk, m_rgbFill, m_rgbLine;
  19. HFONT m_hFont;
  20. RECT m_TextRect;
  21. RECT m_TextWinRect;
  22. int m_nSBWidth;
  23. CFlexScrollBar m_VertSB;
  24. BOOL m_bVertSB;
  25. void SetVertSB(BOOL bSet);
  26. void SetVertSB();
  27. void SetSBValues();
  28. void SetRect();
  29. void InternalPaint(HDC hDC);
  30. RECT GetRect(const RECT &);
  31. RECT GetRect();
  32. protected:
  33. virtual LRESULT WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
  34. virtual void OnPaint(HDC hDC);
  35. virtual void OnWheel(POINT point, WPARAM wParam);
  36. public:
  37. CFlexInfoBox();
  38. virtual ~CFlexInfoBox();
  39. BOOL Create(HWND hParent, const RECT &rect, BOOL bVisible);
  40. void SetText(int iIndex);
  41. // cosmetics
  42. void SetFont(HFONT hFont);
  43. void SetColors(COLORREF text, COLORREF bk, COLORREF seltext, COLORREF selbk, COLORREF fill, COLORREF line);
  44. };
  45. #endif