TestEgr 1.5b3 : ulteriori modifiche.

This commit is contained in:
Dario Sassi
2014-02-06 16:45:24 +00:00
parent d0ca06b7bd
commit 069487c790
10 changed files with 365 additions and 105 deletions
+46 -3
View File
@@ -1,15 +1,43 @@
// TestEgrView
//----------------------------------------------------------------------------
// EgalTech 2013-2014
//----------------------------------------------------------------------------
// File : TestEGrView.cpp Data : 05.02.14 Versione : 1.5b3
// Contenuto : Implementazione della classe gestione vista OpenGL.
//
//
//
// Modifiche : 29.01.14 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "TestEgrView.h"
#include "resource.h"
//----------------------------------------------------------------------------
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
//----------------------------------------------------------------------------
BEGIN_MESSAGE_MAP( TestEgrView, CWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
//----------------------------------------------------------------------------
TestEgrView::TestEgrView( void)
{
m_pDC = nullptr ;
}
//----------------------------------------------------------------------------
TestEgrView::~TestEgrView( void)
{
if ( m_pDC != nullptr)
delete m_pDC ;
m_pDC = nullptr ;
}
//----------------------------------------------------------------------------
@@ -21,7 +49,8 @@ TestEgrView::Create( CWnd* pParent, int nID)
return false ;
CString className = AfxRegisterWndClass( CS_HREDRAW | CS_VREDRAW | CS_OWNDC,
AfxGetApp()->LoadCursor( IDC_POINTER), NULL, NULL) ;
AfxGetApp()->LoadCursor( IDC_POINTER),
(HBRUSH)GetStockObject(WHITE_BRUSH), NULL) ;
CRect rectWin ;
pParent->GetDlgItem( nID)->GetWindowRect( rectWin) ;
@@ -35,3 +64,17 @@ TestEgrView::Create( CWnd* pParent, int nID)
else
return false ;
}
//----------------------------------------------------------------------------
int
TestEgrView::OnCreate( LPCREATESTRUCT lpCreateStruct)
{
if ( CWnd::OnCreate( lpCreateStruct) == -1)
return -1 ;
m_pDC = new CClientDC( this) ;
if ( m_pDC == nullptr)
return -1 ;
return 0 ;
}