Changeset 792


Ignore:
Timestamp:
12/11/08 13:34:07 (6 years ago)
Author:
lowjoel
Message:

Don't reset the progress bar style to remove the marquee if it wasn't set to begin with: this fixes the problem of the progress bar always displaying zero.

Location:
branches/eraser6/Installer/Bootstrapper
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Installer/Bootstrapper/Bootstrapper.cpp

    r764 r792  
    142142        //Since we can allocate as much as we want to allocate, take a decent amount 
    143143        //of memory and stop. 
    144         size = std::min(1048576u * 4, size); 
     144        size = std::min(1048576u, size); 
    145145        static char* dstBuffer = NULL; 
    146146        if (dstBuffer) 
  • branches/eraser6/Installer/Bootstrapper/Main.cpp

    r764 r792  
    265265    SetWindowFont(hWndCancelBtn); 
    266266 
    267     SendMessage(hWndProgressBar, PBM_SETRANGE, 0, MAKELPARAM(0, 1000)); 
     267    SendMessage(hWndProgressBar, PBM_SETRANGE32, 0, 1000); 
    268268    SubclassWindow(*this, hWndCancelBtn, WndProc); 
    269269    SubclassWindow(*this, hWndPanel, WndProc); 
     
    344344void MainWindow::SetProgress(float progress) 
    345345{ 
    346     SetWindowLongPtr(hWndProgressBar, GWL_STYLE, 
    347         GetWindowLongPtr(hWndProgressBar, GWL_STYLE) & (~PBS_MARQUEE)); 
     346    LONG_PTR pbStyle = GetWindowLongPtr(hWndProgressBar, GWL_STYLE); 
     347    if (pbStyle & PBS_MARQUEE) 
     348        SetWindowLongPtr(hWndProgressBar, GWL_STYLE, pbStyle & (~PBS_MARQUEE)); 
    348349    SendMessage(hWndProgressBar, PBM_SETPOS, (int)(progress * 1000), 0); 
    349350} 
Note: See TracChangeset for help on using the changeset viewer.