ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static INT_PTR CALLBACK ProcessPageDlgProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
) [static]

Definition at line 1788 of file wizard.c.

Referenced by InstallWizard().

{
    PSETUPDATA SetupData;
    PREGISTRATIONNOTIFY RegistrationNotify;
    static UINT oldActivityID = -1;
    WCHAR Title[64];

    /* Retrieve pointer to the global setup data */
    SetupData = (PSETUPDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA);

    switch (uMsg)
    {
        case WM_INITDIALOG:
        {
            /* Save pointer to the global setup data */
            SetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
            SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)SetupData);
        }
        break;

        case WM_NOTIFY:
        {
            LPNMHDR lpnm = (LPNMHDR)lParam;
            ULONG MaxProgress = 0;

            switch (lpnm->code)
            {
                case PSN_SETACTIVE:
                    /* Disable the Back and Next buttons */
                    PropSheet_SetWizButtons(GetParent(hwndDlg), 0);

                    StartComponentRegistration(hwndDlg, &MaxProgress);

                    SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETRANGE,
                                       0, MAKELPARAM(0, MaxProgress));
                    SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETPOS,
                                       0, 0);
                    break;

                case PSN_WIZNEXT:
                    break;

                case PSN_WIZBACK:
                    SetupData->UnattendSetup = FALSE;
                    break;

                default:
                    break;
            }
        }
        break;

        case PM_REGISTRATION_NOTIFY:
        {
            WCHAR Activity[64];
            RegistrationNotify = (PREGISTRATIONNOTIFY) lParam;
            // update if necessary only
            if (oldActivityID != RegistrationNotify->ActivityID)
            {
                if (0 != LoadStringW(hDllInstance, RegistrationNotify->ActivityID,
                                     Activity,
                                     sizeof(Activity) / sizeof(Activity[0])))
                {
                    SendDlgItemMessageW(hwndDlg, IDC_ACTIVITY, WM_SETTEXT,
                                        0, (LPARAM) Activity);
                }
                oldActivityID = RegistrationNotify->ActivityID;
            }
            SendDlgItemMessageW(hwndDlg, IDC_ITEM, WM_SETTEXT, 0,
                                (LPARAM)(NULL == RegistrationNotify->CurrentItem ?
                                         L"" : RegistrationNotify->CurrentItem));
            SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETPOS,
                               RegistrationNotify->Progress, 0);
            if (NULL != RegistrationNotify->ErrorMessage)
            {
                if (0 == LoadStringW(hDllInstance, IDS_REACTOS_SETUP,
                                     Title, sizeof(Title) / sizeof(Title[0])))
                {
                    wcscpy(Title, L"ReactOS Setup");
                }
                MessageBoxW(hwndDlg, RegistrationNotify->ErrorMessage,
                            Title, MB_ICONERROR | MB_OK);

            }

            if (wParam)
            {
#ifdef VMWINST
                if(!SetupData->UnattendSetup && !SetupData->DisableVmwInst)
                    RunVMWInstall(GetParent(hwndDlg));
#endif

                /* Enable the Back and Next buttons */
                PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT);
                PropSheet_PressButton(GetParent(hwndDlg), PSBTN_NEXT);
            }
        }
        return TRUE;

        default:
            break;
    }

    return FALSE;
}

Generated on Sun May 27 2012 05:15:21 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.