📄 catchscreendlg.h
字号:
// CatchScreenDlg.h : header file
//
#if !defined(AFX_CATCHSCREENDLG_H__536FDBC8_7DB2_4BEF_8943_70DBE8AD845F__INCLUDED_)
#define AFX_CATCHSCREENDLG_H__536FDBC8_7DB2_4BEF_8943_70DBE8AD845F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Resource.h"
#include "MyEdit.h"
#include "Track.h"
/////////////////////////////////////////////////////////////////////////////
// CCatchScreenDlg dialog
class CCatchScreenDlg : public CDialog
{
//**********************************************************************
public:
int m_xScreen;
int m_yScreen;
BOOL m_bShowMsg; //显示截取矩形大小信息
BOOL m_bDraw; //是否为截取状态
BOOL m_bFirstDraw; //是否为首次截取
BOOL m_bQuit; //是否为退出
CPoint m_startPt; //截取矩形左上角
CTrack m_rectTracker; //像皮筋类
CBrush m_brush; //
HCURSOR m_hCursor; //光标
CBitmap * m_pBitmap; //背景位图
CRgn m_rgn; //背景擦除区域
public:
HBITMAP CopyScreenToBitmap(LPRECT lpRect,BOOL bSave=FALSE); //考贝桌面到位图
void DrawTip(); //显示操作提示信息
void DrawMessage(CRect &inRect); //显示截取矩形信息
void PaintWindow(); //重画窗口
//**********************************************************************
// Construction
public:
CCatchScreenDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CCatchScreenDlg)
enum { IDD = IDD_CATCHSCREEN_DIALOG };
CMyEdit m_tipEdit;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCatchScreenDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CCatchScreenDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CATCHSCREENDLG_H__536FDBC8_7DB2_4BEF_8943_70DBE8AD845F__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -