Ignore:
Timestamp:
11/13/2008 12:20:40 PM (4 years ago)
Author:
lowjoel
Message:

Handle the Cancel button clicks.

File:
1 edited

Legend:

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

    r541 r542  
    2424#include <windows.h> 
    2525#include <string> 
     26#include <map> 
    2627 
    2728#include "resource.h" 
    2829#undef Yield 
     30#undef min 
    2931 
    3032class MainWindow 
     
    6062private: 
    6163    HWND hWnd; 
     64    HWND hWndPanel; 
    6265    HWND hWndStatusLbl; 
    6366    HWND hWndProgressBar; 
    6467    HWND hWndCancelBtn; 
     68 
     69    struct WndProcData 
     70    { 
     71        WndProcData(WNDPROC oldWndProc, MainWindow& owner) 
     72            : OldWndProc(oldWndProc), Owner(&owner) 
     73        { 
     74        } 
     75 
     76        WNDPROC OldWndProc; 
     77        MainWindow* Owner; 
     78    }; 
     79 
     80    static std::map<HWND, WndProcData> OldWndProcs; 
    6581 
    6682private: 
     
    6985 
    7086    /// Helper function to set the window font for created windows to the system default. 
     87    ///  
     88    /// \param[in] hWnd The window whose font needs to be set. 
    7189    void SetWindowFont(HWND hWnd); 
     90 
     91    /// Handles messages from user interactions. 
     92    LRESULT WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam, 
     93        bool& handled); 
     94 
     95    /// Subclasses the given window. 
     96    ///  
     97    /// \param[in] owner The owner of the window. 
     98    /// \param[in] hWnd The handle to the window to subclass. 
     99    /// \param[in] wndProc The window message processor. 
     100    static void SubclassWindow(MainWindow& owner, HWND hWnd, WNDPROC wndProc); 
     101 
     102    /// Processes messages for the main window. 
     103    static LRESULT __stdcall WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); 
    72104}; 
    73105 
     
    96128}; 
    97129 
     130/// The offset where the package data is stored. 
     131const unsigned DataOffset = 160 * 1024; 
     132 
    98133/// Formats the system error code using FormatMessage, returning the message as 
    99134/// a std::wstring. 
Note: See TracChangeset for help on using the changeset viewer.