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

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows - (C) Copyright 1991, 1993 by Borland International
  3. //   include\owl\button.h
  4. //   Defines class TButton.  This defines the basic behavior
  5. //   of all buttons.
  6. //----------------------------------------------------------------------------
  7. #if !defined(__OWL_BUTTON_H)
  8. #define __OWL_BUTTON_H
  9.  
  10. #if !defined(__OWL_CONTROL_H)
  11.   #include <owl\control.h>
  12. #endif
  13.  
  14. //
  15. //  class TButton
  16. //  ----- -------
  17. //
  18. class _OWLCLASS TButton : public TControl {
  19.   public:
  20.     BOOL  IsDefPB;
  21.  
  22.     TButton(TWindow*        parent,
  23.             int             id,
  24.             const char far* text,
  25.             int X, int Y, int W, int H,
  26.             BOOL            isDefault = FALSE,
  27.             TModule*        module = 0);
  28.  
  29.     TButton(TWindow *parent, int resourceId, TModule* module = 0);
  30.  
  31.   protected:
  32.     BOOL  IsCurrentDefPB;
  33.  
  34.     //
  35.     // message response functions
  36.     //
  37.     UINT      EvGetDlgCode(MSG far*);
  38.     LRESULT   BMSetStyle(WPARAM, LPARAM);
  39.  
  40.     //
  41.     // Override TWindow member functions
  42.     //
  43.     char far* GetClassName();
  44.     void      SetupWindow();
  45.  
  46.   private:
  47.     //
  48.     // hidden to prevent accidental copying or assignment
  49.     //
  50.     TButton(const TButton&);
  51.     TButton& operator=(const TButton&);
  52.  
  53.   DECLARE_RESPONSE_TABLE(TButton);
  54.   DECLARE_STREAMABLE(_OWLCLASS, TButton, 1);
  55. };
  56.  
  57. //
  58. // button notification response table entry macros, methods are: void method()
  59. //
  60. // EV_BN_CLICKED(id, method)
  61. // EV_BN_DISABLE(id, method)
  62. // EV_BN_DOUBLECLICKED(id, method)
  63. // EV_BN_HILITE(id, method)
  64. // EV_BN_PAINT(id, method)
  65. // EV_BN_UNHILITE(id, method)
  66.  
  67. #endif  // __OWL_BUTTON_H
  68.