sysparamsel.cpp

来自「机械手IPC控制器伺服运动程序」· C++ 代码 · 共 93 行

CPP
93
字号
// SysParamSel.cpp : implementation file
//

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

/////////////////////////////////////////////////////////////////////////////
// CSysParamSel dialog


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


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


BEGIN_MESSAGE_MAP(CSysParamSel, CDialog)
	//{{AFX_MSG_MAP(CSysParamSel)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_WM_SHOWWINDOW()
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSysParamSel message handlers

BOOL CSysParamSel::OnInitDialog() 
{
	CDialog::OnInitDialog();
	h_SkinDialog.SubClassDialog(m_hWnd);
	// TODO: Add extra initialization here
	((CButton *)GetDlgItem(IDC_RADIO1))->SetCheck(1);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CSysParamSel::OnButton1() 
{
	// TODO: Add your control notification handler code here
	CMain * main=(CMain *)GetParent();
	ShowWindow(FALSE);
	if(((CButton *)GetDlgItem(IDC_RADIO1))->GetCheck())
		main->dlgmac->ShowWindow(TRUE);
	else if(((CButton *)GetDlgItem(IDC_RADIO2))->GetCheck())
		main->dlghomeconfig->ShowWindow(TRUE);
	else if(((CButton *)GetDlgItem(IDC_RADIO3))->GetCheck())
		main->dlgmotion->ShowWindow(TRUE);
	else if(((CButton *)GetDlgItem(IDC_RADIO4))->GetCheck())
		main->dlgencoder->ShowWindow(TRUE);
	else
		main->dlgcard->ShowWindow(TRUE);
}

void CSysParamSel::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
	// TODO: Add your message handler code here
	if(bShow==1)
	{
		CMain * main=(CMain *)GetParent();
		main->dlgcur=this;
	}
}

void CSysParamSel::OnButton2() 
{
	// TODO: Add your control notification handler code here
	CMain * main=(CMain *)GetParent();
	ShowWindow(FALSE);
	main->dlgsystem->ShowWindow(TRUE);
}

⌨️ 快捷键说明

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