?? 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 + -