home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / C_C++ / BisonFlexWizard / data1.cab / Src / Wizard / projectfilesdlg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-16  |  2.5 KB  |  119 lines

  1. // cstm1dlg.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "Parser.h"
  6. #include "ProjectFilesDlg.h"
  7. #include "Parseraw.h"
  8.  
  9. #ifdef _PSEUDO_DEBUG
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. //CProjectFilesDlg dialog
  16.  
  17.  
  18. CProjectFilesDlg::CProjectFilesDlg()
  19.     : CAppWizStepDlg(CProjectFilesDlg::IDD)
  20. {
  21.     logo_bmp.LoadBitmap(IDB_LOGO);
  22.     //{{AFX_DATA_INIT(CProjectFilesDlg)
  23.     m_C_or_CPP = 0;
  24.     //}}AFX_DATA_INIT
  25. }
  26.  
  27. void CProjectFilesDlg::OnHelp()
  28. {
  29.     AfxMessageBox("AAA");
  30. }
  31.  
  32. void CProjectFilesDlg::DoDataExchange(CDataExchange* pDX)
  33. {
  34.     CAppWizStepDlg::DoDataExchange(pDX);
  35.     //{{AFX_DATA_MAP(CProjectFilesDlg)
  36.     DDX_Control(pDX, IDC_LOGO_BMP, m_Logo);
  37.     DDX_Radio(pDX, IDC_CPP, m_C_or_CPP);
  38.     //}}AFX_DATA_MAP
  39. }
  40.  
  41. // This is called whenever the user presses Next, Back, or Finish with this step
  42. //  present.  Do all validation & data exchange from the dialog in this function.
  43. BOOL CProjectFilesDlg::OnDismiss()
  44. {
  45.     if (!UpdateData(TRUE))
  46.         return FALSE;
  47.  
  48.     // TODO: Set template variables based on the dialog's data.
  49.  
  50.     if (m_C_or_CPP == 1)
  51.         Parseraw.m_Dictionary["C_ONLY"] = "YES";
  52.     else
  53.         Parseraw.m_Dictionary.RemoveKey("C_ONLY");
  54.  
  55.  
  56.     return TRUE;    // return FALSE if the dialog shouldn't be dismissed
  57. }
  58.  
  59.  
  60. BEGIN_MESSAGE_MAP(CProjectFilesDlg, CAppWizStepDlg)
  61.  
  62.     //ON_COMMAND( IDC_HELP, OnHelp )
  63.     //{{AFX_MSG_MAP(CProjectFilesDlg)
  64.     //}}AFX_MSG_MAP
  65. END_MESSAGE_MAP()
  66.  
  67.  
  68. /////////////////////////////////////////////////////////////////////////////
  69. // CCustom1Dlg message handlers
  70.  
  71. BOOL CProjectFilesDlg::OnInitDialog() 
  72. {
  73.     CAppWizStepDlg::OnInitDialog();
  74.     
  75.     // TODO: Add extra initialization here
  76.     
  77.  
  78.     m_Logo.SetBitmap(logo_bmp);
  79.  
  80.  
  81.     CWnd* parent = GetParent();
  82.     CWnd* chld   = parent->GetWindow(GW_CHILD);
  83.  
  84.     while (parent->IsChild(chld))
  85.     {
  86.         CString cs;
  87.         chld->GetWindowText(cs);
  88.         //AfxMessageBox(cs);
  89.         if (cs=="&Help")
  90.         {
  91.             break;
  92.             //chld->ShowWindow(0);
  93.         }
  94.         chld = chld->GetNextWindow();
  95.  
  96.  
  97.  
  98.     }
  99.     
  100.     CRect rect;
  101.     chld->GetWindowRect(rect);
  102.  
  103.     chld->SubclassDlgItem( 32651, this);
  104.     //    chld->ShowWindow(0);
  105.    // CButton btn;
  106.    // btn.Create("&Help", WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, rect, parent, 1025);
  107.    // btn.ShowWindow(1);
  108.  
  109.     
  110.     //    SetHelpID(0x20096);
  111.  
  112.  
  113.  
  114.     //AfxGetApp()->WinHelp(IDD_PROJECT_FILES);
  115.  
  116.     return TRUE;  // return TRUE unless you set the focus to a control
  117.                   // EXCEPTION: OCX Property Pages should return FALSE
  118. }
  119.