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.

250 lines
7.9 KiB

  1. /* *
  2. * o p t i o n s . h
  3. *
  4. */
  5. #ifndef _OPTIONS_H
  6. #define _OPTIONS_H
  7. //////////////////////////////////////////////////////////////////////////////
  8. //
  9. // Depends on
  10. //
  11. #ifndef _RICHEDIT_H
  12. #include <richedit.h>
  13. #endif
  14. #include <commdlg.h>
  15. #include <goptions.h>
  16. #ifdef WIN16
  17. #include <mimeole.h>
  18. #endif
  19. // mimeole.h
  20. typedef enum tagENCODINGTYPE ENCODINGTYPE;
  21. //////////////////////////////////////////////////////////////////////////////
  22. //
  23. // BEGIN
  24. //
  25. #define PORT_CCHMAX 8
  26. #define DOWNLOAD_MAX 10000
  27. #define DOWNLOAD_MIN 10
  28. #define DOWNLOAD_DEFAULT 1000
  29. #define EXPIRE_MAX 100
  30. #define EXPIRE_MIN 1
  31. #define EXPIRE_DEFAULT 5
  32. #define DEFAULT_TIMEOUT 60
  33. enum tagPages {
  34. PAGE_GEN = 0x0001,
  35. PAGE_SEND = 0x0002,
  36. PAGE_READ = 0x0004,
  37. PAGE_SPELL = 0x0008,
  38. PAGE_SEC = 0x0010,
  39. PAGE_DIALUP = 0x0020,
  40. PAGE_ADV = 0x0040,
  41. PAGE_SIGS = 0x0080,
  42. PAGE_COMPOSE= 0x0100
  43. };
  44. enum tagStationery {
  45. PAGE_STATIONERY_MAIL = 0x0001,
  46. PAGE_STATIONERY_NEWS = 0x0002
  47. };
  48. typedef struct tagOPTPAGES
  49. {
  50. DLGPROC pfnDlgProc;
  51. UINT uTemplate;
  52. } OPTPAGES;
  53. typedef struct tagOPTINFO
  54. {
  55. IOptionBucketEx *pOpt;
  56. BOOL fMakeDefaultMail;
  57. BOOL fMakeDefaultNews;
  58. BOOL fWasSMAPI;
  59. BOOL fCanChangeSMAPI;
  60. BOOL fMail;
  61. HIMAGELIST himl;
  62. } OPTINFO;
  63. #define ATHENA_OPTIONS 1
  64. #define SPELL_OPTIONS 2
  65. interface IAthenaBrowser;
  66. BOOL ShowOptions(HWND hwndParent, DWORD type, UINT nStartPage, IAthenaBrowser *pBrowser);
  67. BOOL InitOptInfo(DWORD type, OPTINFO **ppoi);
  68. void DeInitOptInfo(OPTINFO *poi);
  69. void InitIndentOptions(CHAR chIndent, HWND hwnd, UINT idCheck, UINT idCombo);
  70. void FillEncodeCombo(HWND hwnd, BOOL fHtml);
  71. void InitCheckCounterFromOptInfo(HWND hwnd, int idCheck, int idEdit, int idSpin, OPTINFO *poi, PROPID opt);
  72. BOOL GetCheckCounter(DWORD *pdw, HWND hwnd, int idCheck, int idEdit, int idSpin);
  73. void ButtonChkFromOptInfo(HWND hwnd, UINT idc, OPTINFO *poi, PROPID opt);
  74. BOOL ButtonChkToOptInfo(HWND hwnd, UINT idc, OPTINFO *poi, ULONG opt);
  75. void FillPollingDialCombo(HWND hwndPollDialCombo);
  76. void InitDlgEdit(HWND hwnd, int id, int max, TCHAR *sz);
  77. void InitTimeoutSlider(HWND hwndSlider, HWND hwndText, DWORD dwTimeout);
  78. void SetTimeoutString(HWND hwnd, UINT pos);
  79. DWORD GetTimeoutFromSlider(HWND hwnd);
  80. BOOL ShowStationery(HWND hwndParent, UINT nStartPage);
  81. VOID LoadVCardList(HWND hwndCombo, LPTSTR lpszDisplayName);
  82. BOOL UpdateVCardOptions(HWND hwnd, BOOL fMail, OPTINFO* pmoi);
  83. HRESULT VCardEdit(HWND hwnd, DWORD idc, DWORD idcOther);
  84. HRESULT VCardNewEntry(HWND hwnd);
  85. typedef struct tagHTMLOPT
  86. {
  87. ENCODINGTYPE ietEncoding;
  88. BOOL f8Bit,
  89. fSendImages,
  90. fIndentReply;
  91. ULONG uWrap;
  92. }
  93. HTMLOPT, *LPHTMLOPT;
  94. typedef struct tagPLAINOPT
  95. {
  96. ENCODINGTYPE ietEncoding;
  97. BOOL f8Bit;
  98. BOOL fMime;
  99. ULONG uWrap;
  100. CHAR chQuote;
  101. }
  102. PLAINOPT, *LPPLAINOPT;
  103. // flags for GetDefaultOptInfo()
  104. #define FMT_MAIL 0x0001
  105. #define FMT_NEWS 0x0002
  106. #define FMT_FORCE_PLAIN 0x0004
  107. #define FMT_FORCE_HTML 0x0008
  108. void GetDefaultOptInfo(LPHTMLOPT prHtmlOpt, LPPLAINOPT prPlainOpt, BOOL *pfHtml, DWORD dwFlags);
  109. void SetPageDirty(OPTINFO *poi, HWND hwnd, DWORD page);
  110. LRESULT InvalidOptionProp(HWND hwndPage, int idcEdit, int idsError, UINT idPage);
  111. BOOL FGetHTMLOptions(HWND hwndParent, LPHTMLOPT pHtmlOpt);
  112. BOOL FGetPlainOptions(HWND hwndParent, LPPLAINOPT pPlainOpt);
  113. BOOL ChangeFontSettings(HWND hwnd);
  114. INT_PTR CALLBACK PlainSettingsDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  115. INT_PTR CALLBACK HTMLSettingsDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  116. INT_PTR CALLBACK MailStationeryDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  117. INT_PTR CALLBACK NewsStationeryDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  118. INT_PTR CALLBACK StationeryDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, BOOL fMail);
  119. INT_PTR CALLBACK SelectDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  120. INT_PTR CALLBACK CacheCleanUpDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  121. void DoDefaultClientCheck(HWND hwnd, DWORD dwFlags);
  122. void FreeIcon(HWND hwnd, int idc);
  123. // General Page
  124. INT_PTR CALLBACK GeneralDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  125. BOOL General_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  126. void General_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  127. LRESULT General_OnNotify(HWND hwnd, int id, NMHDR *pnmhdr);
  128. // Send Page
  129. INT_PTR CALLBACK SendDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  130. BOOL Send_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  131. void Send_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  132. LRESULT Send_OnNotify(HWND hwnd, int id, NMHDR *pnmhdr);
  133. // Read Page
  134. INT_PTR CALLBACK ReadDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  135. BOOL Read_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  136. void Read_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  137. LRESULT Read_OnNotify(HWND hwnd, int id, NMHDR *pnmhdr);
  138. // Security Page
  139. INT_PTR CALLBACK SecurityDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  140. BOOL Security_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  141. void Security_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  142. LRESULT Security_OnNotify(HWND hwnd, int id, NMHDR *pnmhdr);
  143. // Dial Page
  144. INT_PTR CALLBACK DialUpDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  145. BOOL Dial_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  146. void Dial_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  147. LRESULT Dial_OnNotify(HWND hwnd, int id, NMHDR *pnmhdr);
  148. // Maintenance
  149. INT_PTR CALLBACK MaintenanceDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  150. BOOL Maintenance_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  151. void Maintenance_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  152. LRESULT Maintenance_OnNotify(HWND hwnd, int id, NMHDR *pnmhdr);
  153. // Compose
  154. INT_PTR CALLBACK ComposeDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  155. BOOL Compose_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  156. void Compose_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  157. LRESULT Compose_OnNotify(HWND hwnd, int id, NMHDR *pnmhdr);
  158. //Receipts
  159. INT_PTR CALLBACK ReceiptsDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  160. BOOL Receipts_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  161. void Receipts_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  162. LRESULT Receipts_OnNotify(HWND hwnd, int idFrom, LPNMHDR pnmhdr);
  163. // Test whether or not HTTPMail is enabled (for OE5b2)
  164. BOOL IsHTTPMailEnabled(void);
  165. enum {
  166. ID_OPTIONS_GENERAL = 0,
  167. ID_SEND_RECEIEVE,
  168. ID_DEFAULT_PROGRAMS,
  169. ID_SENDING,
  170. ID_MAIL_FORMAT,
  171. ID_NEWS_FORMAT,
  172. ID_READING,
  173. ID_READ_NEWS,
  174. ID_FONTS,
  175. ID_SIGNATURES,
  176. ID_SIG_LIST,
  177. ID_SIG_EDIT,
  178. ID_SPELL,
  179. ID_SPELL_IGNORE,
  180. ID_LANGUAGE_ICON,
  181. ID_SECURITY_ZONE,
  182. ID_SECURE_MAIL,
  183. ID_CONNECTION,
  184. ID_CONNECTION_START,
  185. ID_CONNECTION_INTERNET,
  186. ID_MAINTENANCE,
  187. ID_TROUBLESHOOTING,
  188. ID_FILES,
  189. ID_STATIONERY_ICON,
  190. ID_VCARD,
  191. ID_RECEIPT,
  192. ID_SEC_RECEIPT,
  193. ID_MAX
  194. };
  195. #endif //_OPTIONS_H
  196. #if 0
  197. {IDC_INDENT_CHECK, IDH_NEWS_SEND_INDENT_WITH},
  198. {IDC_INDENT_COMBO, IDH_NEWS_SEND_INDENT_WITH},
  199. {idcIndentReply, IDH_NEWS_SEND_INDENT_WITH},
  200. {idcIndentChar, IDH_NEWS_SEND_INDENT_WITH},
  201. #endif