case DLG_SELECT_ADDITIONAL_COMPONENTS: dwWizardState = DLG_SELECT_COMPONENTS; gbProcessingXpnstallFiles = FALSE; if(diSelectComponents.bShowDialog) hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diSelectComponents.szTitle, DlgProcSelectComponents); else PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0); break;
case DLG_SELECT_ADDITIONAL_COMPONENTS: dwWizardState = DLG_SELECT_COMPONENTS; gbProcessingXpnstallFiles = FALSE; if(diSelectComponents.bShowDialog) { hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diSelectComponents.szTitle, DlgProcSelectComponents); bDone = TRUE; } break;
void DlgSequencePrev(){  switch(dwWizardState)  {    case DLG_START_INSTALL:      dwWizardState = DLG_ADVANCED_SETTINGS;      gbProcessingXpnstallFiles = FALSE;      if(diAdvancedSettings.bShowDialog)        hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diAdvancedSettings.szTitle, DlgProcAdvancedSettings);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    case DLG_ADVANCED_SETTINGS:      dwWizardState = DLG_DOWNLOAD_OPTIONS;      gbProcessingXpnstallFiles = FALSE;      if((diDownloadOptions.bShowDialog == TRUE) && (GetTotalArchivesToDownload() > 0))        hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diDownloadOptions.szTitle, DlgProcDownloadOptions);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    case DLG_DOWNLOAD_OPTIONS:      dwWizardState = DLG_PROGRAM_FOLDER;      gbProcessingXpnstallFiles = FALSE;      if(CheckWizardStateCustom(DLG_SELECT_COMPONENTS))      {        if(diProgramFolder.bShowDialog)          hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diProgramFolder.szTitle, DlgProcProgramFolder);        else          PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      }      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    case DLG_PROGRAM_FOLDER:      dwWizardState = DLG_WINDOWS_INTEGRATION;      gbProcessingXpnstallFiles = FALSE;      if(diWindowsIntegration.bShowDialog)        hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diWindowsIntegration.szTitle, DlgProcWindowsIntegration);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    case DLG_WINDOWS_INTEGRATION:      dwWizardState = DLG_SELECT_ADDITIONAL_COMPONENTS;      gbProcessingXpnstallFiles = FALSE;      if((diSelectAdditionalComponents.bShowDialog) && (GetAdditionalComponentsCount() > 0))        hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diSelectAdditionalComponents.szTitle, DlgProcSelectAdditionalComponents);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    case DLG_SELECT_ADDITIONAL_COMPONENTS:      dwWizardState = DLG_SELECT_COMPONENTS;      gbProcessingXpnstallFiles = FALSE;      if(diSelectComponents.bShowDialog)        hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diSelectComponents.szTitle, DlgProcSelectComponents);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    case DLG_SELECT_COMPONENTS:      dwWizardState = DLG_SETUP_TYPE;      gbProcessingXpnstallFiles = FALSE;      if(diSetupType.bShowDialog)        hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diSetupType.szTitle, DlgProcSetupType);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    case DLG_SETUP_TYPE:      dwWizardState = DLG_LICENSE;      gbProcessingXpnstallFiles = FALSE;      if(diLicense.bShowDialog)        hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diLicense.szTitle, DlgProcLicense);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    case DLG_LICENSE:      dwWizardState = DLG_WELCOME;      gbProcessingXpnstallFiles = FALSE;      if(diWelcome.bShowDialog)        hDlgCurrent = InstantiateDialog(hWndMain, dwWizardState, diWelcome.szTitle, DlgProcWelcome);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;    default:      dwWizardState = DLG_WELCOME;      gbProcessingXpnstallFiles = FALSE;      if(diWelcome.bShowDialog)        hDlgCurrent = InstantiateDialog(hWndMain, DLG_WELCOME, diWelcome.szTitle, DlgProcWelcome);      else        PostMessage(hWndMain, WM_COMMAND, IDWIZBACK, 0);      break;  }}