123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- // CurvePage.cpp : implementation file
- //
- #include "stdafx.h"
- #include "IDE.h"
- #include "CurveDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- extern void DrawColorButton(LPDRAWITEMSTRUCT lpDIS,COLORREF clrButton);
- /////////////////////////////////////////////////////////////////////////////
- // CCurveDlg dialog
- IMPLEMENT_DYNCREATE(CurvePage, CPropertyPage)
- CurvePage::CurvePage(): CPropertyPage(CurvePage::IDD)
- {
- //{{AFX_DATA_INIT(CurvePage)
- m_strVar1 = _T("");
- m_strVar2 = _T("");
- m_strVar3 = _T("");
- m_nLowwer = 0;
- m_nUpper = 0;
- //}}AFX_DATA_INIT
- }
- CurvePage::~CurvePage()
- {
- }
- void CurvePage::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CurvePage)
- DDX_Text(pDX, IDC_VAR1, m_strVar1);
- DDX_Text(pDX, IDC_VAR2, m_strVar2);
- DDX_Text(pDX, IDC_VAR3, m_strVar3);
- DDX_Text(pDX, IDC_LOWWER, m_nLowwer);
- DDX_Text(pDX, IDC_UPPER, m_nUpper);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CurvePage, CPropertyPage)
- //{{AFX_MSG_MAP(CurvePage)
- ON_WM_DRAWITEM()
- ON_BN_CLICKED(IDC_CURVE1COLOR, OnCurve1color)
- ON_BN_CLICKED(IDC_CURVE2COLOR, OnCurve2color)
- ON_BN_CLICKED(IDC_CURVE3COLOR, OnCurve3color)
- ON_BN_CLICKED(IDC_SELVAR1, OnSelvar1)
- ON_BN_CLICKED(IDC_SELVAR2, OnSelvar2)
- ON_BN_CLICKED(IDC_SELVAR3, OnSelvar3)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CurvePage message handlers
- void CurvePage::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
- {
- switch(nIDCtl)
- {
- case IDC_CURVE1COLOR:
- DrawColorButton(lpDrawItemStruct,m_clrCurve1);
- break;
- case IDC_CURVE2COLOR:
- DrawColorButton(lpDrawItemStruct,m_clrCurve2);
- break;
- case IDC_CURVE3COLOR:
- DrawColorButton(lpDrawItemStruct,m_clrCurve3);
- break;
- }
- CPropertyPage::OnDrawItem(nIDCtl, lpDrawItemStruct);
- }
- void CurvePage::OnCurve1color()
- {
- CColorDialog dlg(m_clrCurve1);
- if(dlg.DoModal()==IDOK)
- {
- m_clrCurve1 = dlg.GetColor();
- CButton* pButton = (CButton *)GetDlgItem(IDC_CURVE1COLOR);
- pButton->ShowWindow(SW_HIDE);
- pButton->ShowWindow(SW_SHOW);
- }
- }
- void CurvePage::OnCurve2color()
- {
- CColorDialog dlg(m_clrCurve2);
- if(dlg.DoModal()==IDOK)
- {
- m_clrCurve2 = dlg.GetColor();
- CButton* pButton = (CButton *)GetDlgItem(IDC_CURVE2COLOR);
- pButton->ShowWindow(SW_HIDE);
- pButton->ShowWindow(SW_SHOW);
- }
- }
- void CurvePage::OnCurve3color()
- {
- CColorDialog dlg(m_clrCurve3);
- if(dlg.DoModal()==IDOK)
- {
- m_clrCurve3 = dlg.GetColor();
- CButton* pButton = (CButton *)GetDlgItem(IDC_CURVE3COLOR);
- pButton->ShowWindow(SW_HIDE);
- pButton->ShowWindow(SW_SHOW);
- }
- }
- void CurvePage::OnSelvar1()
- {
- }
- void CurvePage::OnSelvar2()
- {
-
- }
- void CurvePage::OnSelvar3()
- {
-
- }
|