home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / VFORM.ZIP / Source / VCtlHelp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-10  |  2.0 KB  |  63 lines

  1. // -------------------------------------------------------------------------
  2. // Copyright @ 1997 TCK Software, Incorporated
  3. // All Rights Reserved
  4. // -------------------------------------------------------------------------
  5. #ifndef __VCtlHelp_H__
  6. #define __VCtlHelp_H__
  7.  
  8. #ifdef VF_STATIC
  9.     #undef AFX_EXT_CLASS
  10.     #define AFX_EXT_CLASS
  11. #endif
  12.  
  13. #define VHELPER_ID            300
  14. #define VHELPER_ADDFORTMPID    50
  15. #define VHELPER_EDIT        0
  16. #define VHELPER_MASK        1
  17. #define VHELPER_COMBO        2
  18. #define VHELPER_TCKEDIT        3
  19.  
  20. // -------------------------------------------------------------------------
  21. //    VCtlHelper is used to wrap a helper control which is then used by a VCtl
  22. //  to perform its job.
  23. //
  24. //  This class is needed to ensure appropriate destructors for helper windows
  25. //  get called.
  26. // -------------------------------------------------------------------------
  27. class AFX_EXT_CLASS VCtlHelper
  28. {
  29. protected:
  30.  
  31. public:
  32.     VCtlHelper() {};
  33.     virtual ~VCtlHelper() {};
  34.  
  35.     virtual int Id()=0;                    // Returns helper Id (index)
  36.     virtual void Hide()=0;                // Hide the helper control
  37.     virtual void Show(CRect rect)=0;    // Show the helper control
  38.     virtual CWnd* GetCWnd()=0;            // Return the controls CWnd pointer
  39. };
  40.  
  41. // -------------------------------------------------------------------------
  42. //  VSmallEdit helper control.
  43. // -------------------------------------------------------------------------
  44. class AFX_EXT_CLASS VSmallEditHelper : public VCtlHelper
  45. {
  46. protected:
  47.     CEdit    m_ctlEdit;                // Helper CEdit class
  48.  
  49. public:
  50.     VSmallEditHelper(CWnd *pParent);
  51.     virtual ~VSmallEditHelper() {};
  52.  
  53.     virtual    int  Id()        { return VHELPER_EDIT; }    // Helper Id (index)
  54.     static  int  HelperId()    { return VHELPER_EDIT; }    // Helper Id (index)
  55.     int        GetControlId()    { return VHELPER_ID + VHELPER_EDIT; }    // Control ID
  56.     virtual void Hide();
  57.     virtual void Show(CRect rect);
  58.     CEdit*    GetControl()    { return &m_ctlEdit; }        // The actual control
  59.     CWnd*    GetCWnd()        { return &m_ctlEdit; }        // The control
  60. };
  61.  
  62. #endif
  63.