⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 autoteachkey.cpp

📁 机械手IPC控制器伺服运动程序
💻 CPP
字号:
// AutoTeachKey.cpp : implementation file
//

#include "stdafx.h"
#include "alfa.h"
#include "AutoTeachKey.h"
//#include "Main.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAutoTeachKey dialog


CAutoTeachKey::CAutoTeachKey(CWnd* pParent /*=NULL*/)
	: CDialog(CAutoTeachKey::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAutoTeachKey)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CAutoTeachKey::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAutoTeachKey)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAutoTeachKey, CDialog)
	//{{AFX_MSG_MAP(CAutoTeachKey)
//	ON_WM_SHOWWINDOW()
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
	ON_BN_CLICKED(IDC_BUTTON5, OnButton5)
	ON_BN_CLICKED(IDC_BUTTON6, OnButton6)
	ON_BN_CLICKED(IDC_BUTTON7, OnButton7)
	ON_BN_CLICKED(IDC_BUTTON8, OnButton8)
	ON_BN_CLICKED(IDC_BUTTON9, OnButton9)
	ON_BN_CLICKED(IDC_BUTTON10, OnButton0)
	ON_BN_CLICKED(IDC_BUTTON11, OnButtonBack)
	ON_BN_CLICKED(IDC_BUTTON12, OnButtonDot)
	ON_BN_CLICKED(IDC_BUTTON13, OnButtonCLR)
	ON_BN_CLICKED(IDC_BUTTON14, OnButtonExit)
	ON_BN_CLICKED(IDC_BUTTONM, OnButtonm)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAutoTeachKey message handlers

BOOL CAutoTeachKey::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	h_SkinDialog.SubClassDialog(m_hWnd);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

/*
void CAutoTeachKey::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	
	// TODO: Add your message handler code here
//	if(bShow==FALSE) return;
    CMain * main=(CMain *)GetParent();
    main->dlgautoteach->GetDlgItem(IDC_EDIT2)->EnableWindow(FALSE);
    main->dlgautoteach->GetDlgItem(IDC_EDIT3)->EnableWindow(FALSE);
    main->dlgautoteach->GetDlgItem(IDC_EDIT4)->EnableWindow(FALSE);
    main->dlgautoteach->GetDlgItem(IDC_EDIT5)->EnableWindow(FALSE);
    main->dlgautoteach->GetDlgItem(IDC_EDIT6)->EnableWindow(FALSE);
    main->dlgautoteach->GetDlgItem(IDC_EDIT10)->EnableWindow(FALSE);
    main->dlgautoteach->GetDlgItem(IDC_EDIT11)->EnableWindow(FALSE);
	//CDialog::OnShowWindow(bShow, nStatus);

}

*/




void CAutoTeachKey::OnButton1() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"1");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton2() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"2");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton3() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"3");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton4() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"4");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton5() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"5");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton6() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"6");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton7() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"7");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton8() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"8");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton9() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"9");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButton0() 
{
	// TODO: Add your control notification handler code here
	num.Insert(num.GetLength(),"0");
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButtonBack() 
{
	// TODO: Add your control notification handler code here
	if(num.GetLength()>0){
		num.Delete(num.GetLength()-1);
	    edt->SetWindowText(num);
	}
}

void CAutoTeachKey::OnButtonDot() 
{
	// TODO: Add your control notification handler code here
	if(num.GetLength()>0)
	{
		num.Insert(num.GetLength(),".");
	    edt->SetWindowText(num);
	}
}

void CAutoTeachKey::OnButtonm() 
{
	// TODO: Add your control notification handler code here
	if(num.GetLength()==0) {
	    num.Insert(num.GetLength(),"-");
	    edt->SetWindowText(num);
	}
}

void CAutoTeachKey::OnButtonCLR() 
{
	// TODO: Add your control notification handler code here
	num="";
	edt->SetWindowText(num);
}

void CAutoTeachKey::OnButtonExit() 
{
	// TODO: Add your control notification handler code here

	ShowWindow(FALSE);
/*
    CMain * main=(CMain *)GetParent();
    main->dlgautoteach->GetDlgItem(IDC_EDIT2)->EnableWindow();
    main->dlgautoteach->GetDlgItem(IDC_EDIT3)->EnableWindow();
    main->dlgautoteach->GetDlgItem(IDC_EDIT4)->EnableWindow();
    main->dlgautoteach->GetDlgItem(IDC_EDIT5)->EnableWindow();
    main->dlgautoteach->GetDlgItem(IDC_EDIT6)->EnableWindow();
    main->dlgautoteach->GetDlgItem(IDC_EDIT10)->EnableWindow();
    main->dlgautoteach->GetDlgItem(IDC_EDIT11)->EnableWindow();
	*/
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -