代码拉取完成,页面将自动刷新
同步操作将从 jiangxiaogang/FontMaker 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// PreviewWnd.cpp : ʵļ
#include "stdafx.h"
#include "FontMakerApp.h"
#include "PreviewWnd.h"
// CPreviewWnd
IMPLEMENT_DYNAMIC(CPreviewWnd, CWnd)
BEGIN_MESSAGE_MAP(CPreviewWnd, CWnd)
ON_WM_PAINT()
ON_WM_DESTROY()
END_MESSAGE_MAP()
void CPreviewWnd::SetDC(HDC hdc)
{
m_dc.Attach(hdc);
}
void CPreviewWnd::SetSize(INT width, INT height)
{
RECT rc;
GetClientRect(&rc);
m_nWidth = width;
m_nHeight = height;
m_nPaintX = (rc.right-m_nWidth)/2;
m_nPaintY = (rc.bottom-m_nHeight)/2;
}
// CPreviewWnd Ϣ
void CPreviewWnd::OnPaint()
{
CBrush br;
CRgn rgn;
CPaintDC dc(this);
rgn.CreateRectRgnIndirect(&m_client);
br.CreateSysColorBrush(COLOR_BTNFACE);
dc.SelectClipRgn(&rgn);
dc.FillRect(&m_client,&br);
dc.BitBlt(m_nPaintX,m_nPaintY,m_nWidth,m_nHeight,&m_dc,0,0,SRCCOPY);
br.DeleteObject();
rgn.DeleteObject();
}
void CPreviewWnd::PreSubclassWindow()
{
m_nWidth = 0;
m_nHeight = 0;
m_nPaintX = 0;
m_nPaintY = 0;
GetClientRect(&m_client);
CWnd::PreSubclassWindow();
}
void CPreviewWnd::OnDestroy()
{
CWnd::OnDestroy();
m_dc.Detach();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。