Leaked source code of windows server 2003
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.

83 lines
2.7 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998
  4. *
  5. * TITLE: COMPROG.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 9/28/1999
  12. *
  13. * DESCRIPTION: Download page. Displays the thumbnail and download progress.
  14. *
  15. *******************************************************************************/
  16. #ifndef __COMPROG_H_INCLUDED
  17. #define __COMPROG_H_INCLUDED
  18. #include <windows.h>
  19. #include "acqmgrcw.h"
  20. #include "gphelper.h"
  21. class CCommonProgressPage
  22. {
  23. private:
  24. // Private data
  25. HWND m_hWnd;
  26. CAcquisitionManagerControllerWindow *m_pControllerWindow;
  27. int m_nPictureCount;
  28. HANDLE m_hCancelDownloadEvent;
  29. CGdiPlusHelper m_GdiPlusHelper;
  30. UINT m_nThreadNotificationMessage;
  31. UINT m_nWiaEventMessage;
  32. HPROPSHEETPAGE m_hSwitchToNextPage;
  33. bool m_bQueryingUser;
  34. private:
  35. // No implementation
  36. CCommonProgressPage(void);
  37. CCommonProgressPage( const CCommonProgressPage & );
  38. CCommonProgressPage &operator=( const CCommonProgressPage & );
  39. private:
  40. // Constructor and destructor
  41. explicit CCommonProgressPage( HWND hWnd );
  42. ~CCommonProgressPage(void);
  43. private:
  44. // Helpers
  45. void UpdatePercentComplete( int nPercent, bool bUploading );
  46. void UpdateCurrentPicture( int nPicture );
  47. void UpdateThumbnail( HBITMAP hBitmap, CWiaItem *pWiaItem );
  48. bool QueryCancel(void);
  49. private:
  50. // WM_COMMAND handlers
  51. // Thread Message handlers
  52. void OnNotifyDownloadImage( UINT nMsg, CThreadNotificationMessage *pThreadNotificationMessage );
  53. void OnNotifyDownloadError( UINT nMsg, CThreadNotificationMessage *pThreadNotificationMessage );
  54. // WM_NOTIFY handlers
  55. LRESULT OnSetActive( WPARAM, LPARAM );
  56. LRESULT OnKillActive( WPARAM, LPARAM );
  57. LRESULT OnWizNext( WPARAM, LPARAM );
  58. LRESULT OnWizBack( WPARAM, LPARAM );
  59. LRESULT OnReset( WPARAM, LPARAM );
  60. LRESULT OnQueryCancel( WPARAM, LPARAM );
  61. // Message handlers
  62. LRESULT OnInitDialog( WPARAM, LPARAM );
  63. LRESULT OnCommand( WPARAM, LPARAM );
  64. LRESULT OnNotify( WPARAM, LPARAM );
  65. LRESULT OnThreadNotification( WPARAM, LPARAM );
  66. LRESULT OnEventNotification( WPARAM, LPARAM );
  67. LRESULT OnQueryEndSession( WPARAM, LPARAM );
  68. LRESULT OnSysColorChange( WPARAM, LPARAM );
  69. public:
  70. static INT_PTR CALLBACK DialogProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
  71. };
  72. #endif __COMPROG_H_INCLUDED