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.

100 lines
2.0 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 2000
  4. *
  5. * TITLE: Prevpg.cpp
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: KeisukeT
  10. *
  11. * DATE: 27 Mar, 2000
  12. *
  13. * DESCRIPTION:
  14. * Dummy page for the case user push BACK button in device selection page.
  15. *
  16. *******************************************************************************/
  17. //
  18. // Precompiled header
  19. //
  20. #include "precomp.h"
  21. #pragma hdrstop
  22. #include "prevpg.h"
  23. CPrevSelectPage::CPrevSelectPage(PINSTALLER_CONTEXT pInstallerContext) :
  24. CInstallWizardPage(pInstallerContext, IDD_DYNAWIZ_SELECT_PREVPAGE)
  25. {
  26. //
  27. // Set link to previous/next page. This page should show up.
  28. //
  29. m_uPreviousPage = 0;
  30. m_uNextPage = 0;
  31. //
  32. // Initialize member.
  33. //
  34. m_pInstallerContext = pInstallerContext;
  35. }
  36. BOOL
  37. CPrevSelectPage::OnNotify(
  38. LPNMHDR lpnmh
  39. )
  40. {
  41. BOOL bRet;
  42. if(lpnmh->code == PSN_SETACTIVE) {
  43. LONG_PTR lNextPage;
  44. //
  45. // User clicked BACK button in devlce selection page. Just skip to First
  46. // page or Class selection page if it's invoked from Hardware Wizard.
  47. //
  48. if(m_pInstallerContext->bCalledFromControlPanal){
  49. //
  50. // Called from Control Panel. Goto first page.
  51. //
  52. lNextPage = IDD_DYNAWIZ_FIRSTPAGE;
  53. } else {
  54. //
  55. // Called from hardware wizard. Goto Class selection page.
  56. //
  57. lNextPage = IDD_DYNAWIZ_SELECTCLASS_PAGE;
  58. } // if(m_pInstallerContext->bCalledFromControlPanal)
  59. //
  60. // Skip to next page.
  61. //
  62. SetWindowLongPtr(m_hwnd, DWLP_MSGRESULT, lNextPage);
  63. //
  64. // Default handler isn't needed.
  65. //
  66. bRet = TRUE;
  67. goto OnNotify_return;
  68. } // if(lpnmh->code == PSN_SETACTIVE)
  69. //
  70. // Let default handler do its job.
  71. //
  72. bRet = FALSE;
  73. OnNotify_return:
  74. return bRet;
  75. } // CPrevSelectPage::OnNotify