📄 filterdialog.cpp
字号:
// FilterDialog.cpp : implementation file
//
#include "stdafx.h"
#include "bmpDemo.h"
#include "FilterDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// FilterDialog dialog
FilterDialog::FilterDialog(CWnd* pParent /*=NULL*/)
: CDialog(FilterDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(FilterDialog)
m_min = 0;
m_max = 0;
flag=0;
//}}AFX_DATA_INIT
}
void FilterDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(FilterDialog)
// DDX_Control(pDX, IDC_CHECK1, m_aaa);
DDX_Text(pDX, IDC_EDIT1, m_min);
DDV_MinMaxInt(pDX, m_min, 0, 2000);
DDX_Text(pDX, IDC_EDIT2, m_max);
DDV_MinMaxInt(pDX, m_max, 0, 2000);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(FilterDialog, CDialog)
//{{AFX_MSG_MAP(FilterDialog)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// FilterDialog message handlers
void FilterDialog::SetFlag(int value)
{
flag=value;
}
void FilterDialog::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
if(flag==1)
{
GetDlgItem(IDC_EDIT1)->EnableWindow(FALSE);
CWnd *pwnd=GetDlgItem(IDC_EDIT2);
GotoDlgCtrl(pwnd);
}
else if(flag==2)
{
GetDlgItem(IDC_EDIT2)->EnableWindow(FALSE);
CWnd *pwnd=GetDlgItem(IDC_EDIT1);
GotoDlgCtrl(pwnd);
}
else
{
CWnd *pwnd=GetDlgItem(IDC_EDIT1);
GotoDlgCtrl(pwnd);
}
// Do not call CDialog::OnPaint() for painting messages
}
void FilterDialog::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -