📄 displaybitmapinsdiview.h
字号:
// DisplayBitmapInSDIView.h : interface of the CDisplayBitmapInSDIView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_DISPLAYBITMAPINSDIVIEW_H__622D7A5B_22BE_4B41_B4EB_50F19BFB5E3B__INCLUDED_)
#define AFX_DISPLAYBITMAPINSDIVIEW_H__622D7A5B_22BE_4B41_B4EB_50F19BFB5E3B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
class CDisplayBitmapInSDIView : public CView
{
protected: // create from serialization only
CDisplayBitmapInSDIView();
DECLARE_DYNCREATE(CDisplayBitmapInSDIView)
// Attributes
public:
CDisplayBitmapInSDIDoc* GetDocument();
CClientDC *m_pDC;
HGLRC m_hglrc;
int m_iViewWidth; // 视口的宽度
int m_iViewHeight; // 视口的高度
AUX_RGBImageRec *m_pImageBack; // 背景位图结构指针
BYTE* m_pImage; // 位图RGB数据数组
int m_nImgWidth; // 位图的宽度
int m_nImgHeight; // 位图的高度
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDisplayBitmapInSDIView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnFileOpen();
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CDisplayBitmapInSDIView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CDisplayBitmapInSDIView)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
BOOL m_bIsFirstStart;
};
#ifndef _DEBUG // debug version in DisplayBitmapInSDIView.cpp
inline CDisplayBitmapInSDIDoc* CDisplayBitmapInSDIView::GetDocument()
{ return (CDisplayBitmapInSDIDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DISPLAYBITMAPINSDIVIEW_H__622D7A5B_22BE_4B41_B4EB_50F19BFB5E3B__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -