home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectInput / DIConfig / flexmsgbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  1.2 KB  |  47 lines

  1. //-----------------------------------------------------------------------------
  2. // File: flexMsgBox.h
  3. //
  4. // Desc: Implements a message box control similar to Windows message box
  5. //       without the button.  CFlexMsgBox is derived from CFlexWnd.
  6. //
  7. // Copyright (C) 1999-2001 Microsoft Corporation. All Rights Reserved.
  8. //-----------------------------------------------------------------------------
  9.  
  10. #ifndef __FLEXMsgBox_H__
  11. #define __FLEXMsgBox_H__
  12.  
  13. class CFlexMsgBox : public CFlexWnd
  14. {
  15.     LPTSTR m_tszText;  // Text string of the message
  16.     COLORREF m_rgbText, m_rgbBk, m_rgbSelText, m_rgbSelBk, m_rgbFill, m_rgbLine;
  17.     HFONT m_hFont;
  18.     BOOL m_bSent;
  19.  
  20.     HWND m_hWndNotify;
  21.  
  22.     void SetRect();
  23.     void InternalPaint(HDC hDC);
  24.  
  25.     RECT GetRect(const RECT &);
  26.     RECT GetRect();
  27.  
  28.     void Notify(int code);
  29.  
  30. public:
  31.     CFlexMsgBox();
  32.     virtual ~CFlexMsgBox();
  33.  
  34.     HWND Create(HWND hParent, const RECT &rect, BOOL bVisible);
  35.  
  36.     void SetNotify(HWND hWnd) { m_hWndNotify = hWnd; }
  37.     void SetText(LPCTSTR tszText);
  38.  
  39.     // cosmetics
  40.     void SetFont(HFONT hFont);
  41.     void SetColors(COLORREF text, COLORREF bk, COLORREF seltext, COLORREF selbk, COLORREF fill, COLORREF line);
  42.  
  43.     virtual void OnPaint(HDC hDC);
  44. };
  45.  
  46. #endif
  47.