home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Game Programming for Teens / VBGPFT.cdr / DirectX8 / dx8a_sdk.exe / samples / multimedia / directinput / diconfig / flexinfobox.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-22  |  1.3 KB  |  43 lines

  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.  
  13. #ifndef __FLEXINFOBOX_H__
  14. #define __FLEXINFOBOX_H__
  15.  
  16. class CFlexInfoBox : public CFlexWnd
  17. {
  18.     TCHAR m_tszText[MAX_PATH];  // Text string of the message
  19.     int m_iCurIndex;  // Current text index
  20.     COLORREF m_rgbText, m_rgbBk, m_rgbSelText, m_rgbSelBk, m_rgbFill, m_rgbLine;
  21.     HFONT m_hFont;
  22.  
  23.     void SetRect();
  24.     void InternalPaint(HDC hDC);
  25.  
  26.     RECT GetRect(const RECT &);
  27.     RECT GetRect();
  28.  
  29. public:
  30.     CFlexInfoBox();
  31.     virtual ~CFlexInfoBox();
  32.  
  33.     void SetText(int iIndex);
  34.  
  35.     // cosmetics
  36.     void SetFont(HFONT hFont);
  37.     void SetColors(COLORREF text, COLORREF bk, COLORREF seltext, COLORREF selbk, COLORREF fill, COLORREF line);
  38.  
  39.     virtual void OnPaint(HDC hDC);
  40. };
  41.  
  42. #endif
  43.