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.

77 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: profdesc.cpp
  7. //
  8. // Contents: implementation of CSetProfileDescription
  9. //
  10. //----------------------------------------------------------------------------
  11. #include "stdafx.h"
  12. #include "wsecmgr.h"
  13. #include "cookie.h"
  14. #include "snapmgr.h"
  15. #include "profdesc.h"
  16. #include "util.h"
  17. #ifdef _DEBUG
  18. #define new DEBUG_NEW
  19. #undef THIS_FILE
  20. static char THIS_FILE[] = __FILE__;
  21. #endif
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CSetProfileDescription dialog
  24. CSetProfileDescription::CSetProfileDescription()
  25. : CHelpDialog(a218HelpIDs, IDD, 0)
  26. {
  27. //{{AFX_DATA_INIT(CSetProfileDescription)
  28. m_strDesc = _T("");
  29. //}}AFX_DATA_INIT
  30. }
  31. void CSetProfileDescription::DoDataExchange(CDataExchange* pDX)
  32. {
  33. CDialog::DoDataExchange(pDX);
  34. //{{AFX_DATA_MAP(CSetProfileDescription)
  35. DDX_Text(pDX, IDC_DESCRIPTION, m_strDesc);
  36. //}}AFX_DATA_MAP
  37. }
  38. BEGIN_MESSAGE_MAP(CSetProfileDescription, CHelpDialog)
  39. //{{AFX_MSG_MAP(CSetProfileDescription)
  40. //}}AFX_MSG_MAP
  41. END_MESSAGE_MAP()
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CSetProfileDescription message handlers
  44. void CSetProfileDescription::OnOK()
  45. {
  46. UpdateData(TRUE);
  47. //
  48. // empty the description section first.
  49. //
  50. CEditTemplate *pet;
  51. LPCTSTR szInfFile;
  52. szInfFile = m_pFolder->GetInfFile();
  53. if (szInfFile) {
  54. pet = m_pCDI->GetTemplate(szInfFile);
  55. pet->SetDescription(m_strDesc);
  56. }
  57. m_pFolder->SetDesc(m_strDesc);
  58. DestroyWindow();
  59. }
  60. void CSetProfileDescription::OnCancel()
  61. {
  62. DestroyWindow();
  63. }