📄 myfontdlg.cpp
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -