📄 qsentfontdlg.h
字号:
// QSentFontDlg.h : header file
//
#if !defined(AFX_QSENTFONTDLG_H__81AFE3F6_5872_4FBB_B9D6_C1F7E95E1718__INCLUDED_)
#define AFX_QSENTFONTDLG_H__81AFE3F6_5872_4FBB_B9D6_C1F7E95E1718__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CQSentFontDlg dialog
class CQSentFontDlg : public CDialog
{
// Construction
public:
CQSentFontDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CQSentFontDlg)
enum { IDD = IDD_QSENTFONT_DIALOG };
CStatic m_DrawArea;
CComboBox m_SetBt;
CComboBox m_SelectCom;
CStatic m_ctIDisplayText;
CListBox m_ctlFontList;
CString m_strFontName;
CString m_strSampText;
CString m_strDisplayText;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CQSentFontDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
public:
void SetMyFont();
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CQSentFontDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnDfltmsg();
afx_msg void OnClrmsg();
afx_msg void OnSelchangeLfonts();
afx_msg void OnChangeEsamptext();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
CFont m_fSampFont;
void FillFontList();
void RedrawArea();
};
#ifndef _MEMDC_H_
#define _MEMDC_H_
//////////////////////////////////////////////////
// CMemDC - memory DC
//
// Author: Keith Rule
// Email: keithr@europa.com
// Copyright 1996-1997, Keith Rule
//
// You may freely use or modify this code provided this
// Copyright is included in all derived versions.
//
// This class implements a memory Device Context
class CMemDC : public CDC {
private:
CBitmap* m_bitmap;
CBitmap* m_oldBitmap;
CDC* m_pDC;
CRect m_rcBounds;
public:
CMemDC(CDC* pDC, const CRect& rcBounds) : CDC()
{
CreateCompatibleDC(pDC);
m_bitmap = new CBitmap;
m_bitmap->CreateCompatibleBitmap(pDC, rcBounds.Width(), rcBounds.Height());
m_oldBitmap = SelectObject(m_bitmap);
m_pDC = pDC;
m_rcBounds = rcBounds;
//For some reason the background color is not correct,
//so we use the button face color.
DWORD color = ::GetSysColor( COLOR_BTNFACE );
CBrush bkg(color);
FillRect(rcBounds, &bkg);
}
~CMemDC()
{
m_pDC->BitBlt(m_rcBounds.left, m_rcBounds.top, m_rcBounds.Width(), m_rcBounds.Height(),
this, m_rcBounds.left, m_rcBounds.top, SRCCOPY);
SelectObject(m_oldBitmap);
if (m_bitmap != NULL) delete m_bitmap;
}
CMemDC* operator->() {
return this;
}
};
#endif
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_QSENTFONTDLG_H__81AFE3F6_5872_4FBB_B9D6_C1F7E95E1718__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -