Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

634 lines
18 KiB

  1. // LogGenPg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include <iadmw.h>
  5. #include "logui.h"
  6. #include "LogGenPg.h"
  7. #include "wrapmb.h"
  8. #include "metatool.h"
  9. #include <iiscnfg.h>
  10. #include <idlg.h>
  11. #include <shlobj.h>
  12. #include <shlwapi.h>
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18. #define SIZE_MBYTE 1048576
  19. #define MAX_LOGFILE_SIZE 4000
  20. #define MD_LOGFILE_PERIOD_UNLIMITED MD_LOGFILE_PERIOD_HOURLY + 1
  21. //
  22. // Support functions to map & unmap the weird logfile ordering to the UI ordering
  23. //
  24. /////////////////////////////////////////////////////////////////////////////
  25. int MapLogFileTypeToUIIndex(int iLogFileType)
  26. {
  27. int iUIIndex;
  28. switch (iLogFileType)
  29. {
  30. case MD_LOGFILE_PERIOD_HOURLY: iUIIndex = 0; break;
  31. case MD_LOGFILE_PERIOD_DAILY: iUIIndex = 1; break;
  32. case MD_LOGFILE_PERIOD_WEEKLY: iUIIndex = 2; break;
  33. case MD_LOGFILE_PERIOD_MONTHLY: iUIIndex = 3; break;
  34. case MD_LOGFILE_PERIOD_UNLIMITED: iUIIndex = 4; break;
  35. case MD_LOGFILE_PERIOD_NONE: iUIIndex = 5; break;
  36. }
  37. return iUIIndex;
  38. }
  39. /////////////////////////////////////////////////////////////////////////////
  40. int MapUIIndexToLogFileType(int iUIIndex)
  41. {
  42. int iLogFileType;
  43. switch (iUIIndex)
  44. {
  45. case 0: iLogFileType = MD_LOGFILE_PERIOD_HOURLY; break;
  46. case 1: iLogFileType = MD_LOGFILE_PERIOD_DAILY; break;
  47. case 2: iLogFileType = MD_LOGFILE_PERIOD_WEEKLY; break;
  48. case 3: iLogFileType = MD_LOGFILE_PERIOD_MONTHLY; break;
  49. case 4: iLogFileType = MD_LOGFILE_PERIOD_UNLIMITED; break;
  50. case 5: iLogFileType = MD_LOGFILE_PERIOD_NONE; break;
  51. }
  52. return iLogFileType;
  53. }
  54. /////////////////////////////////////////////////////////////////////////////
  55. // CLogGeneral property page
  56. IMPLEMENT_DYNCREATE(CLogGeneral, CPropertyPage)
  57. //--------------------------------------------------------------------------
  58. CLogGeneral::CLogGeneral() : CPropertyPage(CLogGeneral::IDD),
  59. m_fInitialized( FALSE ),
  60. m_pComboLog( NULL ),
  61. m_fLocalMachine( FALSE )
  62. {
  63. //{{AFX_DATA_INIT(CLogGeneral)
  64. m_sz_directory = _T("");
  65. m_sz_filesample = _T("");
  66. m_fShowLocalTimeCheckBox = FALSE;
  67. m_int_period = -1;
  68. //}}AFX_DATA_INIT
  69. m_dwVersionMajor = 5;
  70. m_dwVersionMinor = 1;
  71. m_fIsModified = FALSE;
  72. }
  73. //--------------------------------------------------------------------------
  74. CLogGeneral::~CLogGeneral()
  75. {
  76. }
  77. //--------------------------------------------------------------------------
  78. void CLogGeneral::DoDataExchange(CDataExchange* pDX)
  79. {
  80. CPropertyPage::DoDataExchange(pDX);
  81. //{{AFX_DATA_MAP(CLogGeneral)
  82. DDX_Control(pDX, IDC_LOG_HOURLY, m_wndPeriod);
  83. DDX_Control(pDX, IDC_USE_LOCAL_TIME, m_wndUseLocalTime);
  84. DDX_Control(pDX, IDC_LOG_BROWSE, m_cbttn_browse);
  85. DDX_Control(pDX, IDC_LOG_DIRECTORY, m_cedit_directory);
  86. DDX_Control(pDX, IDC_LOG_SIZE, m_cedit_size);
  87. DDX_Control(pDX, IDC_SPIN, m_cspin_spin);
  88. DDX_Control(pDX, IDC_LOG_SIZE_UNITS, m_cstatic_units);
  89. DDX_Text(pDX, IDC_LOG_DIRECTORY, m_sz_directory);
  90. DDV_MaxChars(pDX, m_sz_directory, MAX_PATH);
  91. DDX_Text(pDX, IDC_LOG_FILE_SAMPLE, m_sz_filesample);
  92. DDX_Check(pDX, IDC_USE_LOCAL_TIME, m_fUseLocalTime);
  93. // DDX_Radio(pDX, IDC_LOG_HOURLY, m_int_period);
  94. //}}AFX_DATA_MAP
  95. DDX_Text(pDX, IDC_LOG_SIZE, m_dword_filesize);
  96. DDV_MinMaxLong(pDX, m_dword_filesize, 0, MAX_LOGFILE_SIZE);
  97. //
  98. // Do the map & unmap between UI Index & Log File Type
  99. //
  100. if (pDX->m_bSaveAndValidate)
  101. {
  102. DDX_Radio(pDX, IDC_LOG_HOURLY, m_int_period);
  103. m_int_period = MapUIIndexToLogFileType(m_int_period);
  104. }
  105. else
  106. {
  107. int iUIIndex = MapLogFileTypeToUIIndex(m_int_period);
  108. DDX_Radio(pDX, IDC_LOG_HOURLY, iUIIndex);
  109. }
  110. }
  111. BEGIN_MESSAGE_MAP(CLogGeneral, CPropertyPage)
  112. //{{AFX_MSG_MAP(CLogGeneral)
  113. ON_BN_CLICKED(IDC_LOG_BROWSE, OnBrowse)
  114. ON_BN_CLICKED(IDC_LOG_DAILY, OnLogDaily)
  115. ON_BN_CLICKED(IDC_LOG_MONTHLY, OnLogMonthly)
  116. ON_BN_CLICKED(IDC_LOG_WHENSIZE, OnLogWhensize)
  117. ON_BN_CLICKED(IDC_LOG_WEEKLY, OnLogWeekly)
  118. ON_EN_CHANGE(IDC_LOG_DIRECTORY, OnChangeLogDirectory)
  119. ON_EN_CHANGE(IDC_LOG_SIZE, OnChangeLogSize)
  120. ON_BN_CLICKED(IDC_LOG_UNLIMITED, OnLogUnlimited)
  121. ON_BN_CLICKED(IDC_LOG_HOURLY, OnLogHourly)
  122. ON_BN_CLICKED(IDC_USE_LOCAL_TIME, OnUseLocalTime)
  123. //}}AFX_MSG_MAP
  124. ON_COMMAND(ID_HELP_FINDER, DoHelp)
  125. ON_COMMAND(ID_HELP, DoHelp)
  126. ON_COMMAND(ID_CONTEXT_HELP, DoHelp)
  127. ON_COMMAND(ID_DEFAULT_HELP, DoHelp)
  128. END_MESSAGE_MAP()
  129. //---------------------------------------------------------------------------
  130. void CLogGeneral::DoHelp()
  131. {
  132. WinHelp( HIDD_LOGUI_GENERIC );
  133. }
  134. HRESULT
  135. CLogGeneral::GetServiceVersion()
  136. {
  137. CError err;
  138. CString info_path;
  139. if (NULL != CMetabasePath::GetServiceInfoPath(m_szMeta, info_path))
  140. {
  141. CComAuthInfo auth;
  142. CMetaKey mk(&auth, info_path, METADATA_PERMISSION_READ);
  143. err = mk.QueryResult();
  144. if (err.Succeeded())
  145. {
  146. err = mk.QueryValue(MD_SERVER_VERSION_MAJOR, m_dwVersionMajor);
  147. if (err.Succeeded())
  148. {
  149. err = mk.QueryValue(MD_SERVER_VERSION_MINOR, m_dwVersionMinor);
  150. }
  151. }
  152. }
  153. else
  154. {
  155. err = E_FAIL;
  156. }
  157. return err;
  158. }
  159. //--------------------------------------------------------------------------
  160. void CLogGeneral::Init()
  161. {
  162. CError err = GetServiceVersion();
  163. if (err.Succeeded())
  164. {
  165. CComAuthInfo auth;
  166. CMetaKey mk(&auth, m_szMeta, METADATA_PERMISSION_READ);
  167. do
  168. {
  169. err = mk.QueryResult();
  170. BREAK_ON_ERR_FAILURE(err);
  171. err = mk.QueryValue(MD_LOGFILE_PERIOD, m_int_period);
  172. BREAK_ON_ERR_FAILURE(err);
  173. err = mk.QueryValue(MD_LOGFILE_TRUNCATE_SIZE, m_dword_filesize);
  174. BREAK_ON_ERR_FAILURE(err);
  175. m_dword_filesize /= SIZE_MBYTE;
  176. if ( (m_dword_filesize > MAX_LOGFILE_SIZE) && (m_int_period == MD_LOGFILE_PERIOD_NONE) )
  177. {
  178. m_int_period = MD_LOGFILE_PERIOD_UNLIMITED;
  179. m_dword_filesize = 512;
  180. }
  181. err = mk.QueryValue(MD_LOGFILE_DIRECTORY, m_sz_directory);
  182. BREAK_ON_ERR_FAILURE(err);
  183. if (m_fShowLocalTimeCheckBox)
  184. {
  185. m_wndUseLocalTime.ShowWindow(SW_SHOW);
  186. if ((MD_LOGFILE_PERIOD_NONE == m_int_period) || (MD_LOGFILE_PERIOD_UNLIMITED == m_int_period))
  187. {
  188. m_wndUseLocalTime.EnableWindow(FALSE);
  189. }
  190. err = mk.QueryValue(MD_LOGFILE_LOCALTIME_ROLLOVER, m_fUseLocalTime);
  191. if (err.Failed())
  192. {
  193. err.Reset();
  194. }
  195. }
  196. UpdateData( FALSE );
  197. UpdateDependants();
  198. UpdateSampleFileString();
  199. m_cbttn_browse.EnableWindow(m_fLocalMachine);
  200. m_cspin_spin.SetRange32(0, MAX_LOGFILE_SIZE);
  201. m_cspin_spin.SetPos(m_dword_filesize);
  202. } while (FALSE);
  203. }
  204. #if defined(_DEBUG) || DBG
  205. err.MessageBoxOnFailure();
  206. #endif
  207. }
  208. //--------------------------------------------------------------------------
  209. void CLogGeneral::UpdateDependants()
  210. {
  211. UpdateData();
  212. BOOL fEnable = (m_int_period == MD_LOGFILE_PERIOD_MAXSIZE);
  213. m_cspin_spin.EnableWindow(fEnable);
  214. m_cstatic_units.EnableWindow(fEnable);
  215. m_cedit_size.EnableWindow(fEnable);
  216. }
  217. //--------------------------------------------------------------------------
  218. // update the sample file stirng
  219. void CLogGeneral::UpdateSampleFileString()
  220. {
  221. CString szSample;
  222. UpdateData( TRUE );
  223. // ok first we have to generate a string to show what sub-node the logging stuff
  224. // is going to go into. This would be of the general form of the name of the server
  225. // followed by the virtual node of the server. Example: LM/W3SVC/1 would
  226. // become "W3SVC1/example" Unfortunately, all we have to build this thing out of
  227. // is the target metabase path. So we strip off the preceding LM/. Then we find the
  228. // next / character and take the number that follows it. If we are editing the
  229. // master root properties then there will be no slash/number at the end at which point
  230. // we can just append a capital X character to signifiy this. The MMC is currently set
  231. // up to only show the logging properties if we are editing the master props or a virtual
  232. // server, so we shouldn't have to worry about stuff after the virtual server number
  233. // get rid of the preceding LM/ (Always three characters)
  234. m_sz_filesample = m_szMeta.Right( m_szMeta.GetLength() - 3 );
  235. // Find the location of the '/' character
  236. INT iSlash = m_sz_filesample.Find( _T('/') );
  237. // if there was no last slash, then append the X, otherwise append the number
  238. if ( iSlash < 0 )
  239. {
  240. m_sz_filesample += _T('X');
  241. }
  242. else
  243. {
  244. m_sz_filesample = m_sz_filesample.Left(iSlash) +
  245. m_sz_filesample.Right( m_sz_filesample.GetLength() - (iSlash+1) );
  246. }
  247. // add a final path type slash to signify that it is a partial path
  248. m_sz_filesample += _T('\\');
  249. // build the sample string
  250. switch( m_int_period )
  251. {
  252. case MD_LOGFILE_PERIOD_MAXSIZE:
  253. m_sz_filesample += szSizePrefix;
  254. szSample.LoadString( IDS_LOG_SIZE_FILESAMPLE );
  255. break;
  256. case MD_LOGFILE_PERIOD_DAILY:
  257. m_sz_filesample += szPrefix;
  258. szSample.LoadString( IDS_LOG_DAILY_FILESAMPLE );
  259. break;
  260. case MD_LOGFILE_PERIOD_WEEKLY:
  261. m_sz_filesample += szPrefix;
  262. szSample.LoadString( IDS_LOG_WEEKLY_FILESAMPLE );
  263. break;
  264. case MD_LOGFILE_PERIOD_MONTHLY:
  265. m_sz_filesample += szPrefix;
  266. szSample.LoadString( IDS_LOG_MONTHLY_FILESAMPLE );
  267. break;
  268. case MD_LOGFILE_PERIOD_HOURLY:
  269. m_sz_filesample += szPrefix;
  270. szSample.LoadString( IDS_LOG_HOURLY_FILE_SAMPLE );
  271. break;
  272. case MD_LOGFILE_PERIOD_UNLIMITED:
  273. m_sz_filesample += szSizePrefix;
  274. szSample.LoadString( IDS_LOG_UNLIMITED_FILESAMPLE );
  275. break;
  276. };
  277. // add the two together
  278. m_sz_filesample += szSample;
  279. // update the display
  280. UpdateData( FALSE );
  281. }
  282. /////////////////////////////////////////////////////////////////////////////
  283. // CLogGeneral message handlers
  284. //--------------------------------------------------------------------------
  285. BOOL CLogGeneral::OnSetActive()
  286. {
  287. // if this is the first time, inititalize the dialog
  288. if (!m_fInitialized)
  289. {
  290. Init();
  291. m_fInitialized = TRUE;
  292. }
  293. return CPropertyPage::OnSetActive();
  294. }
  295. //--------------------------------------------------------------------------
  296. BOOL CLogGeneral::OnApply()
  297. {
  298. if (m_fIsModified)
  299. {
  300. UpdateData();
  301. if (!PathIsValid(m_sz_directory))
  302. {
  303. AfxMessageBox(IDS_NEED_DIRECTORY);
  304. return FALSE;
  305. }
  306. if (m_fLocalMachine)
  307. {
  308. CString expanded;
  309. ExpandEnvironmentStrings(m_sz_directory, expanded.GetBuffer(MAX_PATH), MAX_PATH);
  310. if (PathIsNetworkPath(expanded))
  311. {
  312. if (m_dwVersionMajor < 6)
  313. {
  314. AfxMessageBox(IDS_REMOTE_NOT_SUPPORTED);
  315. return FALSE;
  316. }
  317. goto Verified;
  318. }
  319. if (PathIsRelative(expanded))
  320. {
  321. AfxMessageBox(IDS_NO_RELATIVE_PATH);
  322. return FALSE;
  323. }
  324. if (!PathIsDirectory(expanded))
  325. {
  326. AfxMessageBox(IDS_NOT_DIR_EXIST);
  327. return FALSE;
  328. }
  329. }
  330. Verified:
  331. CComAuthInfo auth;
  332. CError err;
  333. CList<DWORD, DWORD> mdlist;
  334. do
  335. {
  336. CMetaKey mk(&auth, m_szMeta, METADATA_PERMISSION_WRITE);
  337. err = mk.QueryResult();
  338. BREAK_ON_ERR_FAILURE(err);
  339. err = mk.SetValue(MD_LOGFILE_PERIOD,
  340. m_int_period == MD_LOGFILE_PERIOD_UNLIMITED ? MD_LOGFILE_PERIOD_NONE : m_int_period);
  341. BREAK_ON_ERR_FAILURE(err);
  342. mdlist.AddTail(MD_LOGFILE_PERIOD);
  343. err = mk.SetValue(MD_LOGFILE_TRUNCATE_SIZE,
  344. m_int_period == MD_LOGFILE_PERIOD_UNLIMITED ? 0xFFFFFFFF : m_dword_filesize * SIZE_MBYTE);
  345. BREAK_ON_ERR_FAILURE(err);
  346. mdlist.AddTail(MD_LOGFILE_TRUNCATE_SIZE);
  347. err = mk.SetValue(MD_LOGFILE_DIRECTORY, m_sz_directory);
  348. BREAK_ON_ERR_FAILURE(err);
  349. mdlist.AddTail(MD_LOGFILE_DIRECTORY);
  350. if (m_fShowLocalTimeCheckBox)
  351. {
  352. err = mk.SetValue(MD_LOGFILE_LOCALTIME_ROLLOVER, m_fUseLocalTime);
  353. BREAK_ON_ERR_FAILURE(err);
  354. mdlist.AddTail(MD_LOGFILE_LOCALTIME_ROLLOVER);
  355. }
  356. } while(FALSE);
  357. // Check inheritance
  358. if (!mdlist.IsEmpty())
  359. {
  360. POSITION pos = mdlist.GetHeadPosition();
  361. while (pos)
  362. {
  363. DWORD id = mdlist.GetNext(pos);
  364. {
  365. CInheritanceDlg dlg(id, TRUE, &auth, m_szMeta);
  366. if (!dlg.IsEmpty())
  367. {
  368. dlg.DoModal();
  369. }
  370. }
  371. }
  372. }
  373. }
  374. return CPropertyPage::OnApply();
  375. }
  376. //--------------------------------------------------------------------------
  377. static int CALLBACK
  378. FileChooserCallback(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
  379. {
  380. CLogGeneral * pThis = (CLogGeneral *)lpData;
  381. ASSERT(pThis != NULL);
  382. return pThis->BrowseForFolderCallback(hwnd, uMsg, lParam);
  383. }
  384. int
  385. CLogGeneral::BrowseForFolderCallback(HWND hwnd, UINT uMsg, LPARAM lParam)
  386. {
  387. BOOL bNetwork;
  388. switch (uMsg)
  389. {
  390. case BFFM_INITIALIZED:
  391. ASSERT(m_pPathTemp != NULL);
  392. bNetwork = ::PathIsNetworkPath(m_pPathTemp);
  393. if (m_dwVersionMajor >= 6 && bNetwork)
  394. return 0;
  395. if (m_fLocalMachine && !bNetwork)
  396. {
  397. while (!::PathIsDirectory(m_pPathTemp))
  398. {
  399. if (0 == ::PathRemoveFileSpec(m_pPathTemp) && !::PathIsRoot(m_pPathTemp))
  400. {
  401. return 0;
  402. }
  403. DWORD attr = GetFileAttributes(m_pPathTemp);
  404. if ((attr & FILE_ATTRIBUTE_READONLY) == 0)
  405. break;
  406. }
  407. ::SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)m_pPathTemp);
  408. }
  409. break;
  410. case BFFM_SELCHANGED:
  411. {
  412. LPITEMIDLIST pidl = (LPITEMIDLIST)lParam;
  413. TCHAR path[MAX_PATH];
  414. if (SHGetPathFromIDList(pidl, path))
  415. {
  416. LPTSTR pPrefix = NULL;
  417. if (m_dwVersionMajor >= 6 && PathCommonPrefix(m_NetHood, path, pPrefix))
  418. {
  419. ::SendMessage(hwnd, BFFM_ENABLEOK, 0, FALSE);
  420. }
  421. if (m_dwVersionMajor < 6)
  422. {
  423. ::SendMessage(hwnd, BFFM_ENABLEOK, 0, !PathIsNetworkPath(path));
  424. }
  425. }
  426. else
  427. {
  428. ::SendMessage(hwnd, BFFM_ENABLEOK, 0, FALSE);
  429. }
  430. }
  431. break;
  432. case BFFM_VALIDATEFAILED:
  433. break;
  434. }
  435. return 0;
  436. }
  437. void CLogGeneral::OnBrowse()
  438. {
  439. BOOL bRes = FALSE;
  440. HRESULT hr;
  441. CString str;
  442. m_cedit_directory.GetWindowText(str);
  443. if (SUCCEEDED(hr = CoInitialize(NULL)))
  444. {
  445. LPITEMIDLIST pidl = NULL;
  446. int csidl = m_dwVersionMajor >= 6 ? CSIDL_DESKTOP : CSIDL_DRIVES;
  447. if (SUCCEEDED(SHGetFolderLocation(NULL, csidl, NULL, 0, &pidl)))
  448. {
  449. LPITEMIDLIST pidList = NULL;
  450. BROWSEINFO bi;
  451. TCHAR buf[MAX_PATH];
  452. ZeroMemory(&bi, sizeof(bi));
  453. int drive = PathGetDriveNumber(str);
  454. if (GetDriveType(PathBuildRoot(buf, drive)) == DRIVE_FIXED)
  455. {
  456. StrCpy(buf, str);
  457. }
  458. else
  459. {
  460. buf[0] = 0;
  461. }
  462. bi.hwndOwner = m_hWnd;
  463. bi.pidlRoot = pidl;
  464. bi.pszDisplayName = m_pPathTemp = buf;
  465. bi.lpszTitle = NULL;
  466. bi.ulFlags |= BIF_NEWDIALOGSTYLE;
  467. if (m_dwVersionMajor < 6)
  468. {
  469. bi.ulFlags |= BIF_RETURNONLYFSDIRS;
  470. }
  471. else
  472. {
  473. bi.ulFlags |= BIF_SHAREABLE;
  474. }
  475. bi.lpfn = FileChooserCallback;
  476. bi.lParam = (LPARAM)this;
  477. // Get NetHood folder location
  478. SHGetFolderPath(NULL, CSIDL_NETHOOD, NULL, SHGFP_TYPE_CURRENT, m_NetHood.GetBuffer(MAX_PATH));
  479. m_NetHood.ReleaseBuffer();
  480. pidList = SHBrowseForFolder(&bi);
  481. if (pidList != NULL && SHGetPathFromIDList(pidList, buf))
  482. {
  483. str = buf;
  484. bRes = TRUE;
  485. }
  486. IMalloc * pMalloc;
  487. VERIFY(SUCCEEDED(SHGetMalloc(&pMalloc)));
  488. if (pidl != NULL)
  489. pMalloc->Free(pidl);
  490. pMalloc->Release();
  491. }
  492. CoUninitialize();
  493. }
  494. if (bRes)
  495. {
  496. m_cedit_directory.SetWindowText(str);
  497. }
  498. }
  499. //--------------------------------------------------------------------------
  500. void CLogGeneral::OnLogDaily()
  501. {
  502. m_wndUseLocalTime.EnableWindow(TRUE);
  503. UpdateDependants();
  504. UpdateSampleFileString();
  505. SetModified();
  506. m_fIsModified = TRUE;
  507. }
  508. //--------------------------------------------------------------------------
  509. void CLogGeneral::OnLogMonthly()
  510. {
  511. m_wndUseLocalTime.EnableWindow(TRUE);
  512. UpdateDependants();
  513. UpdateSampleFileString();
  514. SetModified();
  515. m_fIsModified = TRUE;
  516. }
  517. //--------------------------------------------------------------------------
  518. void CLogGeneral::OnLogWhensize()
  519. {
  520. m_wndUseLocalTime.EnableWindow(FALSE);
  521. UpdateDependants();
  522. UpdateSampleFileString();
  523. SetModified();
  524. m_fIsModified = TRUE;
  525. }
  526. //--------------------------------------------------------------------------
  527. void CLogGeneral::OnLogUnlimited()
  528. {
  529. m_wndUseLocalTime.EnableWindow(FALSE);
  530. UpdateDependants();
  531. UpdateSampleFileString();
  532. SetModified();
  533. m_fIsModified = TRUE;
  534. }
  535. //--------------------------------------------------------------------------
  536. void CLogGeneral::OnLogWeekly()
  537. {
  538. m_wndUseLocalTime.EnableWindow(TRUE);
  539. UpdateDependants();
  540. UpdateSampleFileString();
  541. SetModified();
  542. m_fIsModified = TRUE;
  543. }
  544. //--------------------------------------------------------------------------
  545. void CLogGeneral::OnLogHourly()
  546. {
  547. m_wndUseLocalTime.EnableWindow(TRUE);
  548. UpdateDependants();
  549. UpdateSampleFileString();
  550. SetModified();
  551. m_fIsModified = TRUE;
  552. }
  553. //--------------------------------------------------------------------------
  554. void CLogGeneral::OnChangeLogDirectory()
  555. {
  556. SetModified();
  557. m_fIsModified = TRUE;
  558. }
  559. //--------------------------------------------------------------------------
  560. void CLogGeneral::OnChangeLogSize()
  561. {
  562. SetModified();
  563. m_fIsModified = TRUE;
  564. }
  565. //--------------------------------------------------------------------------
  566. void CLogGeneral::OnUseLocalTime()
  567. {
  568. SetModified();
  569. m_fIsModified = TRUE;
  570. }