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.

88 lines
2.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997-2001.
  5. //
  6. // File: dialogs.h
  7. //
  8. // Contents:
  9. //
  10. //----------------------------------------------------------------------------
  11. // Dialogs.h
  12. /////////////////////////////////////////////////////////////////////
  13. class CSendConsoleMessageDlg
  14. {
  15. protected:
  16. HWND m_hdlg; // Handle of the dialog
  17. HWND m_hwndEditMessageText; // Handle of edit control for the message text
  18. HWND m_hwndListviewRecipients; // Handle of the listview of the recipients
  19. HIMAGELIST m_hImageList; // Image list for the listview control
  20. volatile int m_cRefCount; // Reference count of object
  21. public:
  22. CSendConsoleMessageDlg();
  23. ~CSendConsoleMessageDlg();
  24. static INT_PTR DlgProc(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  25. protected:
  26. void AddRef();
  27. void Release();
  28. void OnInitDialog(HWND hdlg, IDataObject * pDataObject);
  29. void OnOK();
  30. LRESULT OnNotify(NMHDR * pNmHdr);
  31. BOOL OnHelp(LPARAM lParam, int nDlgIDD);
  32. void DoContextHelp (HWND hWndControl, int nDlgIDD);
  33. void DoSendConsoleMessageContextHelp (HWND hWndControl);
  34. protected:
  35. int AddRecipient(PCWSTR pszRecipient, BOOL fSelectItem = FALSE);
  36. void UpdateUI();
  37. void EnableDlgItem(INT nIdDlgItem, BOOL fEnable);
  38. protected:
  39. // Dispatch info
  40. enum PROGRES_STATUS_ENUM
  41. {
  42. e_statusDlgInit = 1, // Dialog is initializing
  43. e_statusDlgDispatching, // Dialog is dispatching message to recipients
  44. e_statusDlgCompleted, // The dialog completed the operation (with or without errors)
  45. e_statusUserCancel, // The user clicked on the "Cancel" button
  46. };
  47. struct
  48. {
  49. PROGRES_STATUS_ENUM status;
  50. BYTE * pargbItemStatus; // Array of boolean indicating the status of each recipient
  51. int cErrors; // Number of errors while sending messages
  52. CRITICAL_SECTION cs; // Synchronization object for the "status" variable
  53. volatile HWND hdlg; // Handle of the "Progress Dialog"
  54. volatile HWND hctlStaticRecipient;
  55. volatile HWND hctlStaticMessageOf;
  56. volatile HWND hctlStaticErrors;
  57. volatile HWND hctlProgressBar;
  58. } m_DispatchInfo;
  59. void DispatchMessageToRecipients();
  60. static INT_PTR CALLBACK DlgProcDispatchMessageToRecipients(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  61. static DWORD WINAPI ThreadProcDispatchMessageToRecipients(CSendConsoleMessageDlg * pThis);
  62. }; // CSendConsoleMessageDlg
  63. /////////////////////////////////////////////////////////////////////
  64. class CSendMessageAdvancedOptionsDlg
  65. {
  66. protected:
  67. HWND m_hdlg;
  68. BOOL m_fSendAutomatedMessage;
  69. public:
  70. static INT_PTR DlgProc(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  71. protected:
  72. void OnInitDialog(HWND hdlg);
  73. void UpdateUI();
  74. BOOL OnHelp(LPARAM lParam);
  75. }; // CSendMessageAdvancedOptionsDlg