DlgSequencePrev();
DlgSequence(PREV_DLG);
LRESULT CALLBACK DlgProcAdditionalOptions(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam){  RECT  rDlg;  char  szBuf[MAX_BUF];  HWND  hwndCBSiteSelector;  int   iIndex;  ssi   *ssiTemp;  char  szCBDefault[MAX_BUF];  hwndCBSiteSelector = GetDlgItem(hDlg, IDC_LIST_SITE_SELECTOR);  switch(msg)  {    case WM_INITDIALOG://      if(gdwSiteSelectorStatus == SS_HIDE)//      {//        ShowWindow(GetDlgItem(hDlg, IDC_MESSAGE0),  SW_HIDE);//        ShowWindow(GetDlgItem(hDlg, IDC_LIST_SITE_SELECTOR),  SW_HIDE);//      }      if(diAdditionalOptions.bShowHomepageOption == FALSE)      {        ShowWindow(GetDlgItem(hDlg, IDC_MESSAGE0),  SW_HIDE);        ShowWindow(GetDlgItem(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE),  SW_HIDE);      }      if(GetTotalArchivesToDownload() == 0)     {        ShowWindow(GetDlgItem(hDlg, IDC_MESSAGE1),  SW_HIDE);        ShowWindow(GetDlgItem(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES),  SW_HIDE);        ShowWindow(GetDlgItem(hDlg, IDC_EDIT_LOCAL_INSTALLER_PATH), SW_HIDE);        ShowWindow(GetDlgItem(hDlg, IDC_BUTTON_PROXY_SETTINGS), SW_HIDE);      }      DisableSystemMenuItems(hDlg, FALSE);      SetWindowText(hDlg, diAdditionalOptions.szTitle);      SetDlgItemText(hDlg, IDC_MESSAGE0, diAdditionalOptions.szMessage0);      SetDlgItemText(hDlg, IDC_MESSAGE1, diAdditionalOptions.szMessage1);      GetPrivateProfileString("Strings", "IDC Save Installer Files", "", szBuf, sizeof(szBuf), szFileIniConfig);      SetDlgItemText(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, szBuf);      GetPrivateProfileString("Strings", "IDC Recapture Homepage", "", szBuf, sizeof(szBuf), szFileIniConfig);      SetDlgItemText(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE, szBuf);      GetSaveInstallerPath(szBuf, sizeof(szBuf));      SetDlgItemText(hDlg, IDC_EDIT_LOCAL_INSTALLER_PATH, szBuf);      SetDlgItemText(hDlg, IDC_BUTTON_PROXY_SETTINGS, sgInstallGui.szProxySettings_);      SetDlgItemText(hDlg, IDWIZBACK, sgInstallGui.szBack_);      SetDlgItemText(hDlg, IDWIZNEXT, sgInstallGui.szNext_);      SetDlgItemText(hDlg, IDCANCEL, sgInstallGui.szCancel_);      SendDlgItemMessage (hDlg, IDC_BUTTON_PROXY_SETTINGS, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDWIZBACK, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDWIZNEXT, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDCANCEL, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDC_MESSAGE0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDC_LIST_SITE_SELECTOR, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDC_MESSAGE1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);      SendDlgItemMessage (hDlg, IDC_EDIT_LOCAL_INSTALLER_PATH, WM_SETFONT, (WPARAM)sgInstallGui.systemFont, 0L);      if(GetClientRect(hDlg, &rDlg))        SetWindowPos(hDlg,                     HWND_TOP,                     (gSystemInfo.dwScreenX/2)-(rDlg.right/2),                     (gSystemInfo.dwScreenY/2)-(rDlg.bottom/2),                     0,                     0,                     SWP_NOSIZE);      ssiTemp = ssiSiteSelector;      do      {        if(ssiTemp == NULL)          break;        SendMessage(hwndCBSiteSelector, CB_ADDSTRING, 0, (LPARAM)(ssiTemp->szDescription));        ssiTemp = ssiTemp->Next;      } while(ssiTemp != ssiSiteSelector);      if((szSiteSelectorDescription == NULL) || (*szSiteSelectorDescription == '\0'))      {          if(GetPrivateProfileString("Messages", "CB_DEFAULT", "", szCBDefault, sizeof(szCBDefault), szFileIniInstall) &&          ((iIndex = SendMessage(hwndCBSiteSelector, CB_SELECTSTRING, -1, (LPARAM)szCBDefault)) != CB_ERR))          SendMessage(hwndCBSiteSelector, CB_SETCURSEL, (WPARAM)iIndex, 0);        else          SendMessage(hwndCBSiteSelector, CB_SETCURSEL, 0, 0);      }      else if((iIndex = SendMessage(hwndCBSiteSelector, CB_SELECTSTRING, -1, (LPARAM)szSiteSelectorDescription)) != CB_ERR)        SendMessage(hwndCBSiteSelector, CB_SETCURSEL, (WPARAM)iIndex, 0);      else        SendMessage(hwndCBSiteSelector, CB_SETCURSEL, 0, 0);      if(diAdditionalOptions.bSaveInstaller)        CheckDlgButton(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, BST_CHECKED);      else        CheckDlgButton(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES, BST_UNCHECKED);      if(diAdditionalOptions.bRecaptureHomepage)        CheckDlgButton(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE, BST_CHECKED);      else        CheckDlgButton(hDlg, IDC_CHECK_RECAPTURE_HOMEPAGE, BST_UNCHECKED);      break;    case WM_COMMAND:      switch(LOWORD(wParam))      {        case IDWIZNEXT:          SaveAdditionalOptions(hDlg, hwndCBSiteSelector);          DestroyWindow(hDlg);          DlgSequenceNext();          break;        case IDWIZBACK:          SaveAdditionalOptions(hDlg, hwndCBSiteSelector);          DestroyWindow(hDlg);          DlgSequencePrev();          break;        case IDC_BUTTON_ADDITIONAL_SETTINGS:          SaveAdditionalOptions(hDlg, hwndCBSiteSelector);          dwWizardState = DLG_PROGRAM_FOLDER;          DestroyWindow(hDlg);          DlgSequenceNext();          break;        case IDCANCEL:          AskCancelDlg(hDlg);          break;        default:          break;      }      break;  }  return(0);}