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.

124 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. CheckingPage.cpp
  5. Abstract:
  6. Functions for "Version Checking" page of the wizard.
  7. Author:
  8. Sergey Kuzin (a-skuzin@microsoft.com) 09-August-1999
  9. Environment:
  10. Revision History:
  11. --*/
  12. #include "tsverui.h"
  13. #include "resource.h"
  14. /*++
  15. Routine Description :
  16. dialog box procedure for the "Constraints" page.
  17. Arguments :
  18. IN HWND hwndDlg - handle to dialog box.
  19. IN UINT uMsg - message to be acted upon.
  20. IN WPARAM wParam - value specific to wMsg.
  21. IN LPARAM lParam - value specific to wMsg.
  22. Return Value :
  23. TRUE if it processed the message
  24. FALSE if it did not.
  25. --*/
  26. INT_PTR CALLBACK
  27. CheckingPageProc (
  28. HWND hwndDlg,
  29. UINT uMsg,
  30. WPARAM wParam,
  31. LPARAM lParam)
  32. {
  33. //Retrieve the shared user data from GWL_USERDATA
  34. LPSHAREDWIZDATA pdata = (LPSHAREDWIZDATA) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
  35. switch (uMsg)
  36. {
  37. case WM_INITDIALOG :
  38. {
  39. //Get the shared data from PROPSHEETPAGE lParam value
  40. //and load it into GWL_USERDATA
  41. pdata = (LPSHAREDWIZDATA) ((LPPROPSHEETPAGE) lParam) -> lParam;
  42. SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR) pdata);
  43. if (CheckForRegKey(HKEY_LOCAL_MACHINE, szKeyPath, KeyName[DLLNAME]))
  44. {
  45. CheckRadioButton(hwndDlg,IDC_ENABLE_CHECKING,IDC_DISABLE_CHECKING,
  46. IDC_ENABLE_CHECKING);
  47. } else {
  48. CheckRadioButton(hwndDlg,IDC_ENABLE_CHECKING,IDC_DISABLE_CHECKING,
  49. IDC_DISABLE_CHECKING);
  50. }
  51. break;
  52. }
  53. case WM_NOTIFY :
  54. {
  55. LPNMHDR lpnm = (LPNMHDR) lParam;
  56. switch (lpnm->code)
  57. {
  58. case PSN_SETACTIVE : //Enable the Next button
  59. if(pdata->bNoWellcome){
  60. PropSheet_SetWizButtons( GetParent(hwndDlg), PSWIZB_NEXT );
  61. }else{
  62. PropSheet_SetWizButtons( GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT );
  63. }
  64. break;
  65. case PSN_WIZNEXT :
  66. //Handle a Next button click here
  67. if (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_CHECKING)==BST_CHECKED){
  68. pdata->bCheckingEnabled=TRUE;
  69. } else { // delete all the keys
  70. SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_FINISH);
  71. pdata->bCheckingEnabled=FALSE;
  72. return TRUE;
  73. }
  74. break;
  75. case PSN_RESET :
  76. //Handle a Cancel button click, if necessary
  77. break;
  78. default :
  79. break;
  80. }
  81. }
  82. break;
  83. default:
  84. break;
  85. }
  86. return FALSE;
  87. }