【VC开源代码栏目提醒】:以下是网学会员为您推荐的VC开源代码-ConvoluteDlg.cpp,希望本篇文章对您学习有所帮助。
// ConvoluteDlg.cpp : implementation file
//
#include "stdafx.h"
#include "imageCAM.h"
#include "ConvoluteDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConvoluteDlg dialog
CConvoluteDlg::CConvoluteDlg(int nMin, int nMax, int nDef,CWnd* pParent /*=NULL*/)
: CDialog(CConvoluteDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CConvoluteDlg)
m_strValue = _T("");
m_nStreng = nDef;
//}}AFX_DATA_INIT
m_nMax = nMax;
m_nMin = nMin;
}
void CConvoluteDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConvoluteDlg)
DDX_Control(pDX, IDC_SLIDER1, m_Streng);
DDX_Slider(pDX, IDC_SLIDER1, m_nStreng);
DDX_Text(pDX, IDC_VALUE, m_strValue);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConvoluteDlg, CDialog)
//{{AFX_MSG_MAP(CConvoluteDlg)
ON_WM_HSCROLL()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConvoluteDlg message handlers
void CConvoluteDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: Add your message handler code here and/or call default
UpdateData();
m_strValue.Format("%d", m_nStreng);
UpdateData(FALSE);
CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
}
BOOL CConvoluteDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_Streng.SetRange(m_nMin, m_nMax, TRUE);
m_strValue.Format("%d", m_nStreng);
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}