home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / CHESS.PAK / COLORS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  1.1 KB  |  39 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1991, 1993 by Borland International
  3. //----------------------------------------------------------------------------
  4. #ifndef COLORS_H
  5. #define COLORS_H
  6.  
  7. #define CL_KILLFOCUS    (WM_USER + 101)
  8.  
  9. class TColorsDialog : public TDialog {
  10.   public:
  11.     TColorsDialog(TWindow* parent, const char* name);
  12.     ~TColorsDialog();
  13.  
  14.   protected:
  15.     void SetupWindow();
  16.     HBRUSH EvCtlColor(HDC hDC, HWND hWndChild, UINT ctlType);
  17.     void EvVScroll(UINT scrollCode, UINT thumbPos, HWND hWndCtl);
  18.     LRESULT EvCommand(UINT, HWND, UINT);
  19.     void EvDrawItem(UINT ctrlID, DRAWITEMSTRUCT far& drawInfo);
  20.  
  21.     void CmOk();
  22.     LRESULT EvKillFocus(WPARAM, LPARAM);
  23.  
  24.   private:
  25.     enum ScrollBarColors { Red, Green, Blue };
  26.     HBRUSH hWStatic, hBStatic, hSBBrush[3];
  27.     int RWID, GWID, BWID, RBID, GBID, BBID;
  28.     int WStatic, BStatic;
  29.     HWND BlackSq, WhiteSq;
  30.     BYTE WSqColors[3];
  31.     BYTE BSqColors[3];
  32.     void CLSetFocus(HWND);
  33.     BOOL GetColorValue(WORD);
  34.  
  35.   DECLARE_RESPONSE_TABLE(TColorsDialog);
  36. };
  37.  
  38. #endif  // COLORS_H
  39.