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

📄 dispmarking.cpp

📁 超声影像工作站系统可与各种型号的B超、彩超连接
💻 CPP
字号:
// DispMarking.cpp : implementation file
// 

#include "stdafx.h"
#include "bxt.h"
#include "DispMarking.h"
#include "bxtdlg.h"
#include "imageprocess.h"

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

/////////////////////////////////////////////////////////////////////////////
// DispMarking dialog

DispMarking::DispMarking(CWnd* pParent /*=NULL*/)
	: CDialog(DispMarking::IDD, pParent)
{
	//{{AFX_DATA_INIT(DispMarking)
	//}}AFX_DATA_INIT
}

void DispMarking::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(DispMarking)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(DispMarking, CDialog)
	//{{AFX_MSG_MAP(DispMarking)
	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_EN_SETFOCUS(IDC_EDIT2, OnSetfocusEdit2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// DispMarking message handlers

BOOL DispMarking::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	p1.SubclassDlgItem(IDC_BUTTON1, this);
	p1.SetIcon(IDI_POINTER);
	p1.SetWindowText("360度箭头");

	p2.SubclassDlgItem(IDC_BUTTON2, this);
	p2.SetIcon(IDI_CROSS);
	p2.SetWindowText("十字标志");

	p3.SubclassDlgItem(IDC_BUTTON3, this);
	p3.SetIcon(IDI_CARET);
	p3.SetWindowText("字符标志");

	p4.SubclassDlgItem(IDC_BUTTON4, this);
	p4.SetIcon(IDI_M7);
	p4.SetWindowText("删除标志");

	m_hInfoWnd	= GetDlgItem(IDC_EDIT_INFO_WND)->GetSafeHwnd();
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void DispMarking::OnButton1() 
{
	((CBxtDlg*)AfxGetMainWnd())->imgpcs->
		SendMessage(WX_DSPMETA, ACTION_ARROW, (LPARAM)(m_hInfoWnd));//arrow
}

void DispMarking::OnButton2() 
{
	((CBxtDlg*)AfxGetMainWnd())->imgpcs->
		SendMessage(WX_DSPMETA, ACTION_CROSS, (LPARAM)(m_hInfoWnd));//cross
}

void DispMarking::OnButton3() 
{
	UpdateData(true);
	((CBxtDlg*)AfxGetMainWnd())->imgpcs->
//		SendMessage(WX_DSPMETA, ACTION_TEXT, (long)(m_msg.GetBuffer(100)));//Text
		SendMessage(WX_DSPMETA, ACTION_TEXT, (LPARAM)(m_hInfoWnd));//cross
}

void DispMarking::OnButton4() 
{
	((CBxtDlg*)AfxGetMainWnd())->imgpcs->
		SendMessage(WX_DSPMETA, ACTION_DELETE, (LPARAM)(m_hInfoWnd));//Delete
}

void DispMarking::OnButton5() 
{
	((CBxtDlg*)AfxGetMainWnd())->imgpcs->
		SendMessage(WX_DSPMETA, ACTION_GETINFO, (LPARAM)(m_hInfoWnd));
}

void
DispMarking::OnSetfocusEdit2() 
{
	CString	sCaption;
	CEdit	*pWnd	= (CEdit *)GetDlgItem(IDC_EDIT2);

	pWnd->GetWindowText(sCaption);

	if	(sCaption.IsEmpty())
	{
		sCaption	= "[请输入文字]";
		pWnd->SetWindowText(sCaption);
		pWnd->SetSel(0, sCaption.GetLength());
	}
}

⌨️ 快捷键说明

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