PenDlg.cpp
资源名称:VC6.0.rar [点击查看]
上传用户:qdhmjx
上传日期:2022-07-11
资源大小:2226k
文件大小:1k
源码类别:
书籍源码
开发平台:
Visual C++
- // PenDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ex71.h"
- #include "PenDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CPenDlg dialog
- CPenDlg::CPenDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CPenDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CPenDlg)
- m_nWidthEdit = 0;
- //}}AFX_DATA_INIT
- }
- void CPenDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CPenDlg)
- DDX_Control(pDX, IDC_SPIN, m_ctrlSpin);
- DDX_Control(pDX, IDC_Width, m_ctrlWidthEdit);
- DDX_Text(pDX, IDC_Width, m_nWidthEdit);
- DDV_MinMaxInt(pDX, m_nWidthEdit, 1, 10);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CPenDlg, CDialog)
- //{{AFX_MSG_MAP(CPenDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CPenDlg message handlers
- BOOL CPenDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- m_ctrlSpin.SetBuddy(&m_ctrlWidthEdit); //将编辑框设置为微调控件的伙伴窗口。
- m_ctrlSpin.SetRange(1,10);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }