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.

95 lines
2.4 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. getprint.hxx
  7. This file contains the class defintion for the GET_PRINTERS_DIALOG
  8. class.
  9. FILE HISTORY:
  10. NarenG 25-May-1993 Created
  11. */
  12. #ifndef _GETPRINT_HXX_
  13. #define _GETPRINT_HXX_
  14. //#include <strlst.hxx>
  15. #include "progress.hxx"
  16. //
  17. // TIMER_FREQ is the frequency of our timer messages.
  18. // TIMER_MULT is a multiplier. We'll actually poll the
  19. // service every (TIMER_FREQ * TIMER_MULT) seconds.
  20. // This allows us to advance the progress indicator more
  21. // fequently than we hit the net. Should keep the user better
  22. // amused.
  23. //
  24. #define TIMER_FREQ 500
  25. #define TIMER_MULT 6
  26. #define POLL_TIMER_FREQ (TIMER_FREQ * TIMER_MULT)
  27. #define POLL_DEFAULT_MAX_TRIES 1
  28. /*************************************************************************
  29. NAME: GET_PRINTERS_DIALOG
  30. SYNOPSIS: class for 'wait while I do this' dialog
  31. PARENT: DIALOG_WINDOW
  32. TIMER_CALLOUT
  33. INTERFACE: no public methods of interest apart from constructor
  34. CAVEATS: need convert to use BLT_TIMER
  35. HISTORY:
  36. NarenG 25-May-1993 Created
  37. **************************************************************************/
  38. class GET_PRINTERS_DIALOG : public DIALOG_WINDOW,
  39. public TIMER_CALLOUT
  40. {
  41. //
  42. // Since this class inherits from DIALOG_WINDOW and TIMER_CALLOUT
  43. // which both inherit from BASE, we need to override the BASE
  44. // methods.
  45. //
  46. NEWBASE( DIALOG_WINDOW )
  47. public:
  48. GET_PRINTERS_DIALOG( HWND hWndOwner,
  49. PNBP_LOOKUP_STRUCT pBuffer );
  50. ~GET_PRINTERS_DIALOG( VOID );
  51. protected:
  52. virtual VOID OnTimerNotification( TIMER_ID tid );
  53. virtual BOOL OnCancel( VOID );
  54. virtual BOOL OnOK( VOID );
  55. private:
  56. TIMER _timer;
  57. HANDLE _hthreadNBPLookup;
  58. //
  59. // This is the progress indicator which should keep the user amused.
  60. //
  61. PROGRESS_CONTROL _progress;
  62. SLT _sltMessage;
  63. INT _nTickCounter;
  64. };
  65. #endif // _GETPRINT_HXX_