if(IsDlgButtonChecked(hDlg, IDC_USE_FTP) == BST_CHECKED) diDownloadOptions.dwUseProtocol = UP_FTP; else if(IsDlgButtonChecked(hDlg, IDC_USE_HTTP) == BST_CHECKED) diDownloadOptions.dwUseProtocol = UP_HTTP;
void SaveDownloadOptions(HWND hDlg, HWND hwndCBSiteSelector){  int iIndex;  /* get selected item from the site selector's pull down list */  iIndex = SendMessage(hwndCBSiteSelector, CB_GETCURSEL, 0, 0);  SendMessage(hwndCBSiteSelector, CB_GETLBTEXT, (WPARAM)iIndex, (LPARAM)szSiteSelectorDescription);  /* get the state of the Save Installer Files checkbox */  if(IsDlgButtonChecked(hDlg, IDC_CHECK_SAVE_INSTALLER_FILES) == BST_CHECKED)    diDownloadOptions.bSaveInstaller = TRUE;  else    diDownloadOptions.bSaveInstaller = FALSE;  if(IsDlgButtonChecked(hDlg, IDC_USE_FTP) == BST_CHECKED)    diDownloadOptions.dwUseProtocol = UP_FTP;  else if(IsDlgButtonChecked(hDlg, IDC_USE_HTTP) == BST_CHECKED)    diDownloadOptions.dwUseProtocol = UP_HTTP;}