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.

121 lines
3.3 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. /*******************************************************************************
  3. *
  4. * optdlg.cpp
  5. *
  6. * implementation of COptionsDlg class
  7. *
  8. * copyright notice: Copyright 1995, Citrix Systems Inc.
  9. *
  10. * $Author: butchd $ Butch Davis
  11. *
  12. * $Log: N:\NT\PRIVATE\UTILS\CITRIX\WINUTILS\WINCFG\VCS\OPTDLG.CPP $
  13. *
  14. * Rev 1.2 24 Sep 1996 16:21:50 butchd
  15. * update
  16. *
  17. * Rev 1.1 29 Nov 1995 14:00:48 butchd
  18. * update
  19. *
  20. * Rev 1.0 16 Nov 1995 17:20:50 butchd
  21. * Initial revision.
  22. *
  23. *******************************************************************************/
  24. /*
  25. * include files
  26. */
  27. #include "stdafx.h"
  28. #include "wincfg.h"
  29. #include "optdlg.h"
  30. #ifdef _DEBUG
  31. #undef THIS_FILE
  32. static char BASED_CODE THIS_FILE[] = __FILE__;
  33. #endif
  34. ///////////////////////////////////////////////////////////////////////////////
  35. // COptionsDlg class construction / destruction, implementation
  36. /*******************************************************************************
  37. *
  38. * COptionsDlg - COptionsDlg constructor
  39. *
  40. * ENTRY:
  41. * EXIT:
  42. * (Refer to MFC CDialog::CDialog documentation)
  43. *
  44. ******************************************************************************/
  45. COptionsDlg::COptionsDlg()
  46. : CBaseDialog(COptionsDlg::IDD)
  47. {
  48. //{{AFX_DATA_INIT(COptionsDlg)
  49. //}}AFX_DATA_INIT
  50. }
  51. ////////////////////////////////////////////////////////////////////////////////
  52. // COptionsDlg message map
  53. BEGIN_MESSAGE_MAP(COptionsDlg, CBaseDialog)
  54. //{{AFX_MSG_MAP(COptionsDlg)
  55. //}}AFX_MSG_MAP
  56. END_MESSAGE_MAP()
  57. ////////////////////////////////////////////////////////////////////////////////
  58. // COptionsDlg commands
  59. /*******************************************************************************
  60. *
  61. * OnInitDialog - COptionsDlg member function: command (override)
  62. *
  63. * Performs the dialog intialization.
  64. *
  65. * ENTRY:
  66. * EXIT:
  67. * (Refer to CDialog::OnInitDialog documentation)
  68. *
  69. ******************************************************************************/
  70. BOOL
  71. COptionsDlg::OnInitDialog()
  72. {
  73. CString szString;
  74. TCHAR szFormat[128], szBuffer[128];
  75. /*
  76. * Call the parent classes' OnInitDialog to perform default dialog
  77. * initialization.
  78. */
  79. CBaseDialog::OnInitDialog();
  80. /*
  81. * Set the dialog title.
  82. */
  83. GetWindowText(szString);
  84. szString += AfxGetAppName();
  85. SetWindowText(szString);
  86. /*
  87. * Set the command line switch and description text.
  88. */
  89. GetDlgItemText(IDL_OPTDLG_HELP_SWITCH, szFormat, lengthof(szFormat));
  90. wsprintf(szBuffer, szFormat, HELP_SWITCH, HELP_VALUE);
  91. SetDlgItemText(IDL_OPTDLG_HELP_SWITCH, szBuffer);
  92. GetDlgItemText(IDL_OPTDLG_REGISTRYONLY_SWITCH, szFormat, lengthof(szFormat));
  93. wsprintf(szBuffer, szFormat, REGISTRYONLY_SWITCH, REGISTRYONLY_VALUE);
  94. SetDlgItemText(IDL_OPTDLG_REGISTRYONLY_SWITCH, szBuffer);
  95. GetDlgItemText(IDL_OPTDLG_ADD_SWITCH, szFormat, lengthof(szFormat));
  96. wsprintf(szBuffer, szFormat, ADD_SWITCH, ADD_VALUE);
  97. SetDlgItemText(IDL_OPTDLG_ADD_SWITCH, szBuffer);
  98. GetDlgItemText(IDL_OPTDLG_COUNT_SWITCH, szFormat, lengthof(szFormat));
  99. wsprintf(szBuffer, szFormat, COUNT_SWITCH, COUNT_VALUE);
  100. SetDlgItemText(IDL_OPTDLG_COUNT_SWITCH, szBuffer);
  101. return ( TRUE );
  102. } // end COptionsDlg::OnInitDialog
  103. ////////////////////////////////////////////////////////////////////////////////