Click here to Skip to main content
Click here to Skip to main content
Articles » Multimedia » OpenGL » General » Downloads
 
Add your own
alternative version
Go to top

True OpenGL Zooming

, 11 Feb 2002
True zooming on a perspective view...
zoomperspective.zip
ZoomPerspective
Release
ZoomPerspective.exe
res
Apple.bmp
Toolbar.bmp
ZoomPerspective.ico
ZoomPerspectiveDoc.ico
Zoom.jpg
ZoomPerspective.dep
ZoomPerspective.dsp
ZoomPerspective.dsw
ZoomPerspective.mak
ZoomPerspective.ver
// View.h : interface of the CZoomPerspectiveView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_VIEW_H__626A24E3_E203_48C4_A0A9_F2137306057A__INCLUDED_)
#define AFX_VIEW_H__626A24E3_E203_48C4_A0A9_F2137306057A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ogl.h"
#include "texture.h"

class CZoomPerspectiveView : public CView
{
protected: // create from serialization only
	CZoomPerspectiveView();
	DECLARE_DYNCREATE(CZoomPerspectiveView)

// Attributes
public:
	CZoomPerspectiveDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CZoomPerspectiveView)
	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_VIRTUAL

// Implementation
public:
	virtual ~CZoomPerspectiveView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CZoomPerspectiveView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnZoomAll();
	afx_msg void OnPerspectiveParameters();
	afx_msg void OnUpdatePerspectiveParameters(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
protected:
   COGL  m_ogl       ;
   //
private:
   //
   // full rectangle :
   //
   UINT           m_list;
   void           CreateDisplayList();
   //
protected:
   //
   // Selection...
   //
   void		OnDrawSelection(CDC* pDC);
   CRect	   m_rcSelect  ;
   bool		m_bZooming  ;
   CTexture m_Texture   ;
};

#ifndef _DEBUG  // debug version in View.cpp
inline CZoomPerspectiveDoc* CZoomPerspectiveView::GetDocument()
   { return (CZoomPerspectiveDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_VIEW_H__626A24E3_E203_48C4_A0A9_F2137306057A__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 12 Feb 2002
Article Copyright 2002 by pepito sbarzeguti
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid