-
来自「visual c 灵感编程的1-20节源码」· 代码 · 共 73 行
TXT
73 行
// 透明窗口View.h : interface of the CMyView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_VIEW_H__C296F970_A8CA_11D2_800F_5254AB250EAA__INCLUDED_)
#define AFX_VIEW_H__C296F970_A8CA_11D2_800F_5254AB250EAA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMyView : public CView
{
protected: // create from serialization only
CMyView();
DECLARE_DYNCREATE(CMyView)
// Attributes
public:
CMyDoc* GetDocument();
//RECT ScreenSaved;
BOOL Judge_doing;
CBitmap hbmp; //用来保存屏幕的位图
//PBITMAP holdbmp; //用来保存内存上下文原来的位图
//HDC hdc_mem; //用来保存内存上下文句柄
int width,height;//记录当前显示器的分辨率
CDC memDC;
CBitmap * oldObject;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMyView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in 透明窗口View.cpp
inline CMyDoc* CMyView::GetDocument()
{ return (CMyDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VIEW_H__C296F970_A8CA_11D2_800F_5254AB250EAA__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?