示例#1
0
文件: trans.cpp 项目: eatonmi/Crawler
BOOL Ctrans::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();

  ((CButton*)GetDlgItem(IDC_select_start))->SetCheck(1);
  strcpybuff(RasString,"");
  
  SetIcon(httrack_icon,false);
  SetIcon(httrack_icon,true);  
	EnableToolTips(true);     // TOOL TIPS

  // Patcher l'interface pour les Français ;-)
  if (LANG_T(-1)) {    // Patcher en français
    //SetDlgItemTextCP(this, ,"");
    SetWindowTextCP(this, LANG(LANG_J9) /*"Démarrer.."*/);
    SetDlgItemTextCP(this, IDC_select_start,LANG(LANG_J10) /*"Vous pouvez démarrer le miroir en pressant la touche DEMARRER,\nou définir avant les options de connexion"*/);
    SetDlgItemTextCP(this, IDC_select_save,LANG(LANG_J10b));
    SetDlgItemTextCP(this, IDC_STATIC_delay,LANG(LANG_J11) /*"Retarder"*/);
    SetDlgItemTextCP(this, IDC_wait,LANG(LANG_J12) /*"Attendre avant de commencer jusqu'à: (hh/mm/ss)"*/);
    //SetDlgItemTextCP(this, IDC_avant,LANG(LANG_BACK) /*"<- AVANT"*/);
    SetDlgItemTextCP(this, IDCANCEL,LANG(LANG_QUIT) /*"Quitter"*/);
    SetDlgItemTextCP(this, IDOK,LANG(LANG_J13) /*"DEMARRER!"*/);
    SetDlgItemTextCP(this, IDC_STATIC_ras,LANG(LANG_J14) /*"Connexion provider"*/);
    SetDlgItemTextCP(this, IDC_cnx,LANG(LANG_J15) /*"Connecter à ce provider"*/);
    SetDlgItemTextCP(this, IDC_rasdisc,LANG_J16);
  }

  // liste vide pour commencer
  isfilled=FALSE;
  FillProviderList(0);
  m_ctlrasid.SetCurSel(0);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
BOOL COptionTab7::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
  EnableToolTips(true);     // TOOL TIPS

  // mode modif à la volée
  if (modify==1) {
    GetDlgItem(IDC_ADD1) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ADD2) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_URL2) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_STATIC_finfo) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_STATIC_tip) ->ModifyStyle(0,WS_DISABLED);
  } else {
    GetDlgItem(IDC_ADD1) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ADD2) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_URL2) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_STATIC_finfo) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_STATIC_tip) ->ModifyStyle(WS_DISABLED,0);
  }

  // Patcher l'interface pour les Français ;-)
  if (LANG_T(-1)) {    // Patcher en français
    SetWindowTextCP(this, LANG(LANG_B9)); // "Filtres");
    SetDlgItemTextCP(this, IDC_STATIC_finfo,LANG(LANG_B10)); // "Vous pouvez exclure ou accepter plusieurs URLs ou liens, en utilisant les jokers\nVous pouvez utiliser les virgules ou les espaces entre les filtres\nExemple: +*.zip,-www.*.com,-www.*.edu/cgi-bin/*.cgi");
    SetDlgItemTextCP(this, IDC_ADD1,LANG(LANG_B11)); // "Exclure lien(s)..");
    SetDlgItemTextCP(this, IDC_ADD2,LANG(LANG_B12)); // "Accepter lien(s)..");
    SetDlgItemTextCP(this, IDC_STATIC_tip,LANG(LANG_B13)); // "Conseil: Si vous voulez accepter tous les fichiers gif d'un site, utilisez quelque chose comme +www.monweb.com/*.gif\n(+*.gif autorisera TOUS les fichiers gif sur TOUS les sites)");
  }

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
示例#3
0
BOOL COptionTab11::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
	
  EnableToolTips(true);     // TOOL TIPS

  if (LANG_T(-1)) {    // Patcher en français
    SetDlgItemTextCP(this, IDC_STATIC_asso,LANG_W1);
    SetDlgItemTextCP(this, IDC_STATIC_filetype,LANG_W2);
    SetDlgItemTextCP(this, IDC_STATIC_mime,LANG_W3);
  }  

  SetWindowTextCP(this, LANG_IOPT11);

  // mode modif à la volée
  if (modify==1) {
    GetDlgItem(IDC_ext1           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ext2           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ext3           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ext4           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ext5           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ext6           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ext7           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ext8           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_mime1           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_mime2           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_mime3           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_mime4           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_mime5           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_mime6           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_mime7           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_mime8           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_up           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_down           ) ->ModifyStyle(0,WS_DISABLED);
  } else {
    GetDlgItem(IDC_ext1           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ext2           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ext3           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ext4           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ext5           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ext6           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ext7           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ext8           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_mime1           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_mime2           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_mime3           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_mime4           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_mime5           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_mime6           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_mime7           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_mime8           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_up           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_down           ) ->ModifyStyle(WS_DISABLED,0);
  }


	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
