home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 19.ddi / OWLINC.PAK / CHOOSECO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  1.8 KB  |  64 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1992, 1993 by Borland International
  3. //   include\owl\chooseco.h
  4. //   Definition of Choose Color Common Dialog class
  5. //----------------------------------------------------------------------------
  6. #if !defined(__OWL_CHOOSECO_H)
  7. #define __OWL_CHOOSECO_H
  8.  
  9. #if !defined(__COMMDIAL_H)
  10.   #include <owl\commdial.h>
  11. #endif
  12. #if !defined(__COLOR_H)
  13.   #include <owl\color.h>
  14. #endif
  15.  
  16. class _OWLCLASS TChooseColorDialog : public TCommonDialog {
  17.   public:
  18.     class _OWLCLASS TData {
  19.       public:
  20.         DWORD       Flags;
  21.         DWORD       Error;
  22.         TColor      Color;
  23.         TColor*     CustColors;
  24.     };
  25.  
  26.     TChooseColorDialog(TWindow*        parent,
  27.                        TData&          data,
  28.                        TResId          templateId = 0,
  29.                        const char far* title = 0,
  30.                        TModule*        module = 0);
  31.  
  32.     //
  33.     // Set the current RGB color in this dialog
  34.     //
  35.     void    SetRGBColor(TColor color) {SendMessage(SetRGBMsgId,0,color);}
  36.  
  37.   protected:
  38.     CHOOSECOLOR  cc;
  39.     TData&       Data;
  40.  
  41.     int     DoExecute();
  42.     BOOL    DialogFunction(UINT message, WPARAM, LPARAM);
  43.  
  44.     //
  45.     // Registered messages this class sends (to itself)
  46.     //
  47.     static UINT SetRGBMsgId;
  48.  
  49.     //
  50.     // Default behavior inline for message response functions
  51.     //
  52.     LPARAM  EvSetRGBColor(WPARAM, LPARAM)      // EV_REGISTERED(SETRGBSTRING,
  53.              {return DefaultProcessing();}
  54.     
  55.   private:
  56.     TChooseColorDialog(const TChooseColorDialog&);
  57.     TChooseColorDialog& operator=(const TChooseColorDialog&);
  58.  
  59.   DECLARE_RESPONSE_TABLE(TChooseColorDialog);
  60.   DECLARE_CASTABLE;
  61. };
  62.  
  63. #endif  // __OWL_CHOOSECO_H
  64.