home *** CD-ROM | disk | FTP | other *** search
/ 3D Graphics Programming for Windows 95 / 3D_Graphics_Programming_for_Windows_95_Microsoft_1996.iso / samples / basic / 3dwndnew.h < prev    next >
C/C++ Source or Header  |  1996-02-01  |  1KB  |  67 lines

  1. // 3dWnd.h : header file
  2. //
  3.  
  4. /////////////////////////////////////////////////////////////////////////////
  5. // C3dWnd window
  6.  
  7. class C3dWnd : public CWnd
  8. {
  9. // Construction
  10. public:
  11.     C3dWnd();
  12.     BOOL Create(const char* pszCaption,
  13.                 DWORD dwStyle,
  14.                 int x, int y,
  15.                 int cx, int cy,
  16.                 CWnd* pParent = NULL);
  17.  
  18. // Attributes
  19. public:
  20.  
  21. // Operations
  22. public:
  23.     BOOL Update();
  24.  
  25. // Overrides
  26.     // ClassWizard generated virtual function overrides
  27.     //{{AFX_VIRTUAL(C3dWnd)
  28.     protected:
  29.     virtual void PostNcDestroy();
  30.     //}}AFX_VIRTUAL
  31.  
  32. // Implementation
  33. public:
  34.     virtual ~C3dWnd();
  35.  
  36.     // Generated message map functions
  37. protected:
  38.     //{{AFX_MSG(C3dWnd)
  39.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  40.     afx_msg void OnDestroy();
  41.     afx_msg void OnMove(int x, int y);
  42.     afx_msg void OnSize(UINT nType, int cx, int cy);
  43.     afx_msg void OnPaint();
  44.     //}}AFX_MSG
  45.     DECLARE_MESSAGE_MAP()
  46.  
  47. protected:
  48.     static BOOL s_bRegistered;
  49.     static BOOL Register();
  50.     CDirectDraw* m_pDD;
  51.     CDirect3D* m_pD3D;
  52.     C3dStage* m_pStage;
  53.     C3dScene* m_pScene;
  54.     BOOL m_bEnableUpdates;
  55.     HWND m_hwndDD;        // direct draw window
  56.     int m_iWidth;        // client width
  57.     int m_iHeight;        // client height
  58.     CRect m_rcClient;    // client area in screen coords
  59.     BOOL m_bRepaintAll;    // window size changed etc.
  60.  
  61.     BOOL _CreateStage();
  62.     void _ReleaseStage();
  63.  
  64. };
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.