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

📄 dialog3.cpp

📁 1.通过鼠标拖拽和弹出对话框完成实体、属性、联系的绘制以及各参数设定 2.对绘制的实体、属性、联系提供合法性检查 3.对绘制的图形进行拖动、重设大小、删除 4.通过属性对话框对实体、属性、联系的
💻 CPP
字号:
// Dialog3.cpp : implementation file
//

#include "stdafx.h"
#include "database.h"
#include "Dialog3.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDialog3 dialog


CDialog3::CDialog3(CWnd* pParent /*=NULL*/)
	: CDialog(CDialog3::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDialog3)
	m_relationname = _T("");
	m_entity1name = _T("");
	m_entity2name = _T("");
	//}}AFX_DATA_INIT
	m_relationtype=1;
	father=NULL;
}


void CDialog3::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialog3)
	DDX_Control(pDX, IDC_COMBO2, m_com2);
	DDX_Control(pDX, IDC_COMBO1, m_com1);
	DDX_Text(pDX, IDC_EDIT1, m_relationname);
	DDX_CBString(pDX, IDC_COMBO1, m_entity1name);
	DDX_CBString(pDX, IDC_COMBO2, m_entity2name);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDialog3, CDialog)
	//{{AFX_MSG_MAP(CDialog3)
	ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
	ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
	ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
	ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialog3 message handlers

void CDialog3::OnRadio1() 
{
	// TODO: Add your control notification handler code here
	m_relationtype=1;
	
}

void CDialog3::OnRadio2() 
{
	// TODO: Add your control notification handler code here
	m_relationtype=2;
	
}

void CDialog3::OnRadio3() 
{
	// TODO: Add your control notification handler code here
	m_relationtype=3;
	
}

void CDialog3::OnRadio4() 
{
	// TODO: Add your control notification handler code here
	m_relationtype=4;
	
}

BOOL CDialog3::OnInitDialog() 
{
	CDialog::OnInitDialog();
	CDialog::OnInitDialog();
	if(m_relationtype==1)
	{
          CWnd* a2=this->GetDlgItem(IDC_RADIO1);
	      CButton* b1=(CButton*)a2;
          b1->SetCheck(true);
	}
	else if(m_relationtype==2)
	{
          CWnd* a=this->GetDlgItem(IDC_RADIO2);
	      CButton* a1=(CButton*)a;
          a1->SetCheck(true);
	}
	else if(m_relationtype==3)
	{
          CWnd* a=this->GetDlgItem(IDC_RADIO3);
	      CButton* a1=(CButton*)a;
          a1->SetCheck(true);
	}
	else if(m_relationtype==4)
	{
          CWnd* a=this->GetDlgItem(IDC_RADIO4);
	      CButton* a1=(CButton*)a;
          a1->SetCheck(true);
	}
	while(father!=NULL)
	{
		if(father->type==1)
		{
			m_com1.AddString(father->name);
			m_com2.AddString(father->name);
		}
		father=father->nextelement;
	}
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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