4 Star 0 Fork 2

leegoobin/AutoPHS

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
txsrpag3.cpp 4.12 KB
一键复制 编辑 原始数据 按行查看 历史
// TxsrPag3.cpp : implementation file
//
#include "stdafx.h"
#include "autophs.h"
#include "TxsrPag3.h"
#include "FrmTxsr.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTxsrPag3 dialog
CTxsrPag3::CTxsrPag3(CWnd* pParentWnd)
: CDialog(CTxsrPag3::IDD,pParentWnd)
{
//{{AFX_DATA_INIT(CTxsrPag3)
m_strDIlineDispX = "0";
m_strDIlineDispY = "0";
m_strDIlineDispZ = "0";
m_strDIFx = "0";
m_strDIFy = "0";
m_strDIFz = "0";
m_strDImX = "0";
m_strDImY = "0";
m_strDImZ = "0";
m_strDIRotDispX = "0";
m_strDIRotDispY = "0";
m_strDIRotDispZ = "0";
m_fDIlineDispX = 0.0f;
m_fDIlineDispY = 0.0f;
m_fDIlineDispZ = 0.0f;
m_fDIFx = 0.0f;
m_fDIFy = 0.0f;
m_fDIFz = 0.0f;
m_fDImX = 0.0f;
m_fDImY = 0.0f;
m_fDImZ = 0.0f;
m_fDIRotDispX = 0.0f;
m_fDIRotDispY = 0.0f;
m_fDIRotDispZ = 0.0f;
m_labDx = _T("");
m_labDy = _T("");
m_labDz = _T("");
m_labFx = _T("");
m_labFz = _T("");
m_labMx = _T("");
m_labMy = _T("");
m_labMz = _T("");
m_labFy = _T("");
//}}AFX_DATA_INIT
}
void CTxsrPag3::DoDataExchange(CDataExchange* pDX)
{
//目的:FrmTxsr.m_pViewTxsr->m_bIsUpd=true 防止输入框为空时多次执行 FrmTxsr.m_pViewTxsr->OnActive() 而进入本循环体,产生致命错误
FrmTxsr.m_pViewTxsr->m_bIsUpd=true;
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTxsrPag3)
DDX_Text(pDX, IDC_EDIT1, m_strDIlineDispX);
DDX_Text(pDX, IDC_EDIT10, m_strDIlineDispY);
DDX_Text(pDX, IDC_EDIT2, m_strDIlineDispZ);
DDX_Text(pDX, IDC_EDITF3, m_strDIFx);
DDX_Text(pDX, IDC_EDITF13, m_strDIFy);
DDX_Text(pDX, IDC_EDITF4, m_strDIFz);
DDX_Text(pDX, IDC_EDIT5, m_strDImX);
DDX_Text(pDX, IDC_EDIT6, m_strDImY);
DDX_Text(pDX, IDC_EDIT7, m_strDImZ);
DDX_Text(pDX, IDC_EDIT8, m_strDIRotDispX);
DDX_Text(pDX, IDC_EDIT9, m_strDIRotDispY);
DDX_Text(pDX, IDC_EDIT12, m_strDIRotDispZ);
DDX_Text(pDX, IDC_LABEL_DXR, m_labDx);
DDX_Text(pDX, IDC_LABEL_DYR, m_labDy);
DDX_Text(pDX, IDC_LABEL_DZR, m_labDz);
DDX_Text(pDX, IDC_LABEL_FXR, m_labFx);
DDX_Text(pDX, IDC_LABEL_FZR, m_labFz);
DDX_Text(pDX, IDC_LABEL_MXR, m_labMx);
DDX_Text(pDX, IDC_LABEL_MYR, m_labMy);
DDX_Text(pDX, IDC_LABEL_MZR, m_labMz);
DDX_Text(pDX, IDC_LABEL_FYR, m_labFy);
//}}AFX_DATA_MAP
//目的:FrmTxsr.m_pViewTxsr->m_bIsUpd=false 防止输入框为空时多次执行 FrmTxsr.m_pViewTxsr->OnActive() 而进入本循环体,产生致命错误
FrmTxsr.m_pViewTxsr->m_bIsUpd=false;
}
BEGIN_MESSAGE_MAP(CTxsrPag3, CDialog)
//{{AFX_MSG_MAP(CTxsrPag3)
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTxsrPag3 message handlers
HBRUSH CTxsrPag3::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
// TODO: Return a different brush if the default is not desired
//return hbr;
/*static CBrush br;
LOGBRUSH logbr;
logbr.lbStyle=BS_SOLID;
if(nCtlColor==CTLCOLOR_DLG || nCtlColor==CTLCOLOR_STATIC)
{
logbr.lbColor=0x00FFFF00;
pDC->SetBkColor(0x00FFFF00);
logbr.lbStyle=BS_SOLID;
}
else
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
br.DeleteObject();
br.CreateBrushIndirect(&logbr);
return (HBRUSH)br;*/
return hbr;
}
LRESULT CTxsrPag3::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
/*if(message==WM_COMMAND && (wParam==2 || wParam==1))
{
return TRUE;
}*/
return CDialog::WindowProc(message, wParam, lParam);
}
void CTxsrPag3::OnCancel()
{
// TODO: Add extra cleanup here
//CDialog::OnCancel();
}
void CTxsrPag3::OnOK()
{
// TODO: Add extra validation here
//CDialog::OnOK();
}
BOOL CTxsrPag3::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
BOOL bRet;
CWnd *pParent=NULL;
pParent=GetParent();
bRet=CDialog::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
if(!bRet)
{
if(pParent)
{
return pParent->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
}
return bRet;
}
BOOL CTxsrPag3::OnInitDialog()
{
UpdateData( FALSE );
return CDialog::OnInitDialog();
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/uesoft/AutoPHS.git
git@gitee.com:uesoft/AutoPHS.git
uesoft
AutoPHS
AutoPHS
CAE

搜索帮助