00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "precomp.h"
00028 #include "CCLicenseWizSamplingPage.h"
00029
00033 BOOL CCLicenseWizSamplingPage::OnSetActive()
00034 {
00035
00036 if (m_pLicenseInfo->m_eSampling != LicenseInfo::STUnknown)
00037
00038 CheckRadioButton(m_hDlg, IDC_SAMPLING, IDC_SAMPLING_NC, IDC_SAMPLING + (int)m_pLicenseInfo->m_eSampling);
00039
00040
00041 UpdateControls();
00042 return TRUE;
00043 }
00044
00048 BOOL CCLicenseWizSamplingPage::OnKillActive()
00049 {
00050
00051 int nSel = GetCheckedRadioBtn(IDC_SAMPLING, IDC_SAMPLING_NC);
00052 if (nSel == -1)
00053
00054 m_pLicenseInfo->m_eSampling = LicenseInfo::STUnknown;
00055 else
00056
00057 m_pLicenseInfo->m_eSampling = (LicenseInfo::SamplingType)nSel;
00058
00059
00060 return (nSel != -1);
00061 }
00062
00066 int CCLicenseWizSamplingPage::OnWizNext()
00067 {
00068 return IDD_LICENSEPAGE_JURISDICTION;
00069 }
00070
00074 int CCLicenseWizSamplingPage::OnWizBack()
00075 {
00076 return IDD_LICENSEPAGE_TYPE;
00077 }
00078
00085 BOOL CCLicenseWizSamplingPage::PageProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
00086 {
00087 switch (uMsg)
00088 {
00089 case WM_COMMAND:
00090
00091 if (HIWORD(wParam) == BN_CLICKED)
00092 {
00093 UINT uID = LOWORD(wParam);
00094 if ((uID >= IDC_SAMPLING) && (uID <= IDC_SAMPLING_NC))
00095 {
00096
00097 UpdateControls();
00098 return TRUE;
00099 }
00100 }
00101 break;
00102 case WM_INITDIALOG:
00103
00104 SetDescriptionFromField(LicenseInfo::LLDTSampling, _T("sampling"));
00105 break;
00106 }
00107
00108 return CCLicenseWizBasePage::PageProc(uMsg, wParam, lParam);
00109 }
00110
00114 void CCLicenseWizSamplingPage::UpdateControls()
00115 {
00116
00117 int nSel = GetCheckedRadioBtn(IDC_SAMPLING, IDC_SAMPLING_NC);
00118 if (nSel == -1)
00119 {
00120
00121 SetWizardButtons(PSWIZB_BACK);
00122 }
00123 else
00124 {
00125
00126 SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
00127 }
00128 }
00129
00134 bool CCLicenseWizSamplingPage::PreparePage(PROPSHEETPAGE& page)
00135 {
00136
00137 if (!CCLicenseWizBasePage::PreparePage(page))
00138 return false;
00139
00140
00141 page.dwFlags |= PSP_USEHEADERTITLE;
00142 page.pszHeaderTitle = MAKEINTRESOURCE(IDS_TITLE_LICENSE_SAMPLING);
00143 return true;
00144 }