myfontdlg.cpp

来自「c语言实现的遥感图像处理的一些基本操作」· C++ 代码 · 共 72 行

CPP
72
字号
// MyFontDlg.cpp : implementation file
//

#include "stdafx.h"
#include "RSImageStar.h"
#include "MyFontDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyFontDlg dialog


CMyFontDlg::CMyFontDlg(CWnd* pParent /*=NULL*/)
//	: CFontDialog("Arial",CF_EFFECTS,NULL, pParent)
{
	//{{AFX_DATA_INIT(CMyFontDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	m_cf.Flags|=CF_USESTYLE|CF_INITTOLOGFONTSTRUCT ;
}


void CMyFontDlg::DoDataExchange(CDataExchange* pDX)
{
	CFontDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyFontDlg)


		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMyFontDlg, CFontDialog)
	//{{AFX_MSG_MAP(CMyFontDlg)
	ON_WM_CAPTURECHANGED()
	ON_WM_MOUSEMOVE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyFontDlg message handlers

BOOL CMyFontDlg::OnInitDialog() 
{
	CFontDialog::OnInitDialog();
    CRect  rect;
	this->GetWindowRect(&rect);
	this->SetWindowPos(NULL,rect.left,rect.top,rect.right ,rect.bottom-40,SWP_NOMOVE);
	// TODO: Add extra initialization here
    pEdit.Create(ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE | ES_WANTRETURN |
	              WS_CHILD | WS_VISIBLE | WS_VSCROLL|WS_HSCROLL, CRect(2,340,600,470),this,ID_EDITTEXT);
	pEdit.SetWindowText(str);
	pEdit.ShowWindow(true);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}


void CMyFontDlg::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	pEdit.GetWindowText(str);
	CDialog::OnMouseMove(nFlags, point);
}

⌨️ 快捷键说明

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