📄 staticex.cpp
字号:
// StaticEx.cpp : implementation file
//
#include "stdafx.h"
#include "CursorEditor.h"
#include "StaticEx.h"
#include "math.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CStaticEx
CStaticEx::CStaticEx()
{
}
CStaticEx::~CStaticEx()
{
}
BEGIN_MESSAGE_MAP(CStaticEx, CStatic)
//{{AFX_MSG_MAP(CStaticEx)
ON_WM_CTLCOLOR()
ON_WM_PAINT()
// ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CStaticEx message handlers
HBRUSH CStaticEx::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CStatic::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
// TODO: Return a different brush if the default is not desired
return hbr;
}
void CStaticEx::OnPaint()
{
CPaintDC dc(this); // device context for painting
}
BOOL CStaticEx::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
BOOL CStaticEx::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_PAINT)
GetParent()->SendMessage(WM_PAINT,0,0);
return CStatic::PreTranslateMessage(pMsg);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -