home *** CD-ROM | disk | FTP | other *** search
- // 3ddemo.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "vbxdemo.h"
- #include "resources.h"
- #include "3ddemo.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // C3DDemo dialog
-
-
- C3DDemo::C3DDemo(CWnd* pParent /*=NULL*/)
- : CDialog(C3DDemo::IDD, pParent)
- {
- //{{AFX_DATA_INIT(C3DDemo)
- VB3D1 = NULL;
- //}}AFX_DATA_INIT
- }
-
- void C3DDemo::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(C3DDemo)
- DDX_VB3D(pDX, IDC_VB3D1, VB3D1);
- //}}AFX_DATA_MAP
- }
-
- BEGIN_MESSAGE_MAP(C3DDemo, CDialog)
- //{{AFX_MSG_MAP(C3DDemo)
- ON_BN_CLICKED(IDHELP, OnHelp)
- ON_WM_PAINT()
- ON_WM_DESTROY()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
-
- /////////////////////////////////////////////////////////////////////////////
- // C3DDemo message handlers
-
- void C3DDemo::OnHelp()
- {
- CString FAR szWinDir, szName, szMsg;
- GetSystemDirectory( szWinDir.GetBuffer(250), 248 );
- szWinDir.ReleaseBuffer();
- if ( szWinDir.GetLength() > 3 )
- szWinDir += "\\";
- szName = szWinDir;
- szName += "VBXSTD12.HLP";
- if ( !IsHlpHere() )
- return;
- ::WinHelp( m_hWnd, szName, HELP_KEY, (long)"VB3D" );
-
- }
-
- BOOL C3DDemo::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- VB3D1->GetVBX()->AddItem("Edit", 0);
- SetDlgItemText( IDC_EDIT1, "This is a standard Edit control..." );
- if ( !IsHlpHere() )
- GetDlgItem( IDHELP )->EnableWindow( FALSE );
-
- return TRUE; // return TRUE unless you set the focus to a control
- }
-
-
- void C3DDemo::OnPaint()
- {
- CPaintDC dc(this); // device context for painting
- VB3D1->GetVBX()->Refresh(); // required with VC++
-
- }
-
-
- void C3DDemo::OnDestroy()
- {
- CDialog::OnDestroy();
- ::WinHelp( m_hWnd, "VBXSTD12.HLP", HELP_QUIT, NULL );
- }
-