You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
812 B
C++

#pragma once
#include "module.h"
class CRuler :public CModule
{
public:
CRuler(void);
~CRuler(void);
virtual CMFCPropertyGridProperty *CreatGridProperty();
virtual void OnPropertyChanged();
virtual MODULE GetModuleType(){return _RULER_PROP;};
virtual void Draw(CDC* pDC);//在pDC 绘制一些内容
void DrawMousePos(CDC* pDC,CPoint point);
private:
void DrawRuler(CDC* pDC);
void DrawRulerNum(CDC* pDC,int Num,int CurX,int CurY,double TextWidth,BOOL bIsX);
CFont* SetCurFont(CDC *pDC,double TextHeight,double TextWidth,double RotateAngle,bool bIsItalic,CString FontTypeStr);
private:
bool m_bDrawRuler;//是否绘制标尺
CPoint m_MousePointTmp;//记录鼠标的临时位置,用在标尺上
};
extern CRuler *gRuler;