📄 dialogbarview.cpp
字号:
// DialogBarView.cpp : 实现文件
//
#include "stdafx.h"
#include "VisDraw.h"
//#include "VisDrawDoc.h"
#include "DialogBarView.h"
#include "MainFrm.h"
// CDialogBarView
extern CDialogBar m_wndDlgBar;
IMPLEMENT_DYNCREATE(CDialogBarView, CFormView)
CDialogBarView::CDialogBarView()
: CFormView(CDialogBarView::IDD)
, m_strCJGGB(_T("0000"))
, m_EditJGNR(_T(""))
, m_EditJGJD(_T("(0,0)"))
, m_strCC(_T(""))
, m_strTZ(_T(""))
{
}
CDialogBarView::~CDialogBarView()
{
}
void CDialogBarView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT12, m_strCJGGB);
DDX_Text(pDX, IDC_EDIT_NR, m_EditJGNR);
DDX_Text(pDX, IDC_EDIT_JD, m_EditJGJD);
DDX_Control(pDX, IDC_EDIT_CC, m_editCC);
DDX_Control(pDX, IDC_EDIT_TZ, m_editTZ);
DDX_Control(pDX, IDC_COMBO_FF, m_ComboFF);
DDX_Control(pDX, IDC_COMBO_YQ, m_ComboYQ);
DDX_Control(pDX, IDC_LIST_WZGB, m_ListWZGB);
DDX_Text(pDX, IDC_EDIT_CC, m_strCC);
DDX_Text(pDX, IDC_EDIT_TZ, m_strTZ);
DDX_Control(pDX, IDC_LIST_GBNEIRONG, m_GbNeirong);
}
BEGIN_MESSAGE_MAP(CDialogBarView, CFormView)
//ON_BN_CLICKED(IDC_BUTTON1, &CDialogBarView::OnBnClickedButton1)
// ON_BN_CLICKED(IDC_BUTTON_GBSC, &CDialogBarView::OnBnClickedButtonGbsc)
ON_BN_CLICKED(IDC_BUTTON_GBSC, &CDialogBarView::OnBnClickedButtonGbsc)
ON_CBN_SELCHANGE(IDC_COMBO_FF, &CDialogBarView::OnCbnSelchangeComboFf)
END_MESSAGE_MAP()
// CDialogBarView 诊断
#ifdef _DEBUG
void CDialogBarView::AssertValid() const
{
CFormView::AssertValid();
}
#ifndef _WIN32_WCE
void CDialogBarView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif
#endif //_DEBUG
// CDialogBarView 消息处理程序
void CDialogBarView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
// TODO: 在此添加专用代码和/或调用基类
m_strCJGGB="0000";
m_wndDlgBar.SetFocus();
//m_EditJGJD=_T("(0,0)");
m_wndDlgBar.SetDlgItemTextA(IDC_EDIT_JD,_T("(0,0)"));
}
BOOL CDialogBarView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: 在此添加专用代码和/或调用基类
return CFormView::PreCreateWindow(cs);
}
void CDialogBarView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
// CVisDrawDoc* pDoc = GetDocument();
m_strCJGGB="0002";
UpdateData(FALSE);
}
//void CDialogBarView::OnBnClickedButton1()
//{
// // TODO: 在此添加控件通知处理程序代码
//
//
//
//
//
//}
//void CDialogBarView::OnBnClickedButtonGbsc()
//{
// // TODO: 在此添加控件通知处理程序代码
//
//
//}
void CDialogBarView::OnBnClickedButtonGbsc()
{
// TODO: 在此添加控件通知处理程序代码
CVisDrawDoc* pDoc = GetDocument();
UpdateData();
CString str,str1;
CString str2=_T("");
CString str3=_T("");
// m_EditTZTQ.GetWindowTextA(str1);
//m_ComboTZTQ
int i=m_ComboFF.GetCurSel();
m_ComboFF.GetLBText(i,str);
int j=m_ComboYQ.GetCurSel();
m_ComboYQ.GetLBText(j,str1);
m_wndDlgBar.GetDlgItemTextA(IDC_EDIT_CC,str2);
m_strCC=str2;
m_wndDlgBar.GetDlgItemTextA(IDC_EDIT_TZ,str3);
m_strTZ=str3;
strwzgb=str+m_strTZ+str1+m_EditJGNR+m_EditJGJD+m_strCC;
m_wndDlgBar.SetDlgItemTextA(IDC_LIST_WZGB,strwzgb);
UpdateData(FALSE);
pDoc->UpdateAllViews(this);
pDoc->SetModifiedFlag();
}
void CDialogBarView::OnCbnSelchangeComboFf()
{
// TODO: 在此添加控件通知处理程序代码
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -