📄 linestyledlg.cpp
字号:
// LineStyleDlg.cpp : implementation file
//
#include "stdafx.h"
#include "2dcad.h"
#include "LineStyleDlg.h"
#include "MainFrm.h"
#include "2DCADDoc.h"
#include "2DCADView.h"
#include "string.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLineStyleDlg dialog
CLineStyleDlg::CLineStyleDlg(CWnd* pParent /*=NULL*/)
: CDialog(CLineStyleDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CLineStyleDlg)
m_strLineStyle = _T("");
//}}AFX_DATA_INIT
}
BOOL CLineStyleDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_ComboLineStyle.SetCurSel (0);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CLineStyleDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLineStyleDlg)
DDX_Control(pDX, IDC_COMBOLINESTYLE, m_ComboLineStyle);
DDX_CBString(pDX, IDC_COMBOLINESTYLE, m_strLineStyle);
DDV_MaxChars(pDX, m_strLineStyle, 6);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CLineStyleDlg, CDialog)
//{{AFX_MSG_MAP(CLineStyleDlg)
ON_CBN_SELCHANGE(IDC_COMBOLINESTYLE, OnSelchangeCombolinestyle)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLineStyleDlg message handlers
void CLineStyleDlg::OnSelchangeCombolinestyle()
{
// TODO: Add your control notification handler code here
int linestyle;
//GetDlgItem(IDC_COMBO
UpdateData();
if(strcmp(m_strLineStyle,"点线")==0)
linestyle = PS_DOT;
else if(strcmp(m_strLineStyle,"虚线")==0)
linestyle = PS_DASH;
else if(strcmp(m_strLineStyle,"点划线")==0)
linestyle = PS_DASHDOT;
else linestyle = PS_SOLID;
CMainFrame * pframe = (CMainFrame *)GetParent();
CMy2DCADView * pview = (CMy2DCADView *)pframe->GetActiveView ();
pview->m_nLineStyle = linestyle;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -