⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlglinewidth.cpp

📁 用vc编写的简单的画图程序
💻 CPP
字号:
// DlgLinewidth.cpp : implementation file
//

#include "stdafx.h"
#include "DrawTest.h"
#include "DlgLinewidth.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgLinewidth dialog


CDlgLinewidth::CDlgLinewidth(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgLinewidth::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgLinewidth)
	m_lineWidth = 0;
	//}}AFX_DATA_INIT
}


void CDlgLinewidth::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgLinewidth)
	DDX_Slider(pDX, IDC_SLIDER_WIDTH, m_lineWidth);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgLinewidth, CDialog)
	//{{AFX_MSG_MAP(CDlgLinewidth)
	ON_NOTIFY(NM_RELEASEDCAPTURE, IDC_SLIDER_WIDTH, OnReleasedcaptureSliderWidth)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgLinewidth message handlers

void CDlgLinewidth::OnReleasedcaptureSliderWidth(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here
	CString str;
	UpdateData();
	str.Format("%d",m_lineWidth);
	((CEdit*)GetDlgItem(IDC_EDIT_LINEWIDTH))->SetWindowText(str);
	*pResult = 0;
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -