急求一个基于web的jsp网上购物系统源码,数据库不限,最好能告诉我如何配置qq56985614 10

急用... 急用 展开
 我来答
晚巴抹小1e
2010-06-02 · TA获得超过1065个赞
知道小有建树答主
回答量:425
采纳率:66%
帮助的人:180万
展开全部
CChildView::CChildView()
{
m_pClientDC = NULL;
m_lpThread = NULL;

m_nFloorIndex = 0;
}

CChildView::~CChildView()
{
if ( m_lpThread != NULL )
{
delete m_lpThread;
m_lpThread = NULL;
}
}

BEGIN_MESSAGE_MAP(CChildView,CWnd )
//{{AFX_MSG_MAP(CChildView)
ON_WM_CREATE()

ON_WM_SIZE()

ON_WM_ERASEBKGND()
ON_WM_PAINT()

ON_WM_TIMER()

ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChildView message handlers

BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)
{
if ( ! CWnd::PreCreateWindow( cs ) )
return FALSE;

cs.dwExStyle |= WS_EX_CLIENTEDGE;
cs.style &= ~WS_BORDER;
cs.lpszClass = AfxRegisterWndClass( CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS,
::LoadCursor( NULL, IDC_ARROW ), HBRUSH( COLOR_WINDOW + 1 ), NULL );

return TRUE;
}

BOOL CChildView::PreTranslateMessage( MSG* pMsg )
{
if ( pMsg->message == WM_KEYDOWN && ( pMsg->wParam == VK_RETURN || pMsg->wParam == VK_SPACE ) )
{
if ( ++m_nFloorIndex >= 3 )
m_nFloorIndex = 0;
}

return CWnd::PreTranslateMessage( pMsg );
}

int CChildView::OnCreate( LPCREATESTRUCT lpCreateStruct )
{
if ( CWnd::OnCreate( lpCreateStruct ) == -1 )
{
TRACE0( "Failed to create the CChildView" );
return -1;
}

m_lpThread = AfxBeginThread( Thread, NULL, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED );
ASSERT( m_lpThread );

InitOpenGL();

SetTimer( 1, 50, NULL );

m_lpThread->ResumeThread();
return 0;
}

void CChildView::OnSize( UINT nType, int cx, int cy )
{
CWnd::OnSize( nType, cx, cy );

if ( cy == 0 )
cy = 1;

glViewport( 0, 0, cx, cy ); // Reset The Current View-port
glMatrixMode( GL_PROJECTION ); // Select The Projection Matrix
glLoadIdentity(); // Reset The Projection Matrix

// Calculate The Aspect Ratio Of The Window
gluPerspective( 45.0f, ( GLfloat ) cx / ( GLfloat ) cy, 0.1f, 400.0f );
glMatrixMode( GL_MODELVIEW ); // Select The Model-view Matrix
glLoadIdentity();
}

void CChildView::OnPaint()
{
CPaintDC dc(this); // device context for painting
CBitmap bitmap;
bitmap.LoadBitmap( IDB_SNOW_FLOOR );

// TODO: Add your message handler code here
DrawOpenGLScene();
// Do not call CWnd::OnPaint() for painting messages
}

BOOL CChildView::OnEraseBkgnd( CDC* pDC )
{
UNREFERENCED_PARAMETER( pDC );

return TRUE;
}

void CChildView::OnDestroy()
{
HGLRC hrc = NULL;
hrc = ::wglGetCurrentContext();

::wglMakeCurrent( NULL, NULL );
if ( hrc != NULL )
::wglDeleteContext( hrc );

if ( m_pClientDC != NULL )
{
delete m_pClientDC;
m_pClientDC = NULL;
}
ASSERT( m_pClientDC == NULL );

CWnd::OnDestroy();
}

// Initialize the OpenGL context device...
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式