home *** CD-ROM | disk | FTP | other *** search
- // -------------------------------------------------------------------------
- // Copyright @ 1997 TCK Software, Incorporated
- // All Rights Reserved
- // -------------------------------------------------------------------------
- #ifndef __TESTVF_H__
- #define __TESTVF_H__
-
- #include "vForm.h"
-
- #include "VCtl2.h"
- #include "VBitmap.h"
- #include "PalHook.h"
-
- #define IDVC_LBLSROW 201
- #define IDVC_TESTVAL 202
- #define IDVC_OPTION 203
- #define IDVC_LBLROW 204
- #define IDVC_BTN1 205
- #define IDVC_CHECK1 206
- #define IDVC_PICTBTN1 207
- #define IDVC_PICTCYCLE1 208
- #define IDVC_ANIM1 209
-
- #define IDVC_HDREDIT 240
- #define IDVC_BG_OPTION 241
- #define IDVC_SET_BMP 242
- #define IDVC_CHK_SELECTORS 245
- #define IDVC_FTREDIT 250
-
- class CTestVF;
-
- // -------------------------------------------------------------------------
- // CTestHdr Class
- // -------------------------------------------------------------------------
- class CTestHdr : public VHeader
- {
- public:
- CTestHdr();
- virtual ~CTestHdr() {};
-
- public:
- int m_nBackStyle;
- VCheckBox m_chkSelectors;
- VStatic m_lblBackGround;
- VDropDown m_lstBgOption;
- VEdit m_hdrEdit;
- VButton m_btnSetBmp;
- };
-
- // -------------------------------------------------------------------------
- // CTestFtr Class
- // -------------------------------------------------------------------------
- class CTestFtr : public VHeader
- {
- public:
- CTestFtr();
- virtual ~CTestFtr() {};
-
- public:
- VStatic m_lblGoodbye;
- VEdit m_ftrEdit;
- };
-
-
- // -------------------------------------------------------------------------
- // CTestRow Class
- // -------------------------------------------------------------------------
- class CTestRow : public VRow
- {
- public:
- CTestRow(CTestVF* pForm);
- virtual ~CTestRow();
-
- int SRowId() { return m_nSRowId; }
- void SRowId(int x) { m_nSRowId = x; }
-
- void SetBG(int nBackStyle);
- virtual HBITMAP GetBackBmp();
- virtual HPALETTE GetBackPaletteHandle();
-
- public:
- int m_nBackStyle;
- VStatic m_lblSRow;
- VEdit m_testval;
- VDropDown m_lstOption;
- // VComboBox m_lstOption;
- VStatic m_lblRow;
- VButton m_btn1;
- VCheckBox m_check1;
- VPicture m_anim1;
- VPictButton m_pictBtn1;
- VPictCycle m_pictCycle1;
-
- int m_nSRowId;
- };
-
-
- // -------------------------------------------------------------------------
- // CTestData Class
- // -------------------------------------------------------------------------
- class CTestData
- {
- public:
- CTestData() { m_bCheck = FALSE; m_nCycleOpt = 0; }
-
- public:
- CString m_name;
- BOOL m_bCheck;
- CString m_option;
- int m_nCycleOpt;
- };
-
-
-
- // -------------------------------------------------------------------------
- // CTestVF Class
- // -------------------------------------------------------------------------
- class CTestVF : public VForm
- {
- public:
- CTestData m_data[500]; // Array of test data
- CPalMsgHandler* m_pPalMH;
- protected:
- int m_nSRows; // Number of screen rows created
- CImageList m_imgList; // Image list for picture control
- CImageList m_imgCycleList; // Image list for picture control
- CImageList m_imgPrintAnim; // Image list for printer animation
- int m_nBackIdx; // Background Type
- VBitmap m_bmpBack; // BMP class
- UINT m_nTimerId; // Animation Timer
-
- public:
- CTestVF(); // Constructor
- virtual ~CTestVF(); // Destructor
-
- CImageList* GetTestImgList() { return &m_imgList; }
- CImageList* GetCycleImgList() { return &m_imgCycleList; }
- CImageList* GetPrintAnimImg() { return &m_imgPrintAnim; }
- VBitmap* GetBmp() { return &m_bmpBack; }
- HBITMAP GetBackBmp() { return m_bmpBack; }
- HPALETTE GetBackPalette() { return m_bmpBack.GetPaletteHandle(); }
- CPalette* GetPalette() { return m_bmpBack.GetPalette(); }
-
- BOOL SetBackBmp(LPCTSTR szFile); // Set the background BMP
- void SetPalMH(CPalMsgHandler *pPalMH) { m_pPalMH = pPalMH; }
-
- // DECLARE_DYNCREATE(CTestVF)
-
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CTestVF)
- public:
- protected:
- //}}AFX_VIRTUAL
-
- protected:
- virtual VRow* InitRow();
-
- // --- the following functions deal with the Data ---
- virtual BOOL OnGetRow(VRow *pRow); // Puts row to screen
- virtual BOOL OnSaveRow(VRow *pRow); // Save row from screen
- virtual BOOL OnAddRow(VRow *pRow); // Add a data row
- virtual BOOL OnDelete(); // Delete row(s)
- virtual void OnStartAdd(VRow *pRow); // Start of Add: Defaults
-
- virtual void OnClick(VRow *pRow, int nId);
- virtual BOOL OnEndList(VCtl* pCtl, CListBox* pLB);
-
- // Generated message map functions
- protected:
- //{{AFX_MSG(CTestVF)
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
- };
-
- #endif
-