Ejemplo n.º 1
0
COptionTab11::COptionTab11() : CPropertyPage(COptionTab11::IDD)
{
  // Patcher titre
  if (LANG_T(-1)) {    // Patcher en français
    m_psp.pszTitle=LANG(LANG_IOPT11); // titre
    m_psp.dwFlags|=PSP_USETITLE;
  }
  m_psp.dwFlags|=PSP_HASHELP;
	//{{AFX_DATA_INIT(COptionTab11)
	m_ext1 = _T("");
	m_ext2 = _T("");
	m_ext3 = _T("");
	m_ext4 = _T("");
	m_ext5 = _T("");
	m_ext6 = _T("");
	m_ext7 = _T("");
	m_ext8 = _T("");
	m_mime1 = _T("");
	m_mime2 = _T("");
	m_mime3 = _T("");
	m_mime4 = _T("");
	m_mime5 = _T("");
	m_mime6 = _T("");
	m_mime7 = _T("");
	m_mime8 = _T("");
	//}}AFX_DATA_INIT
}
Ejemplo n.º 2
0
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
}
Ejemplo n.º 3
0
// sélection de la langue
void LANG_INIT() {
  CWinApp* pApp = AfxGetApp();
  if (pApp) {
    int test = pApp->GetProfileInt("Language","IntId",0);
    LANG_T(pApp->GetProfileInt("Language","IntId",0));
  }
}
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
}
Ejemplo n.º 5
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
}
Ejemplo n.º 6
0
void CSplitterFrame::SetMenuPrefs() {
  if (LANG_T(-1)) {    // Patcher en français
    CMenu* menu = GetParent()->GetParent()->GetMenu();
    if (menu) {
      ModifyMenuCP(menu, 0,MF_BYPOSITION,0,LANG(LANG_P1));
      ModifyMenuCP(menu, 1,MF_BYPOSITION,1,LANG(LANG_P2));
      ModifyMenuCP(menu, 2,MF_BYPOSITION,2,LANG(LANG_P3));
      ModifyMenuCP(menu, 3,MF_BYPOSITION,0,LANG(LANG_P4));
      ModifyMenuCP(menu, 4,MF_BYPOSITION,1,LANG(LANG_P5));
      ModifyMenuCP(menu, 5,MF_BYPOSITION,2,LANG(LANG_P6));
      //
      ModifyMenuCP(menu, ID_FILE_NEW ,MF_BYCOMMAND,ID_FILE_NEW,LANG_P18);
      ModifyMenuCP(menu, ID_FILE_OPEN ,MF_BYCOMMAND,ID_FILE_OPEN,LANG_P19);
      ModifyMenuCP(menu, ID_FILE_SAVE ,MF_BYCOMMAND,ID_FILE_SAVE,LANG_P20);
      ModifyMenuCP(menu, ID_FILE_SAVE_AS ,MF_BYCOMMAND,ID_FILE_SAVE_AS,LANG_P21);
      ModifyMenuCP(menu, ID_FILE_DELETE_PROJ ,MF_BYCOMMAND,ID_FILE_DELETE_PROJ,LANG_P22);
      ModifyMenuCP(menu, ID_FILE_BROWSE_SIT ,MF_BYCOMMAND,ID_FILE_BROWSE_SIT,LANG_P23);
      ModifyMenuCP(menu, ID_APP_EXIT,MF_BYCOMMAND,ID_APP_EXIT,LANG(LANG_P10));
      ModifyMenuCP(menu, ID_LoadDefaultOptions,MF_BYCOMMAND,ID_LoadDefaultOptions,LANG(LANG_P11));
      ModifyMenuCP(menu, ID_SaveProject,MF_BYCOMMAND,ID_SaveProject,LANG_SAVEPROJECT);
      ModifyMenuCP(menu, ID_NewProjectImport,MF_BYCOMMAND,ID_NewProjectImport,LANG(LANG_P18));
      ModifyMenuCP(menu, ID_SaveDefaultOptions,MF_BYCOMMAND,ID_SaveDefaultOptions,LANG(LANG_P12));
      ModifyMenuCP(menu, ID_ClearDefaultOptions,MF_BYCOMMAND,ID_ClearDefaultOptions,LANG(LANG_P12b));
      ModifyMenuCP(menu, ID_LOAD_OPTIONS,MF_BYCOMMAND,ID_FILE_OPEN,LANG(LANG_P13));
      ModifyMenuCP(menu, ID_FILE_SAVE_OPTIONS_AS,MF_BYCOMMAND,ID_FILE_SAVE_AS,LANG(LANG_P14));
      ModifyMenuCP(menu, IDC_langprefs,MF_BYCOMMAND,IDC_langprefs,LANG(LANG_P15));
      ModifyMenuCP(menu, ID_HELP,MF_BYCOMMAND,ID_HELP,LANG(LANG_P16));
      ModifyMenuCP(menu, IDC_ipabout,MF_BYCOMMAND,IDC_ipabout,LANG(LANG_P17));
      //
      /*
      ModifyMenuCP(menu, 0,MF_BYPOSITION,0,LANG(LANG_O1));
      ModifyMenuCP(menu, 1,MF_BYPOSITION,1,LANG(LANG_O2));
      ModifyMenuCP(menu, 2,MF_BYPOSITION,2,LANG(LANG_O3));
      ModifyMenuCP(menu, 3,MF_BYPOSITION,3,LANG(LANG_O4));
      ModifyMenuCP(menu, 4,MF_BYPOSITION,4,LANG(LANG_O5));
      */
      //
      ModifyMenuCP(menu, ID_FILE_PAUSE,MF_BYCOMMAND,ID_FILE_PAUSE,LANG(LANG_O10));
      ModifyMenuCP(menu, ID_FILE_EXIT,MF_BYCOMMAND,ID_FILE_EXIT,LANG(LANG_O11));
      ModifyMenuCP(menu, ID_OPTIONS_MODIFY,MF_BYCOMMAND,ID_OPTIONS_MODIFY,LANG(LANG_O12));
      ModifyMenuCP(menu, ID_LOG_VIEWLOG,MF_BYCOMMAND,ID_LOG_VIEWLOG,LANG(LANG_O13));
      ModifyMenuCP(menu, ID_LOG_VIEWERRORLOG,MF_BYCOMMAND,ID_LOG_VIEWERRORLOG,LANG(LANG_O14));
      ModifyMenuCP(menu, ID_LOG_VIEWTRANSFERS,MF_BYCOMMAND,ID_LOG_VIEWTRANSFERS,LANG(LANG_O14b));
      ModifyMenuCP(menu, ID_WINDOW_HIDE,MF_BYCOMMAND,ID_WINDOW_HIDE,LANG(LANG_O15));
      //ModifyMenuCP(menu, ID_VIEW_TOOLBAR,MF_BYCOMMAND,ID_VIEW_TOOLBAR,LANG(LANG_O18));
      ModifyMenuCP(menu, ID_VIEW_STATUS_BAR,MF_BYCOMMAND,ID_VIEW_STATUS_BAR,LANG(LANG_O19));
      ModifyMenuCP(menu, ID_WINDOW_SPLIT,MF_BYCOMMAND,ID_WINDOW_SPLIT,LANG(LANG_O20));      
      ModifyMenuCP(menu, ID_ABOUT,MF_BYCOMMAND,ID_ABOUT,LANG(LANG_O16));
      ModifyMenuCP(menu, ID_UPDATE,MF_BYCOMMAND,ID_UPDATE,LANG(LANG_O17));
      //
      GetParent()->GetParent()->DrawMenuBar();
    }
  }
}
COptionTab7::COptionTab7() : CPropertyPage(COptionTab7::IDD)
{
  // Patcher titre
  if (LANG_T(-1)) {    // Patcher en français
    m_psp.pszTitle=LANG(LANG_IOPT7); // titre
    m_psp.dwFlags|=PSP_USETITLE;
  }
  m_psp.dwFlags|=PSP_HASHELP;
  //
	//{{AFX_DATA_INIT(COptionTab7)
	m_url2 = _T("");
	//}}AFX_DATA_INIT
}
COptionTab10::COptionTab10() : CPropertyPage(COptionTab10::IDD)
{
  // Patcher titre
  if (LANG_T(-1)) {    // Patcher en français
    m_psp.pszTitle=LANG(LANG_IOPT10); // titre
    m_psp.dwFlags|=PSP_USETITLE;
  }
  m_psp.dwFlags|=PSP_HASHELP;
  //
	//{{AFX_DATA_INIT(COptionTab10)
	m_proxy = _T("");
	m_port = _T("");
	m_ftpprox = FALSE;
	//}}AFX_DATA_INIT
}
COptionTab6::COptionTab6() : CPropertyPage(COptionTab6::IDD)
{
  // Patcher titre
  if (LANG_T(-1)) {    // Patcher en français
    m_psp.pszTitle=LANG(LANG_IOPT6); // titre
    m_psp.dwFlags|=PSP_USETITLE;
  }
  m_psp.dwFlags|=PSP_HASHELP;
  //
	//{{AFX_DATA_INIT(COptionTab6)
	m_user = _T("");
	m_footer = _T("");
	m_accept_language = _T("");
	m_other_headers = _T("");
	m_default_referer = _T("");
	//}}AFX_DATA_INIT
}
BOOL COptionTab6::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
  EnableToolTips(true);     // TOOL TIPS
	
  // Patcher l'interface pour les Français ;-)
  if (LANG_T(-1)) {    // Patcher en français
    SetDlgItemTextCP(this, IDC_STATIC_browsid,LANG(LANG_I43)); // "Identité");
    SetDlgItemTextCP(this, IDC_STATIC_footer,LANG(LANG_I43b));
    SetDlgItemTextCP(this, IDC_STATIC_accept_language,LANG(LANG_I43c));
    SetDlgItemTextCP(this, IDC_STATIC_other_headers,LANG(LANG_I43d));
    SetDlgItemTextCP(this, IDC_STATIC_default_referer,LANG(LANG_I43e));
  }
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Ejemplo n.º 11
0
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
}
COptionTab9::COptionTab9() : CPropertyPage(COptionTab9::IDD)
{
  // Patcher titre
  if (LANG_T(-1)) {    // Patcher en français
    m_psp.pszTitle=LANG(LANG_IOPT9); // titre
    m_psp.dwFlags|=PSP_USETITLE;
  }
  m_psp.dwFlags|=PSP_HASHELP;
  //
	//{{AFX_DATA_INIT(COptionTab9)
	m_index = FALSE;
	m_logf = FALSE;
	m_Cache2 = FALSE;
	m_logtype = -1;
	m_norecatch = FALSE;
	m_index2 = FALSE;
	m_index_mail = FALSE;
	//}}AFX_DATA_INIT
}
Ejemplo n.º 13
0
BOOL CFirstInfo::OnInitDialog() 
{

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

  WINDOWPLACEMENT wp;
  m_splash.GetWindowPlacement(&wp);
  wp.rcNormalPosition.right=wp.rcNormalPosition.left+300+1;
  wp.rcNormalPosition.bottom=wp.rcNormalPosition.top+69+1; 
  m_splash.SetWindowPlacement(&wp);

  // Patcher l'interface pour les Français ;-)
  if (LANG_T(-1)) {    // Patcher en français
    //SetDlgItemText(,"");
    
    SetDlgItemTextCP(this,IDC_STATIC_welcome, LANG_Y1);
  }

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

  if (LANG_T(-1)) {    // Patcher en français
    SetDlgItemTextCP(this, IDC_index,LANG(LANG_I35)); // "Faire un index");
    SetDlgItemTextCP(this, IDC_index2,LANG(LANG_I35b));
    SetDlgItemTextCP(this, IDC_index_mail,LANG(LANG_I35c));
    SetDlgItemTextCP(this, IDC_logf,LANG(LANG_I36)); // "Fichiers d'audit");
    SetDlgItemTextCP(this, IDC_Cache2,LANG(LANG_I61));
    SetDlgItemTextCP(this, IDC_norecatch,LANG(LANG_I34b));
    SetCombo(this,IDC_logtype,LISTDEF_9);
  }  

  // mode modif à la volée
  if (modify==1) {
    GetDlgItem(IDC_norecatch)->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_index)   ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_index2)  ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_index_mail)->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_logf)    ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_Cache2)  ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_logtype) ->ModifyStyle(0,WS_DISABLED);
  } else {
    GetDlgItem(IDC_norecatch)->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_index)   ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_index2)  ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_index_mail)->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_logf)    ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_Cache2)  ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_logtype) ->ModifyStyle(WS_DISABLED,0);
  }


	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Ejemplo n.º 15
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 COptionTab10::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
	
  EnableToolTips(true);     // TOOL TIPS

  /* hide password */
  CString st;
  GetDlgItemText(IDC_prox,st);
  if (st.Find('@')>=0) {
    m_ctl_pwdhide.SetCheck(1);
    OnPwdhide();
  } else {
    m_ctl_pwdhide.SetCheck(0);
    OnPwdhide();
  }

  if (LANG_T(-1)) {    // Patcher en français
    SetDlgItemTextCP(this, IDC_proxyconfigure,LANG(LANG_I47b)); // "Configurer"
    SetDlgItemTextCP(this, IDC_ftpprox,LANG(LANG_I47c));
    SetDlgItemTextCP(this, IDC_PWDHIDE,LANG_HIDEPWD);  /* Hide password */
  }  

  // mode modif à la volée
  if (modify==1) {
    GetDlgItem(IDC_prox           ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_portprox       ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_proxyconfigure ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_proxtitle      ) ->ModifyStyle(0,WS_DISABLED);
    GetDlgItem(IDC_ftpprox        ) ->ModifyStyle(0,WS_DISABLED);
  } else {
    GetDlgItem(IDC_prox           ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_portprox       ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_proxyconfigure ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_proxtitle      ) ->ModifyStyle(WS_DISABLED,0);
    GetDlgItem(IDC_ftpprox        ) ->ModifyStyle(WS_DISABLED,0);
  }

  CString str;
  GetDlgItemText(IDC_prox,str);
  m_ctl_prox.ResetContent();
  m_ctl_prox.AddString("");

  HKEY phkResult;
  if (RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",0,KEY_READ,&phkResult)==ERROR_SUCCESS) {
    DWORD type=0;
    DWORD datasize=1000;
    char data[1024];
    data[0]='\0';
    if (RegQueryValueEx(phkResult,"ProxyServer",0,&type,(unsigned char*)&data,&datasize)==ERROR_SUCCESS) {
      if (datasize) {
        char* a=strchr(data,':');
        if (a)
          *a='\0';
        m_ctl_prox.AddString(data);
      }
    }
    RegCloseKey(phkResult);
  }
  SetDlgItemTextCP(this, IDC_prox,str);

  // Do not search for a proxy everytime
  CWinApp* pApp = AfxGetApp();
  if (pApp->GetProfileInt("Interface","FirstProxySearch",0) != 1) {
    pApp->WriteProfileInt("Interface","FirstProxySearch",1);
    
    // Launch proxy name search
    int i=0;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="proxy")   ,this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="www")     ,this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="ns")      ,this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="web")     ,this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="ntserv")  ,this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="gate")    ,this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="gateway") ,this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="firewall"),this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    WSAAsyncGetHostByName(this->m_hWnd,wm_ProxySearch+i,(ProxyDetectName[i]="cache")   ,this->ProxyDetectBuff[i],sizeof(this->ProxyDetectBuff[i])); i++;
    
  }
  
  return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
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
}
Ejemplo n.º 18
0
void LANG_LOAD(char* limit_to) {
  CWaitCursor wait;
  //
  extern int NewLangStrSz;
  extern coucal NewLangStr;
  extern int NewLangStrKeysSz;
  extern coucal NewLangStrKeys;
  //
  int selected_lang=LANG_T(-1);
  //
  if (!limit_to) {
    LANG_DELETE();
    NewLangStr=coucal_new(NewLangStrSz);
    NewLangStrKeys=coucal_new(NewLangStrKeysSz);
    if ((NewLangStr==NULL) || (NewLangStrKeys==NULL)) {
      AfxMessageBox("Error in lang.h: not enough memory");
    } else {
      coucal_value_is_malloc(NewLangStr,1);
      coucal_value_is_malloc(NewLangStrKeys,1);
    }
  }

  TCHAR ModulePath[MAX_PATH + 1];
  ModulePath[0] = '\0';
  ::GetModuleFileName(NULL, ModulePath, sizeof(ModulePath)/sizeof(TCHAR) - 1);
  TCHAR* pos = _tcsrchr(ModulePath, '\\');
  if (pos != NULL)
  {
    * ( pos + 1) = '\0';
  } else {
    ModulePath[0] = '\0';
  }

  /* Load master file (list of keys and internal keys) */
  CString app = ModulePath;
  if (!limit_to) {
    CString mname=app+"lang.def";
    if (!fexist((char*)LPCTSTR(mname)))
      mname="lang.def";
    FILE* fp=fopen(mname,"rb");
    if (fp) {
      char intkey[8192];
      char key[8192];
      while(!feof(fp)) {
        linput_cpp(fp,intkey,8000);
        linput_cpp(fp,key,8000);
        if (strnotempty(intkey) && strnotempty(key)) {
          char* test=LANGINTKEY(key);

          /* Increment for multiple definitions */
          if (strnotempty(test)) {
            int increment=0;
            size_t pos = strlen(key);
            do {
              increment++;
              sprintf(key+pos,"%d",increment);
              test=LANGINTKEY(key);
            }  while (strnotempty(test));
          }

          if (!strnotempty(test)) {         // éviter doublons
            // conv_printf(key,key);
            size_t len;
            char* buff;
            len=strlen(intkey);
            buff=(char*)malloc(len+2);
            if (buff) {
              strcpybuff(buff,intkey);
              coucal_add(NewLangStrKeys,key,(intptr_t)buff);
            }
          }
        } // if
      }  // while
      fclose(fp);
    } else {
      AfxMessageBox("FATAL ERROR\r\n'lang.def' file NOT FOUND!\r\nEnsure that the installation was complete!");
      exit(0);
    }
  }
  
  /* Language Name? */
  char* hashname;
  {
    char name[256];
    sprintf(name,"LANGUAGE_%d",selected_lang+1);
    hashname=LANGINTKEY(name);
  }

  /* Get only language name */
  if (limit_to) {
    if (hashname)
      strcpybuff(limit_to,hashname);
    else
      strcpybuff(limit_to,"???");
    return;
  }

  /* Error */
  if (!hashname)
    return;

  // xxc TEST
  /*
  setlocale( LC_ALL, "Japanese");
  _setmbcp(932);    // shift-jis
  setlocale( LC_ALL, ".932" );
  setlocale( LC_ALL, "[.932]" );
  CString st="";
  int lid=SetThreadLocale(MAKELCID(MAKELANGID(LANG_JAPANESE,SUBLANG_NEUTRAL),SORT_DEFAULT ));
  */

  /* Load specific language file */
  {
    int loops;
    CString err_msg="";
    // 2nd loop: load undefined strings
    for(loops=0;loops<2;loops++) {
      CString lbasename;
      
      {
        char name[256];
        sprintf(name,"LANGUAGE_%d",(loops==0)?(selected_lang+1):1);
        hashname=LANGINTKEY(name);
      }
      lbasename.Format("lang/%s.txt",hashname);
      CString lname=app+lbasename;
      if (!fexist((char*)LPCTSTR(lname)))
        lname=lbasename;
      FILE* fp=fopen(lname,"rb");
      if (fp) {
        char extkey[8192];
        TCHAR value[8192];
        while(!feof(fp)) {
          //int ssz;
          linput_cpp(fp,extkey,8000);
          linput_cpp(fp,value,8000);
          /*
          ssz=linput_cpp(fp,value,8000);
          CString st=value;
          AfxMessageBox(st);
          if (ssz>0) {
            int tst=0;
            int test=IsTextUnicode(value,ssz,&tst);
            unsigned short st2[1024];
            int ret=MultiByteToWideChar(CP_UTF8,0,(char*)value,ssz,st2,1024);
            if (ret>0) {
              char st3[1024]="";
              int ret2=WideCharToMultiByte(CP_THREAD_ACP,0,st2,ret,(char*)st3,1024,NULL,FALSE);
              if (ret2>0) {
                AfxMessageBox(st3);
              }
            }
          }
          */

          if (strnotempty(extkey) && strnotempty(value)) {
            int len;
            char* buff;
            char* intkey;
            
            intkey=LANGINTKEY(extkey);
            
            if (strnotempty(intkey)) {
              
              /* Increment for multiple definitions */
              {
                char* test=LANGSEL(intkey);
                if (strnotempty(test)) {
                  if (loops == 0) {
                    int increment=0;
                    size_t pos=strlen(extkey);
                    do {
                      increment++;
                      sprintf(extkey+pos,"%d",increment);
                      intkey=LANGINTKEY(extkey);
                      if (strnotempty(intkey))
                        test=LANGSEL(intkey);
                      else
                        test="";
                    }  while (strnotempty(test));
                  } else
                    intkey="";
                } else {
                  if (loops > 0) {
                    err_msg += intkey;
                    err_msg += " ";
                  }
                }
              }
              
              /* Add key */
              if (strnotempty(intkey)) {
                len = (int) strlen(value);
                buff = (char*)malloc(len+2);
                if (buff) {
                  conv_printf(value,buff);
                  coucal_add(NewLangStr,intkey,(intptr_t)buff);
                }
              }
              
            }
          } // if
        }  // while
        fclose(fp);
      } else {
        AfxMessageBox("FATAL ERROR\r\n'lang.def' file NOT FOUND!\r\nEnsure that the installation was complete!");
        exit(0);
      }
    }
    if (err_msg.GetLength()>0) {
      // AfxMessageBox("Error: undefined strings follows:\r\n"+err_msg);
    }
  }



#if 0
  app=app+"lang.h";
  if (!fexist((char*)LPCTSTR(app)))
    app="lang.h";
  
  FILE* fp=fopen(app,"rb");
  if (fp) {
    char s[8192];
    while(!feof(fp)) {
      linput_cpp(fp,s,8000);
      if (!strncmp(s,"#define ",8)) {
        char* a;
        char* name=s+8;
        a=name;
        while((*a!=' ') && (*a)) a++;
        if ((*a) && (strlen(name)>0) && (((int) a - (int) name)<64)) {
          *a++='\0';
          if (limit_to) {
            if (strcmp(name,limit_to))
              a=NULL;
          }
          if (a) {
            char* data;
            data=a;
            int toggle=0;
            char* start_str=NULL;
            int count=0;
            while(*a) {
              if (*a=='\"') {
                toggle++;
                if ((toggle%2)==1) {
                  if (count==selected_lang) {
                    start_str=a+1;
                  }
                  count++;
                } else {
                  if (start_str) {
                    char* buff;
                    int len;
                    len=(int) a - (int) start_str;
                    if (len) {
                      buff=(char*)malloc(len+2);
                      if (buff) {
                        int i=0,j=0;
                        buff[0]='\0';
                        //strncatbuff(buff,start_str,len);
                        while(i<len) {
                          switch(start_str[i]) {
                          case '\\': 
                            i++;
                            switch(start_str[i]) {
                            case 'a': buff[j]='\a'; break;
                            case 'b': buff[j]='\b'; break;
                            case 'f': buff[j]='\f'; break;
                            case 'n': buff[j]='\n'; break;
                            case 'r': buff[j]='\r'; break;
                            case 't': buff[j]='\t'; break;
                            case 'v': buff[j]='\v'; break;
                            case '\'': buff[j]='\''; break;
                            case '\"': buff[j]='\"'; break;
                            case '\\': buff[j]='\\'; break;
                            case '?': buff[j]='\?'; break;
                            default: buff[j]=start_str[i]; break;
                            }
                            break;
                            default: 
                              buff[j]=start_str[i]; 
                              break;
                          }
                          i++;
                          j++;
                        }
                        buff[j++]='\0';
                        if (!limit_to)
                          coucal_add(NewLangStr,name,(intptr_t)buff);
                        else {
                          strcpybuff(limit_to,buff);
                          free(buff);
                          return;
                        }
                      }
                    }
                    start_str=NULL;
                  }
                }
              }
              a++;
            }
          }
          
          //NewLangStr.SetAt(sname,st);
          /*
          } else {
          CString info;
          info.Format("Error in lang.h: %s",name);
          AfxMessageBox(info);
        */
        }
      }
    }


    fclose(fp);

  } else {
    AfxMessageBox("FATAL ERROR\r\n'lang.h' file NOT FOUND!\r\nEnsure that the installation was complete!");
    exit(0);
  }
#endif

  // Control limit_to
  if (limit_to)
    limit_to[0]='\0';

  // Set locale
  if (!limit_to) {
    CString charset = LANGUAGE_CHARSET;
    charset.TrimLeft();
    charset.TrimRight();
    charset.MakeLower();
    NewLangCP = CP_THREAD_ACP;
    NewLangFileCP = CP_THREAD_ACP;
#if 0
    if (charset.GetLength() > 0) {
      if (charset.Left(9) == "iso-8859-") {
        int iso = 0;
        int isoCP[] = {0, /* 0 */
          1252, /* ISO-8859-1 */
          1250, /* ISO-8859-2 */
          0, /* ISO-8859-3 */
          0, /* ISO-8859-4 */
          1251, /* ISO-8859-5 */
          1256, /* ISO-8859-6 */
          1253, /* ISO-8859-7 */
          1255, /* ISO-8859-8 */
          1254, /* ISO-8859-9 */
        };
        if (sscanf(charset.GetBuffer(0) + 9, "%d", &iso) == 1) {
          if (iso < sizeof(isoCP)/sizeof(isoCP[0])) {
            if (isoCP[iso] != 0) {
              NewLangFileCP = isoCP[iso];
            }
          }
        }
      } else if (charset.Left(8) == "windows-") {
        int windows = 0;
        if (sscanf(charset.GetBuffer(0) + 8, "%d", &windows) == 1) {
          NewLangFileCP = windows;
        }
      } else if (charset == "shift-jis") {
        NewLangFileCP = 932;
      } else if (charset == "big5") {
        NewLangFileCP = 950;
      } else if (charset == "gb2312") {
        NewLangFileCP = 936;
      } else {
        NewLangFileCP = CP_THREAD_ACP;
      }
    }
    WORD acp = GetACP();
    if (NewLangFileCP != CP_THREAD_ACP && NewLangFileCP != acp) {
      char* currName = LANGUAGE_WINDOWSID;
      LCID thl = GetThreadLocale();
      WORD sid = SORTIDFROMLCID(thl);
      WORD lid = 0;
      WinLangid* lids;
      if (currName[0]) {
        for( lids = (WinLangid*)&WINDOWS_LANGID ; lids->name != NULL ; lids++ ) {
          if (strcmp(currName, lids->name) == 0) {
            lid = lids->langId;
            break;
          }
        }
        if (lid != 0) {
          SetThreadLocale(MAKELCID(lid, sid));
        }
      }
    }
#endif

  }

}