Leaked source code of windows server 2003
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.

134 lines
4.0 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1994 **
  4. //*********************************************************************
  5. //
  6. // SERVERR.CPP - Functions for server error page
  7. //
  8. // HISTORY:
  9. //
  10. // 08/05/98 vyung created
  11. //
  12. //*********************************************************************
  13. #include "pre.h"
  14. extern BOOL g_bSkipSelPage;
  15. extern int iNumOfAutoConfigOffers;
  16. /*******************************************************************
  17. NAME: ACfgNoofferInitProc
  18. SYNOPSIS: Called when page is displayed
  19. ENTRY: hDlg - dialog window
  20. fFirstInit - TRUE if this is the first time the dialog
  21. is initialized, FALSE if this InitProc has been called
  22. before (e.g. went past this page and backed up)
  23. ********************************************************************/
  24. BOOL CALLBACK ACfgNoofferInitProc
  25. (
  26. HWND hDlg,
  27. BOOL fFirstInit,
  28. UINT *puNextPage
  29. )
  30. {
  31. BOOL bRet = TRUE;
  32. if (fFirstInit)
  33. {
  34. TCHAR szTemp[MAX_MESSAGE_LEN];
  35. // If user selected Other on the previous page.
  36. if (iNumOfAutoConfigOffers > 0)
  37. {
  38. LoadString(ghInstanceResDll, IDS_AUTOCFG_EXPLAIN_OTHER, szTemp, MAX_MESSAGE_LEN);
  39. SetWindowText(GetDlgItem(hDlg, IDC_AUTOCFG_NOOFFER1), szTemp);
  40. }
  41. else
  42. {
  43. if (gpWizardState->bISDNMode)
  44. {
  45. LoadString(ghInstanceResDll, IDS_ISDN_AUTOCFG_NOOFFER1, szTemp, MAX_MESSAGE_LEN);
  46. SetWindowText(GetDlgItem(hDlg, IDC_AUTOCFG_NOOFFER1), szTemp);
  47. TCHAR* pszParagraph = new TCHAR[MAX_MESSAGE_LEN * 2];
  48. if (pszParagraph)
  49. {
  50. LoadString(ghInstanceResDll, IDS_ISDN_AUTOCFG_NOOFFER2, pszParagraph, MAX_MESSAGE_LEN * 2);
  51. LoadString(ghInstanceResDll, IDS_ISDN_AUTOCFG_NOOFFER3, szTemp, ARRAYSIZE(szTemp));
  52. lstrcat(pszParagraph, szTemp);
  53. SetWindowText(GetDlgItem(hDlg, IDC_AUTOCFG_NOOFFER2), pszParagraph);
  54. delete [] pszParagraph;
  55. }
  56. }
  57. else
  58. {
  59. LoadString(ghInstanceResDll, IDS_AUTOCFG_NOOFFER1, szTemp, MAX_MESSAGE_LEN);
  60. SetWindowText(GetDlgItem(hDlg, IDC_AUTOCFG_NOOFFER1), szTemp);
  61. }
  62. }
  63. }
  64. else
  65. {
  66. // if we've travelled through external apprentice pages,
  67. // it's easy for our current page pointer to get munged,
  68. // so reset it here for sanity's sake.
  69. gpWizardState->uCurrentPage = ORD_PAGE_ISP_AUTOCONFIG_NOOFFER;
  70. }
  71. return bRet;
  72. }
  73. /*******************************************************************
  74. NAME: ACfgNoofferOKProc
  75. SYNOPSIS: Called when Next or Back btns pressed from page
  76. ENTRY: hDlg - dialog window
  77. fForward - TRUE if 'Next' was pressed, FALSE if 'Back'
  78. puNextPage - if 'Next' was pressed,
  79. proc can fill this in with next page to go to. This
  80. parameter is ingored if 'Back' was pressed.
  81. pfKeepHistory - page will not be kept in history if
  82. proc fills this in with FALSE.
  83. EXIT: returns TRUE to allow page to be turned, FALSE
  84. to keep the same page.
  85. ********************************************************************/
  86. BOOL CALLBACK ACfgNoofferOKProc
  87. (
  88. HWND hDlg,
  89. BOOL fForward,
  90. UINT *puNextPage,
  91. BOOL *pfKeepHistory
  92. )
  93. {
  94. ASSERT(puNextPage);
  95. if (fForward)
  96. {
  97. // go to the manual phone page
  98. *pfKeepHistory = FALSE;
  99. if (iNumOfAutoConfigOffers > 0)
  100. {
  101. g_bSkipSelPage = TRUE;
  102. }
  103. gpWizardState->cmnStateData.bPhoneManualWiz = TRUE;
  104. *puNextPage = g_uExternUINext;
  105. }
  106. return TRUE;
  107. }