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.

157 lines
5.6 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Copyright (C) 1993-1996 Microsoft Corporation. All Rights Reserved.
  3. //
  4. // MODULE: Order.h
  5. //
  6. // PURPOSE: Header file for the order articles dialog
  7. //
  8. #define IDC_MESSAGE_LIST 1001
  9. #define IDC_MOVE_UP 1002
  10. #define IDC_MOVE_DOWN 1003
  11. #define IDC_DOWNLOAD_AVI 2001
  12. #define IDC_GENERAL_TEXT 2002
  13. #define IDC_SPECIFIC_TEXT 2003
  14. #define IDC_DOWNLOAD_PROG 2004
  15. /////////////////////////////////////////////////////////////////////////////
  16. // Class CCombineAndDecode
  17. //
  18. class CCombineAndDecode : public IStoreCallback, public ITimeoutCallback
  19. {
  20. public:
  21. /////////////////////////////////////////////////////////////////////////
  22. // Construction and Initialization
  23. //
  24. CCombineAndDecode();
  25. ~CCombineAndDecode();
  26. HRESULT Start(HWND hwndParent, IMessageTable *pTable, ROWINDEX *rgRows,
  27. DWORD cRows, FOLDERID idFolder);
  28. /////////////////////////////////////////////////////////////////////////
  29. // IUnknown
  30. //
  31. STDMETHODIMP QueryInterface(THIS_ REFIID riid, LPVOID *ppvObj);
  32. STDMETHOD_(ULONG, AddRef)(THIS);
  33. STDMETHOD_(ULONG, Release)(THIS);
  34. /////////////////////////////////////////////////////////////////////////
  35. // IStoreCallback interface
  36. //
  37. STDMETHODIMP OnBegin(STOREOPERATIONTYPE tyOperation, STOREOPERATIONINFO *pOpInfo, IOperationCancel *pCancel);
  38. STDMETHODIMP OnProgress(STOREOPERATIONTYPE tyOperation, DWORD dwCurrent, DWORD dwMax, LPCSTR pszStatus);
  39. STDMETHODIMP OnTimeout(LPINETSERVER pServer, LPDWORD pdwTimeout, IXPTYPE ixpServerType);
  40. STDMETHODIMP CanConnect(LPCSTR pszAccountId, DWORD dwFlags);
  41. STDMETHODIMP OnLogonPrompt(LPINETSERVER pServer, IXPTYPE ixpServerType);
  42. STDMETHODIMP OnComplete(STOREOPERATIONTYPE tyOperation, HRESULT hrComplete, LPSTOREOPERATIONINFO pOpInfo, LPSTOREERROR pErrorInfo);
  43. STDMETHODIMP OnPrompt(HRESULT hrError, LPCTSTR pszText, LPCTSTR pszCaption, UINT uType, INT *piUserResponse);
  44. STDMETHODIMP GetParentWindow(DWORD dwReserved, HWND *phwndParent);
  45. /////////////////////////////////////////////////////////////////////////
  46. // ITimeoutCallback
  47. //
  48. STDMETHODIMP OnTimeoutResponse(TIMEOUTRESPONSE eResponse);
  49. /////////////////////////////////////////////////////////////////////////
  50. // Order dialog message handling stuff
  51. //
  52. public:
  53. static INT_PTR CALLBACK OrderDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  54. private:
  55. INT_PTR CALLBACK _OrderDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  56. BOOL _Order_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  57. void _Order_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  58. void _Order_OnClose(HWND hwnd);
  59. LRESULT _Order_OnDragList(HWND hwnd, int idCtl, LPDRAGLISTINFO lpdli);
  60. /*
  61. void _Order_OnGetMinMaxInfo(HWND hwnd, LPMINMAXINFO lpmmi);
  62. void _Order_OnSize(HWND hwnd, UINT state, int cx, int cy);
  63. void _Order_OnPaint(HWND hwnd);
  64. */
  65. /////////////////////////////////////////////////////////////////////////
  66. // Order dialog message handling stuff
  67. //
  68. public:
  69. static INT_PTR CALLBACK CombineDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  70. private:
  71. INT_PTR CALLBACK _CombineDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  72. BOOL _Combine_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  73. void _Combine_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  74. void _Combine_OnDestroy(HWND hwnd);
  75. /////////////////////////////////////////////////////////////////////////
  76. // Utility Functions
  77. //
  78. void _Combine_GetNextArticle(HWND hwnd);
  79. void _Combine_OnMsgAvail(HWND hwnd);
  80. void _Combine_OpenNote(HWND hwnd);
  81. /////////////////////////////////////////////////////////////////////////
  82. // Member Data
  83. //
  84. private:
  85. ULONG m_cRef;
  86. // Groovy Window Handles
  87. HWND m_hwndParent;
  88. // Interface pointers and all that
  89. IMessageTable *m_pTable;
  90. ROWINDEX *m_rgRows;
  91. DWORD m_cRows;
  92. FOLDERID m_idFolder;
  93. // Order dialog state variables
  94. LPTSTR m_pszBuffer;
  95. LPARAM m_lpData;
  96. UINT m_iItemToMove;
  97. // Combine dialog state variables
  98. DWORD m_cLinesTotal;
  99. DWORD m_cCurrentLine;
  100. DWORD m_cPrevLine;
  101. DWORD m_dwCurrentArt;
  102. IMimeMessageParts *m_pMsgParts;
  103. IOperationCancel *m_pCancel;
  104. STOREOPERATIONTYPE m_type;
  105. HTIMEOUT m_hTimeout;
  106. HWND m_hwndDlg;
  107. };
  108. #if 0
  109. typedef struct tagORDERPARAMS
  110. {
  111. // This stuff get's passed in
  112. PINETMSGHDR *rgpMsgs;
  113. DWORD cMsgs;
  114. HWND hwndOwner;
  115. CNNTPServer *pNNTPServer;
  116. CGroup *pGroup;
  117. TCHAR szGroup[256];
  118. // This stuff is private data for the dialog
  119. DWORD cLinesTotal;
  120. DWORD cCurrentLine;
  121. DWORD cPrevLine;
  122. DWORD dwCurrentArt;
  123. LPMIMEMESSAGEPARTS pMsgParts;
  124. } ORDERPARAMS, *PORDERPARAMS;
  125. BOOL CALLBACK OrderMsgsDlg(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  126. BOOL CALLBACK CombineAndDecodeProg(HWND hwnd, UINT uMsg, WPARAM wParam,
  127. LPARAM lParam);
  128. #endif