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 "CCLicenseWizBasePage.h"
00029
00030 #include "resource.h"
00031 #include <winuser.h>
00032
00037 void CCLicenseWizBasePage::SetDescriptionFromField(LicenseInfo::LoadedLicenseDataType eType, LPCTSTR lpName)
00038 {
00039
00040 std::tstring sDescription;
00041 const LPXNode pNode = LicenseInfoLoader::GetLicenseXML(eType).Find(_T("field"), lpName);
00042 if (pNode != NULL)
00043 {
00044
00045 const LPXNode pDescription = pNode->GetChild(_T("description"));
00046 if (pDescription != NULL)
00047 {
00048
00049 DISP_OPT opt;
00050 opt.reference_value = false;
00051 sDescription = pDescription->GetText(&opt);
00052 }
00053 }
00054
00055 SetDlgItemText(IDC_DESCRIPTION, (RemoveHtmlTags(sDescription)).c_str());
00056 }
00057
00064 BOOL CCLicenseWizBasePage::PageProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
00065 {
00066
00067 if (uMsg == WM_NOTIFY)
00068 {
00069 NMHDR* pNMHdr = (NMHDR*)lParam;
00070
00071 switch (pNMHdr->code)
00072 {
00073 case PSN_SETACTIVE:
00074
00075 if (OnSetActive())
00076
00077 SetWindowLong(DWLP_MSGRESULT, 0);
00078 else
00079
00080 SetWindowLong(DWLP_MSGRESULT, -1);
00081 return TRUE;
00082 case PSN_WIZNEXT:
00083
00084 SetWindowLong(DWLP_MSGRESULT, OnWizNext());
00085 return TRUE;
00086 case PSN_WIZBACK:
00087
00088 SetWindowLong(DWLP_MSGRESULT, OnWizBack());
00089 return TRUE;
00090 case PSN_WIZFINISH:
00091
00092 SetWindowLong(DWLP_MSGRESULT, !OnWizFinish());
00093 return TRUE;
00094 case PSN_KILLACTIVE:
00095
00096 if (OnKillActive())
00097
00098 SetWindowLong(DWLP_MSGRESULT, FALSE);
00099 else
00100
00101 SetWindowLong(DWLP_MSGRESULT, TRUE);
00102 return TRUE;
00103 }
00104 }
00105
00106
00107 return FALSE;
00108 }
00109
00113 void CCLicenseWizBasePage::SetWizardButtons(DWORD dwFlags)
00114 {
00115 PropSheet_SetWizButtons(GetParent(m_hDlg), dwFlags);
00116 }