From Michael Hartman, " Here is the MFC_OSG example. It is very basic and the community is welcome to enhance/improve this example. There is one bug documented in the Readme.txt file that I just have not had time to solve. Also, the code is built outside of the OSG environment and uses environment variables to get to the OSG distribution headers and examples. That should be the only change a user needs to make to get the code to compile."
This commit is contained in:
60
examples/osgviewerMFC/ChildFrm.cpp
Normal file
60
examples/osgviewerMFC/ChildFrm.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
// ChildFrm.cpp : implementation of the CChildFrame class
|
||||
//
|
||||
#include "stdafx.h"
|
||||
#include "MFC_OSG_MDI.h"
|
||||
#include "ChildFrm.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CChildFrame
|
||||
|
||||
IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
|
||||
|
||||
BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CChildFrame construction/destruction
|
||||
|
||||
CChildFrame::CChildFrame()
|
||||
{
|
||||
// TODO: add member initialization code here
|
||||
}
|
||||
|
||||
CChildFrame::~CChildFrame()
|
||||
{
|
||||
}
|
||||
|
||||
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
|
||||
{
|
||||
// TODO: Modify the Window class or styles here by modifying the CREATESTRUCT cs
|
||||
if( !CMDIChildWnd::PreCreateWindow(cs) )
|
||||
return FALSE;
|
||||
|
||||
cs.style = WS_CHILD | WS_VISIBLE | WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
|
||||
| FWS_ADDTOTITLE | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_MAXIMIZE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// CChildFrame diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CChildFrame::AssertValid() const
|
||||
{
|
||||
CMDIChildWnd::AssertValid();
|
||||
}
|
||||
|
||||
void CChildFrame::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CMDIChildWnd::Dump(dc);
|
||||
}
|
||||
|
||||
#endif //_DEBUG
|
||||
|
||||
|
||||
// CChildFrame message handlers
|
||||
Reference in New Issue
Block a user