home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / common / msdev98 / bin / ide / devgal.pkg / TEMPLATE / 22338 < prev    next >
Encoding:
Text File  |  1998-06-18  |  1.9 KB  |  84 lines

  1. // $$VAL:SHEETIMPLEMENTATION$$ : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "$$VAL:RESINC$$"
  6. #include "$$VAL:SHEETHEADER$$"
  7.  
  8. #ifdef _DEBUG
  9. #undef THIS_FILE
  10. static char BASED_CODE THIS_FILE[] = __FILE__;
  11. #endif
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // $$VAL:SHEETCLASS$$
  15.  
  16. IMPLEMENT_DYNAMIC($$VAL:SHEETCLASS$$, CPropertySheet)
  17.  
  18. $$VAL:SHEETCLASS$$::$$VAL:SHEETCLASS$$(CWnd* pWndParent)
  19.      : CPropertySheet($$VAL:SheetCaption$$, pWndParent)
  20. {
  21.     // Add all of the property pages here.  Note that
  22.     // the order that they appear in here will be
  23.     // the order they appear in on screen.  By default,
  24.     // the first page of the set is the active one.
  25.     // One way to make a different property page the 
  26.     // active one is to call SetActivePage().
  27.  
  28. $$LOOP:PAGES:PAGE_IDX$$
  29.     AddPage(&$$VAL_IDX:PAGEVAR:PAGE_IDX$$);
  30. $$ENDLOOP$$
  31. $$IF:WizardMode$$
  32.  
  33.     SetWizardMode();
  34. $$ENDIF$$
  35. }
  36.  
  37. $$VAL:SHEETCLASS$$::~$$VAL:SHEETCLASS$$()
  38. {
  39. }
  40.  
  41.  
  42. BEGIN_MESSAGE_MAP($$VAL:SHEETCLASS$$, CPropertySheet)
  43.     //{{AFX_MSG_MAP($$VAL:SHEETCLASS$$)
  44.         // NOTE - the ClassWizard will add and remove mapping macros here.
  45.     //}}AFX_MSG_MAP
  46. END_MESSAGE_MAP()
  47.  
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // $$VAL:SHEETCLASS$$ message handlers
  51.  
  52. $$IF:PREVIEW$$
  53. BOOL $$VAL:SHEETCLASS$$::OnInitDialog()
  54. {
  55.     BOOL bResult = CPropertySheet::OnInitDialog();
  56.  
  57.     // add a preview window to the property sheet.
  58.     CRect rectWnd;
  59.     GetWindowRect(rectWnd);
  60.     SetWindowPos(NULL, 0, 0,
  61.         rectWnd.Width() + 100,
  62.         rectWnd.Height(),
  63.         SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
  64.     CRect rectPreview(rectWnd.Width() + 25, 25,
  65.         rectWnd.Width()+75, 75);
  66.  
  67.     m_wndPreview.Create(NULL, NULL, WS_CHILD|WS_VISIBLE,
  68.         rectPreview, this, 0x1000);
  69.  
  70.     CenterWindow();
  71.     return bResult;
  72. }
  73.  
  74. $$ENDIF$$
  75. $$IF:MODELESS$$
  76. void $$VAL:SHEETCLASS$$::PostNcDestroy()
  77. {
  78.     CPropertySheet::PostNcDestroy();
  79.     delete this;
  80. }
  81.  
  82. $$ENDIF$$
  83.  
  84.