Files
envi-code/SourceCode/Code2026/tg_shs/shs_TwtKernal/DimSettingDlg.cpp
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

80 lines
1.5 KiB
C++

#include "stdafx.h"
#include "DimSettingDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CDimSettingDlg::CDimSettingDlg(CWnd* pParent /*=NULL*/)
: CDialog(CDimSettingDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CDimSettingDlg)
m_nLabelType = 0;
m_nLenType = 0;
m_nGradientType = 0;
m_nDnType = 0;
m_nDrawType = 0;
//}}AFX_DATA_INIT
}
void CDimSettingDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDimSettingDlg)
DDX_CBIndex(pDX, IDC_COMBO_DIM_LABEL, m_nLabelType);
DDX_CBIndex(pDX, IDC_COMBO_DIM_LEN, m_nLenType);
DDX_CBIndex(pDX, IDC_COMBO_DIMGRADIENT, m_nGradientType);
DDX_CBIndex(pDX, IDC_COMBO_DN, m_nDnType);
DDX_Radio(pDX, IDC_RADIO_DRAW1, m_nDrawType);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDimSettingDlg, CDialog)
//{{AFX_MSG_MAP(CDimSettingDlg)
ON_BN_CLICKED(IDC_RADIO_DRAW1, OnRadioDraw)
ON_BN_CLICKED(IDC_RADIO_DRAW2, OnRadioDraw2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CDimSettingDlg::OnRadioDraw()
{
SetDrawable();
}
void CDimSettingDlg::OnRadioDraw2()
{
SetDrawable();
}
void CDimSettingDlg::SetDrawable()
{
CWnd *pWnd1 = GetDlgItem(IDC_COMBO_DIM_LABEL);
if (pWnd1 == NULL)
{
return;
}
UpdateData(TRUE);
if (m_nDrawType == 0)
{
pWnd1->EnableWindow(TRUE);
}
else
{
pWnd1->EnableWindow(FALSE);
}
}
BOOL CDimSettingDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetDrawable();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}