home *** CD-ROM | disk | FTP | other *** search
/ Practical Internet 2002 February / Practical Internet February 2002.iso / pc / Software / Browsing / httrack-3.09e2.exe / {app} / src_win / WinHTTrack / FirstInfo.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-22  |  3.7 KB  |  156 lines

  1. // FirstInfo.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "winhttrack.h"
  6. #include "FirstInfo.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /* Main WizTab frame */
  15. #include "WizTab.h"
  16. extern CWizTab* this_CWizTab;
  17.  
  18. /* Main splitter frame */
  19. #include "DialogContainer.h"
  20. #include "splitter.h"
  21. extern CSplitterFrame* this_CSplitterFrame;
  22.  
  23. /* DirTreeView */
  24. #include "DirTreeView.h"
  25. extern CDirTreeView* this_DirTreeView;
  26.  
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CFirstInfo property page
  30.  
  31. IMPLEMENT_DYNCREATE(CFirstInfo, CPropertyPage)
  32.  
  33. CFirstInfo::CFirstInfo() : CPropertyPage(CFirstInfo::IDD)
  34. {
  35.     //{{AFX_DATA_INIT(CFirstInfo)
  36.         // NOTE: the ClassWizard will add member initialization here
  37.     //}}AFX_DATA_INIT
  38. }
  39.  
  40. CFirstInfo::~CFirstInfo()
  41. {
  42. }
  43.  
  44. void CFirstInfo::DoDataExchange(CDataExchange* pDX)
  45. {
  46.     CPropertyPage::DoDataExchange(pDX);
  47.     //{{AFX_DATA_MAP(CFirstInfo)
  48.         // NOTE: the ClassWizard will add DDX and DDV calls here
  49.     //}}AFX_DATA_MAP
  50. }
  51.  
  52.  
  53. BEGIN_MESSAGE_MAP(CFirstInfo, CPropertyPage)
  54.     //{{AFX_MSG_MAP(CFirstInfo)
  55.     ON_WM_MOUSEMOVE()
  56.     ON_WM_LBUTTONDOWN()
  57.     //}}AFX_MSG_MAP
  58. END_MESSAGE_MAP()
  59.  
  60. /////////////////////////////////////////////////////////////////////////////
  61. // CFirstInfo message handlers
  62.  
  63. BOOL CFirstInfo::OnSetActive( ) {
  64.   this_CWizTab->SetWizardButtons(PSWIZB_NEXT);
  65.   this_CWizTab->SetDlgItemText(IDCANCEL,LANG_QUIT);
  66.   this_DirTreeView->ResetTree();
  67.   //GetParent()->GetDlgItem(IDCANCEL)->ModifyStyle(0,WS_DISABLED);
  68.   return 1;
  69. }
  70.  
  71. BOOL CFirstInfo::OnQueryCancel( ) {
  72.   //  if (AfxMessageBox(LANG(LANG_J1),MB_OKCANCEL)==IDOK) {
  73.   /* Envoyer un WM_CLOSE α notre fenΩtre principale */
  74.   AfxGetMainWnd()->SendMessage(WM_CLOSE,0,0);
  75.   //  }
  76.   return FALSE;
  77. }
  78.  
  79. BOOL CFirstInfo::OnInitDialog() 
  80. {
  81.     CPropertyPage::OnInitDialog();
  82.     EnableToolTips(true);     // TOOL TIPS
  83.  
  84.   // Patcher l'interface pour les Franτais ;-)
  85.   if (LANG_T(-1)) {    // Patcher en franτais
  86.     //SetDlgItemText(,"");
  87.     SetDlgItemText(IDC_STATIC_welcome,LANG_Y1);
  88.   }
  89.  
  90.     return TRUE;  // return TRUE unless you set the focus to a control
  91.                   // EXCEPTION: OCX Property Pages should return FALSE
  92. }
  93.  
  94.  
  95. // !! COPIE DE ABOUT.CPP !!
  96. void CFirstInfo::OnMouseMove(UINT nFlags, CPoint point) 
  97. {
  98.   int id=0;
  99.   CWnd* w=ChildWindowFromPoint(point);
  100.   if (w)
  101.     id=w->GetDlgCtrlID();
  102.  
  103.   // Select
  104.   switch(id) {
  105.   case 0: break;
  106.   case IDC_abouticon:
  107.     this->ClientToScreen(&point);
  108.     w->ScreenToClient(&point);
  109.     HCURSOR curs=NULL;
  110.     if (
  111.          (point.y>=120) && (point.y<=140)
  112.       || (point.y<=80)
  113.       || (point.y>=100) && (point.y<=110)
  114.       ) {
  115.       curs=AfxGetApp()->LoadCursor(IDC_CURSWWW);
  116.     } else {
  117.       curs=AfxGetApp()->LoadStandardCursor(IDC_ARROW);
  118.     }
  119.     if (curs) {
  120.       //if (curs != currentCurs) {
  121.         SetCursor(curs);
  122.         // currentCurs=curs;
  123.       //}
  124.     }
  125.   }  
  126.  
  127.     CDialog::OnMouseMove(nFlags, point);
  128. }
  129.  
  130. void CFirstInfo::OnLButtonDown(UINT nFlags, CPoint point) 
  131. {
  132.   int id=0;
  133.   CWnd* w=ChildWindowFromPoint(point);
  134.   if (w)
  135.     id=w->GetDlgCtrlID();
  136.  
  137.   // Select
  138.   switch(id) {
  139.     case 0: break;
  140.     case IDC_abouticon:
  141.       this->ClientToScreen(&point);
  142.       w->ScreenToClient(&point);
  143.     if ((point.y>=100) && (point.y<=110) || (point.y<=80)) {
  144.       if (!ShellExecute(NULL,"open","http://www.httrack.com","","",SW_RESTORE)) {
  145.       }
  146.     } else if ((point.y>=120) && (point.y<=140)) {
  147.       if (!ShellExecute(NULL,"open","http://www.serianet.com","","",SW_RESTORE)) {
  148.       }
  149.     }
  150.     break;
  151.   }
  152.  
  153.   CDialog::OnLButtonDown(nFlags, point);
  154. }
  155. // !! FIN COPIE DE ABOUT.CPP !!
  156.