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

📄 xxinput.cpp

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

#include "stdafx.h"
#include "Bxt.h"
#include "XXInput.h"
//#include "dsprpt2.h"
//#include "report2.h"
#include "Report.h"
#include "Clipboard.h"
#include "BxtDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// XXInput dialog


XXInput::XXInput(int x, int length, int mx, int my, CWnd* pParent /*=NULL*/)
	: CDialog(XXInput::IDD, pParent)
{
	parentx = x;
	len = length;
	movex = mx;
	movey = my;
	//{{AFX_DATA_INIT(XXInput)
	m_in = _T("");
	//}}AFX_DATA_INIT
}


void XXInput::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(XXInput)
	DDX_Text(pDX, IDC_EDIT1, m_in);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(XXInput, CDialog)
	//{{AFX_MSG_MAP(XXInput)
	ON_WM_CHAR()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// XXInput message handlers
void XXInput::OnCancel()
{
	CDialog::OnOK();	
	DestroyWindow();
}

void XXInput::OnOK()
{
	UpdateData(true);
	while (m_in.GetLength()<len)
	{
		m_in = _T(" ") + m_in;
	}	
	m_in = m_in + _T(" ");
	CClipboard::SetText(m_in.GetBuffer(100));

	/*
	HGLOBAL mm;
	mm=GlobalAlloc(GMEM_MOVEABLE & GMEM_DDESHARE,100);

 
	char *mx=(char*)GlobalLock(mm);
	sprintf((char*)mx,"%s ",m_in.Left(m_in.GetLength()));
	::OpenClipboard(NULL);
	if(::SetClipboardData(CF_TEXT,mx)==NULL) AfxMessageBox("Set Faile!");
	::CloseClipboard();
	*/
//	if (parentx==1) 
//	{
//		Report *m=(Report*)GetParent();
		Report *m = ((CBxtDlg *)AfxGetMainWnd())->report;
		m->m_rich.PasteSpecial(CF_TEXT);
//	}
//	else
//	{
//		Report2* mr=(Report2*)GetParent();
//		mr->m_report.Paste();
//	}
	
	//GlobalUnlock(mm);
	//GlobalFree(mm);	
	CDialog::OnOK();	
	DestroyWindow();
}
void XXInput::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	if ( nChar == 13 )
	{
	}
	CDialog::OnChar(nChar, nRepCnt, nFlags);
}

BOOL XXInput::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
    SetWindowPos(NULL,movex,movey,0,0,SWP_NOSIZE);	
	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 + -