BOOL wizard::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
  SetIcon(httrack_icon,false);
  SetIcon(httrack_icon,true);  
  SetForegroundWindow();   // yop en premier plan!

  // Patcher l'interface pour les Français ;-)
  if (LANG_T(-1)) {    // Patcher en français
    //SetDlgItemText(,"");
    SetWindowTextCP(this, LANG(LANG_L1) /*"Question du wizard"*/);
    SetDlgItemTextCP(this, IDC_STATIC_answer,LANG(LANG_L2) /*"Votre réponse:"*/);
  }

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
示例#5
0
BOOL CNewProj::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
  SetIcon(httrack_icon,false);
  SetIcon(httrack_icon,true);
  EnableToolTips(true);     // TOOL TIPS
  SetForegroundWindow();   // yop en premier plan!

  // disabled
  OnChangeprojname();

  // Patcher l'interface pour les Français ;-)
  if (LANG_T(-1)) {    // Patcher en français
    SetWindowTextCP(this,  LANG(LANG_S10));
    // SetDlgItemTextCP(this, IDOK,LANG(LANG_NEXT )); // "SUIVANT ->");
    // SetDlgItemTextCP(this, IDCANCEL,LANG(LANG_QUIT));  // exit 
    SetDlgItemTextCP(this, IDC_STATIC_projname,LANG(LANG_S11));
    SetDlgItemTextCP(this, IDC_STATIC_basepath,LANG(LANG_S12));
    SetDlgItemTextCP(this, IDC_STATIC_projcateg,LANG(LANG_S13));
    //SetDlgItemTextCP(this, IDC_STATIC_updtcontinue,LANG(LANG_S13));
  }
  
  CString strSection       = "DefaultValues";    
  CWinApp* pApp = AfxGetApp();
  CString st;

  st = pApp->GetProfileString(strSection, "BasePath");
  if (m_projpath.GetLength()==0) {
    if (st != "")
      SetDlgItemTextCP(this, IDC_projpath,st);    
    else
      SetDlgItemTextCP(this, IDC_projpath,LANG(LANG_S20));    
  }

  return TRUE;
}
BOOL SetWindowTextCP(CWnd* wnd, LPCSTR lpString) {
  return SetWindowTextCP(wnd->m_hWnd, lpString);
}
BOOL Cinprogress::OnInitDialog() 
{
  m_inphide=TRUE;
  UpdateData(false);      // force to call DoDataExchange
  inprogress=this;

  memset(&SInfo, 0, sizeof(SInfo));

  BackAffLog=NULL;
  strcpybuff(pathlog,"");

	//CPropertyPage::OnInitDialog();
  EnableToolTips(true);     // TOOL TIPS

  // initialisation des champs pour les redraws en boucle
  element[0][0]=&m_st0;
  element[0][1]=&m_st1;
  element[0][2]=&m_st2;
  element[0][3]=&m_st3;
  element[0][4]=&m_st4;
  element[0][5]=&m_st5;
  element[0][6]=&m_st6;
  element[0][7]=&m_st7;
  element[0][8]=&m_st8;
  element[0][9]=&m_st9;
  element[0][10]=&m_st10;
  element[0][11]=&m_st11;
  element[0][12]=&m_st12;
  element[0][13]=&m_st13;

  element[1][0]=&m_nm0;
  element[1][1]=&m_nm1;
  element[1][2]=&m_nm2;
  element[1][3]=&m_nm3;
  element[1][4]=&m_nm4;
  element[1][5]=&m_nm5;
  element[1][6]=&m_nm6;
  element[1][7]=&m_nm7;
  element[1][8]=&m_nm8;
  element[1][9]=&m_nm9;
  element[1][10]=&m_nm10;
  element[1][11]=&m_nm11;
  element[1][12]=&m_nm12;
  element[1][13]=&m_nm13;

  // rajouté
  element[4][0]=&m_nn0;
  element[4][1]=&m_nn1;
  element[4][2]=&m_nn2;
  element[4][3]=&m_nn3;
  element[4][4]=&m_nn4;
  element[4][5]=&m_nn5;
  element[4][6]=&m_nn6;
  element[4][7]=&m_nn7;
  element[4][8]=&m_nn8;
  element[4][9]=&m_nn9;
  element[4][10]=&m_nn10;
  element[4][11]=&m_nn11;
  element[4][12]=&m_nn12;
  element[4][13]=&m_nn13;

  element[2][0]=&m_sl0;
  element[2][1]=&m_sl1;
  element[2][2]=&m_sl2;
  element[2][3]=&m_sl3;
  element[2][4]=&m_sl4;
  element[2][5]=&m_sl5;
  element[2][6]=&m_sl6;
  element[2][7]=&m_sl7;
  element[2][8]=&m_sl8;
  element[2][9]=&m_sl9;
  element[2][10]=&m_sl10;
  element[2][11]=&m_sl11;
  element[2][12]=&m_sl12;
  element[2][13]=&m_sl13;

  element[3][0]=&m_sk0;
  element[3][1]=&m_sk1;
  element[3][2]=&m_sk2;
  element[3][3]=&m_sk3;
  element[3][4]=&m_sk4;
  element[3][5]=&m_sk5;
  element[3][6]=&m_sk6;
  element[3][7]=&m_sk7;
  element[3][8]=&m_sk8;
  element[3][9]=&m_sk9;
  element[3][10]=&m_sk10;
  element[3][11]=&m_sk11;
  element[3][12]=&m_sk12;
  element[3][13]=&m_sk13;

  /* Init checkbox */
  CMenu* m;
  if (m = AfxGetApp()->GetMainWnd()->GetMenu()) {
    m->CheckMenuItem(ID_FILE_PAUSE,MF_UNCHECKED);
  }

  // Patcher l'interface pour les Français ;-)
  if (LANG_T(-1)) {    // Patcher en français
    //SetDlgItemTextCP(this, ,"");
    SetDlgItemTextCP(this, IDC_STATIC_bytes,LANG(LANG_H8) /*"Octets sauvés:"*/);
    SetDlgItemTextCP(this, IDC_STATIC_scanned,LANG(LANG_H9) /*"Liens parcourus:"*/);
    SetDlgItemTextCP(this, IDC_STATIC_time,LANG(LANG_H10) /*"Temps:"*/);
    SetDlgItemTextCP(this, IDC_STATIC_sockets,LANG(LANG_H11) /*"Connexions:"*/);
    SetDlgItemTextCP(this, IDC_inphide,LANG(LANG_H12) /*"En cours:"*/);
    SetDlgItemTextCP(this, IDC_STATIC_informations,LANG_H16);   
    SetDlgItemTextCP(this, IDC_STATIC_written,LANG_H17);   
    SetDlgItemTextCP(this, IDC_STATIC_updated,LANG_H18);   
    SetDlgItemTextCP(this, IDC_STATIC_errors,LANG_H19);    
    SetDlgItemTextCP(this, IDC_STATIC_inprog,LANG_H20);    
    //SetDlgItemTextCP(this, IDC_hide,LANG(LANG_H13) /*"Cacher"*/);
    SetDlgItemTextCP(this, IDC_STATIC_trate,LANG(LANG_H14) /*"Taux transfert"*/);
    for(int i=0;i<NStatsBuffer;i++)
      SetWindowTextCP(element[3][i], LANG(LANG_H15));
  }

  /*
  {
    LOGFONT lf;
    if (element[0][0]->GetFont()->GetLogFont(&lf)) {
      CFont* fnt = new CFont();
      if (fnt->CreateFont(lf.lfHeight,0,0,0,FW_DONTCARE,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"Fixedsys")) {
        int i;
        for (i=0;i<NStatsBuffer; i++) {
          element[0][i]->SetFont(fnt,true);
          element[1][i]->SetFont(fnt,true);
        }
      }
    }
  }
  */

  SetIcon(httrack_icon,false);
  SetIcon(httrack_icon,true);  

  if (ShellOptions != NULL && ShellOptions->choixdeb[0] == '!')
    Oniplog(0);           // ouvrir log

  // Lancer timer!
  StartTimer();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}