CMCCLI.RC
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:13k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /*
  2.  -  C M C C L I . R C
  3.  -
  4.  *  Purpose:
  5.  *      Resource file for the CMC sample mail client.
  6.  *
  7.  */
  8. #include "windows.h"
  9. #ifdef WIN32
  10. #include <winver.h>
  11. #else
  12. #include <ver.h>
  13. #endif
  14. #include "xcmcx.h"
  15. #include "cmccli.h"
  16. #include <pdkver.h>
  17. // Fonts to use in dialogs
  18. #ifdef WIN32
  19. #define SHELL_FONT "MS Shell Dlg"
  20. #define SHELL_FONT_SIZE 8
  21. #else
  22. #define SHELL_FONT "MS Sans Serif"
  23. #define SHELL_FONT_SIZE 8
  24. #endif
  25. /*
  26.  -  Icons
  27.  */
  28. NOMAIL  ICON  DISCARDABLE  "CMCCLI.ICO"
  29. NEWMAIL ICON  DISCARDABLE  "CMCCLI2.ICO"
  30. /*
  31.  -  Bitmaps
  32.  */
  33. IDREAD      BITMAP  MOVEABLE PURE   "READ.BMP"
  34. IDREADA     BITMAP  MOVEABLE PURE   "READA.BMP"
  35. IDUNREAD    BITMAP  MOVEABLE PURE   "UNREAD.BMP"
  36. IDUNREADA   BITMAP  MOVEABLE PURE   "UNREADA.BMP"
  37. /*
  38.  -  Menu
  39.  */
  40. MAILMENU MENU DISCARDABLE
  41. BEGIN
  42.     POPUP "&File"
  43.     BEGIN
  44.         MENUITEM "&Logon...",                   IDM_LOGON
  45.         MENUITEM "L&ogoff",                     IDM_LOGOFF, GRAYED
  46.         MENUITEM SEPARATOR
  47.         MENUITEM "E&xit",                       IDM_EXIT
  48.     END
  49.     POPUP "&Mail"
  50.     BEGIN
  51.         POPUP "&Compose"
  52.         BEGIN
  53.             MENUITEM "&Built-In UI...",         IDM_COMPOSE_CMC, GRAYED
  54.             MENUITEM "&Home Made UI...",        IDM_COMPOSE_CUSTOM, GRAYED
  55.         END
  56.         MENUITEM "&Read Mail...",               IDM_READ, GRAYED
  57.         MENUITEM SEPARATOR
  58.         MENUITEM "&Address Book...",            IDM_ADDRBOOK, GRAYED
  59.     END
  60.     POPUP "&Help"
  61.     BEGIN
  62.         MENUITEM "&About Sample Client...",     IDM_ABOUT
  63.     END
  64. END
  65. /*
  66.  -  Dialogs
  67.  */
  68. COMPOSENOTE DIALOG 5, 5, 328, 250
  69. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  70. CAPTION "Compose Note"
  71. FONT SHELL_FONT_SIZE, SHELL_FONT
  72. BEGIN
  73.     LTEXT           "&To:", IDT_TO, 8, 32, 36, 8
  74.     EDITTEXT        IDC_TO, 46, 30, 240, 24, ES_MULTILINE |
  75.                     ES_AUTOVSCROLL | WS_VSCROLL
  76.     LTEXT           "&Cc:", IDT_CC, 8, 59, 36, 8
  77.     EDITTEXT        IDC_CC, 46, 57, 240, 24, ES_MULTILINE |
  78.                     ES_AUTOVSCROLL | WS_VSCROLL
  79.     LTEXT           "Sub&ject:", IDT_SUBJECT, 8, 86, 36, 8
  80.     EDITTEXT        IDC_SUBJECT, 46, 84, 240, 12, ES_AUTOHSCROLL
  81.     EDITTEXT        IDC_NOTE, 0, 103, 328, 147, ES_MULTILINE | ES_AUTOVSCROLL |
  82.                     WS_VSCROLL | ES_LEFT | ES_WANTRETURN
  83.     PUSHBUTTON      "&Send", IDC_SEND, 26, 4, 50, 14
  84.     PUSHBUTTON      "Chec&k Names", IDC_RESOLVE, 82, 4, 50, 14
  85.     PUSHBUTTON      "&Attach", IDC_ATTACH, 138, 4, 50, 14
  86.     PUSHBUTTON      "A&ddress", IDC_ADDRBOOK, 250, 4, 50, 14
  87.     PUSHBUTTON      "Opt&ions", IDC_OPTIONS, 194, 4, 50, 14
  88.     CONTROL         "", IDC_LINE1, "Static", SS_BLACKFRAME, 0, 22, 328, 1
  89.     CONTROL         "", IDC_LINE2, "Static", SS_BLACKFRAME, 0, 102, 328, 1
  90. END
  91. INBOX DIALOG DISCARDABLE  79, 118, 284, 175
  92. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  93. CAPTION "InBox"
  94. FONT SHELL_FONT_SIZE, SHELL_FONT
  95. BEGIN
  96.     LTEXT           "&Messages:",IDT_MSG,6,10,38,8
  97.     LISTBOX         IDC_MSG,6,21,226,147,LBS_OWNERDRAWFIXED | WS_VSCROLL |
  98.                     WS_TABSTOP
  99.     PUSHBUTTON      "&New Msgs",IDC_NEW,237,92,40,14
  100.     PUSHBUTTON      "&Read",IDC_READ,237,112,40,14
  101.     PUSHBUTTON      "&Delete",IDC_DELETE,237,132,40,14
  102.     PUSHBUTTON      "&Close",IDC_CLOSE,237,152,40,14
  103. END
  104. READNOTE DIALOG 5, 5, 304, 250
  105. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  106. CAPTION "Read Note"
  107. FONT SHELL_FONT_SIZE, SHELL_FONT
  108. BEGIN
  109.     PUSHBUTTON      "Save &Changes", IDC_SAVECHANGES,  4,  4, 54, 14
  110.     PUSHBUTTON      "Save &Attach",  IDC_SAVEATTACH,  64,  4, 54, 14
  111.     PUSHBUTTON      "&Reply",        IDC_REPLY,      124,  4, 54, 14
  112.     PUSHBUTTON      "Reply A&ll",    IDC_REPLYALL,   184,  4, 54, 14
  113.     PUSHBUTTON      "&Forward",      IDC_FORWARD,    244,  4, 54, 14
  114.     LTEXT           "From:",         IDT_RFROM,        7, 26, 30,  8
  115.     LTEXT           "Date:",         IDT_RDATE,        7, 40, 30,  8
  116.     LTEXT           "To:",           IDT_RTO,          7, 54, 30,  8
  117.     LTEXT           "Cc:",           IDT_RCC,          7, 68, 30,  8
  118.     LTEXT           "Subject:",      IDT_RSUBJECT,     7, 82, 30,  8
  119.     EDITTEXT        IDC_RFROM,    40, 26, 200, 12, ES_AUTOHSCROLL | ES_READONLY |
  120.                     NOT WS_BORDER
  121.     EDITTEXT        IDC_RDATE,    40, 40, 200, 12, ES_AUTOHSCROLL | ES_READONLY |
  122.                     NOT WS_BORDER
  123.     EDITTEXT        IDC_RTO,      40, 54, 200, 12, ES_AUTOHSCROLL | ES_READONLY |
  124.                     NOT WS_BORDER
  125.     EDITTEXT        IDC_RCC,      40, 68, 200, 12, ES_AUTOHSCROLL | ES_READONLY |
  126.                     NOT WS_BORDER
  127.     EDITTEXT        IDC_RSUBJECT, 40, 82, 200, 12, ES_AUTOHSCROLL | ES_READONLY |
  128.                     NOT WS_BORDER
  129.     EDITTEXT        IDC_READNOTE, 0, 95, 304, 155, ES_MULTILINE | ES_AUTOVSCROLL |
  130.                     WS_VSCROLL | ES_LEFT | ES_WANTRETURN
  131.     CONTROL         "", IDC_LINE3, "Static", SS_BLACKFRAME, 0, 94, 304, 1
  132.     CONTROL         "", IDC_LINE4, "Static", SS_BLACKFRAME, 2, 22, 299, 70
  133.     LISTBOX         IDC_ATTACHMENT, 243, 47, 52, 40, WS_VSCROLL | 
  134.                     WS_TABSTOP | LBS_NOTIFY
  135.     LTEXT           "Attachments:", IDT_ATTACHMENT, 243, 37, 45, 8
  136. END
  137. OPTIONS DIALOG DISCARDABLE  91, 92, 121, 85
  138. STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
  139. CAPTION "Message Options"
  140. FONT SHELL_FONT_SIZE, SHELL_FONT
  141. BEGIN
  142.     CHECKBOX        "&Return Reciept Requested", IDC_RETURN, 7, 8, 103, 10
  143.     GROUPBOX        "&Priority", IDC_PRIORITY, 7, 26, 57, 53
  144.     CONTROL         "&Urgent",   IDC_URGENT, "Button", BS_AUTORADIOBUTTON,
  145.                     13, 41, 39, 10
  146.     CONTROL         "&Normal",   IDC_NORMAL, "Button", BS_AUTORADIOBUTTON,
  147.                     13, 51, 39, 10
  148.     CONTROL         "&Low",      IDC_LOW,    "Button", BS_AUTORADIOBUTTON,
  149.                     13, 61, 39, 10
  150.     DEFPUSHBUTTON   "OK",        IDOK, 73, 47, 40, 14
  151.     PUSHBUTTON      "Cancel",    IDCANCEL, 73, 64, 40, 14
  152. END
  153. ABOUTBOX DIALOG DISCARDABLE  22, 17, 156, 88
  154. STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
  155. CAPTION "About Sample Client"
  156. FONT SHELL_FONT_SIZE, SHELL_FONT
  157. BEGIN
  158.     CTEXT           "CMC  Sample Client", IDC_STATIC1, 40, 15, 76, 10
  159.     ICON            "NOMAIL", ICON_NOMAIL, 10, 10, 18, 20
  160.     DEFPUSHBUTTON   "OK", IDOK, 62, 68, 32, 14, WS_GROUP
  161.     CTEXT           "", IDC_VERSION, 15, 40, 130, 8
  162.     CTEXT           "Copyright 251 Microsoft Corp. 1993-1995", IDC_STATIC2, 15, 50, 130, 8
  163. END
  164. /*
  165.  -  String Table
  166.  */
  167. STRINGTABLE DISCARDABLE
  168. BEGIN
  169.     CMC_SUCCESS                       "CMC_SUCCESS"
  170.     CMC_E_AMBIGUOUS_RECIPIENT         "CMC_E_AMBIGUOUS_RECIPIENT"
  171.     CMC_E_ATTACHMENT_NOT_FOUND        "CMC_E_ATTACHMENT_NOT_FOUND"
  172.     CMC_E_ATTACHMENT_OPEN_FAILURE     "CMC_E_ATTACHMENT_OPEN_FAILURE"
  173.     CMC_E_ATTACHMENT_READ_FAILURE     "CMC_E_ATTACHMENT_READ_FAILURE"
  174.     CMC_E_ATTACHMENT_WRITE_FAILURE    "CMC_E_ATTACHMENT_WRITE_FAILURE"
  175.     CMC_E_COUNTED_STRING_UNSUPPORTED  "CMC_E_COUNTED_STRING_UNSUPPORTED"
  176.     CMC_E_DISK_FULL                   "CMC_E_DISK_FULL"
  177.     CMC_E_FAILURE                     "CMC_E_FAILURE"
  178.     CMC_E_INSUFFICIENT_MEMORY         "CMC_E_INSUFFICIENT_MEMORY"
  179.     CMC_E_INVALID_CONFIGURATION       "CMC_E_INVALID_CONFIGURATION"
  180.     CMC_E_INVALID_ENUM                "CMC_E_INVALID_ENUM"
  181.     CMC_E_INVALID_FLAG                "CMC_E_INVALID_FLAG"
  182.     CMC_E_INVALID_MEMORY              "CMC_E_INVALID_MEMORY"
  183.     CMC_E_INVALID_MESSAGE_PARAMETER   "CMC_E_INVALID_MESSAGE_PARAMETER"
  184.     CMC_E_INVALID_MESSAGE_REFERENCE   "CMC_E_INVALID_MESSAGE_REFERENCE"
  185.     CMC_E_INVALID_PARAMETER           "CMC_E_INVALID_PARAMETER"
  186.     CMC_E_INVALID_SESSION_ID          "CMC_E_INVALID_SESSION_ID"
  187.     CMC_E_INVALID_UI_ID               "CMC_E_INVALID_UI_ID"
  188.     CMC_E_LOGON_FAILURE               "CMC_E_LOGON_FAILURE"
  189.     CMC_E_MESSAGE_IN_USE              "CMC_E_MESSAGE_IN_USE"
  190.     CMC_E_NOT_SUPPORTED               "CMC_E_NOT_SUPPORTED"
  191.     CMC_E_PASSWORD_REQUIRED           "CMC_E_PASSWORD_REQUIRED"
  192.     CMC_E_RECIPIENT_NOT_FOUND         "CMC_E_RECIPIENT_NOT_FOUND"
  193.     CMC_E_SERVICE_UNAVAILABLE         "CMC_E_SERVICE_UNAVAILABLE"
  194.     CMC_E_TEXT_TOO_LARGE              "CMC_E_TEXT_TOO_LARGE"
  195.     CMC_E_TOO_MANY_FILES              "CMC_E_TOO_MANY_FILES"
  196.     CMC_E_TOO_MANY_RECIPIENTS         "CMC_E_TOO_MANY_RECIPIENTS"
  197.     CMC_E_UNABLE_TO_NOT_MARK_AS_READ  "CMC_E_UNABLE_TO_NOT_MARK_AS_READ"
  198.     CMC_E_UNRECOGNIZED_MESSAGE_TYPE   "CMC_E_UNRECOGNIZED_MESSAGE_TYPE"
  199.     CMC_E_UNSUPPORTED_ACTION          "CMC_E_UNSUPPORTED_ACTION"
  200.     CMC_E_UNSUPPORTED_CHARACTER_SET   "CMC_E_UNSUPPORTED_CHARACTER_SET"
  201.     CMC_E_UNSUPPORTED_DATA_EXT        "CMC_E_UNSUPPORTED_DATA_EXT"
  202.     CMC_E_UNSUPPORTED_FLAG            "CMC_E_UNSUPPORTED_FLAG"
  203.     CMC_E_UNSUPPORTED_FUNCTION_EXT    "CMC_E_UNSUPPORTED_FUNCTION_EXT"
  204.     CMC_E_UNSUPPORTED_VERSION         "CMC_E_UNSUPPORTED_VERSION"
  205.     CMC_E_USER_CANCEL                 "CMC_E_USER_CANCEL"
  206.     CMC_E_USER_NOT_LOGGED_ON          "CMC_E_USER_NOT_LOGGED_ON"
  207.     IDS_LOGONFAIL           "CMC failed to establish a valid session."
  208.     IDS_ADDRBOOKFAIL        "CMC unable to provide Address Book UI."
  209.     IDS_RESOLVEFAIL         "Unable to resolve friendly names."
  210.     IDS_UNRESOLVEDNAMES     "One or more names could not be resolved in the address book."
  211.     IDS_SENDERROR           "An error occurred trying to send the message."
  212.     IDS_NORECIPS            "You must enter at least one recipient."
  213.     IDS_SAVEATTACHERROR     "An error occurred save the file attachment."
  214.     IDS_READFAIL            "An error occurred reading the message."
  215.     IDS_MAKENEWFAIL         "An error occurred while making a new message to Reply, Reply All, or Forward."
  216.     IDS_FILTER              "All Files (*.*)|*.*|Text Files (*.txt)|*.txt|MS Word Docs (*.doc)|*.doc|MS Excel Files (*.xl*)|*.xl*|Lotus 1-2-3 Files (*.wk*)|*.wk*|MS PowerPoint (*.ppt)|*.ppt|Word Perfect Files (*.*)|*.*|"
  217. END
  218. #ifdef DEBUG                    
  219. #   define VER_FILEFLAGS                VS_FF_DEBUG | VS_FF_PRERELEASE
  220. #else
  221. #   define VER_FILEFLAGS                VS_FF_PRERELEASE
  222. #endif
  223.     
  224. #if (rmm < 10)
  225. #define rmmpad "0"
  226. #else
  227. #define rmmpad
  228. #endif
  229. #if defined(DEBUG) || defined(TEST)
  230. #define SzVer(a,b,c)                #a ".00." rmmpad #b "." #c
  231. #else
  232. #define SzVer(a,b,c)                #a ".0"
  233. #endif
  234. #define VERSTR(a,b,c)               SzVer(a,b,c)
  235. #define VER_FILEVERSION_STR         VERSTR(rmj, rmm, rup) ""
  236. #define VER_PRODUCTVERSION_STR          VERSTR(rmj, rmm, rup) ""
  237. /* Windows 95 definitions are currently the same as WINNT, but may change */
  238. #if defined(_WIN95)
  239. #   define VER_FILE_OS                  VOS_NT_WINDOWS32
  240. #   define VER_INTERNALNAME_STR         "CMCCLI32"
  241. #   define VER_ORIGINALFILENAME_STR     "CMCCLI32.EXE"
  242. #elif defined(WIN32)
  243. #   define VER_FILE_OS                  VOS_NT_WINDOWS32
  244. #   define VER_INTERNALNAME_STR         "CMCCLI32"
  245. #   define VER_ORIGINALFILENAME_STR     "CMCCLI32.EXE"
  246. #elif defined(WIN16)
  247. #   define VER_FILE_OS                  VOS__WINDOWS16
  248. #   define VER_INTERNALNAME_STR         "CMCCLI"
  249. #   define VER_ORIGINALFILENAME_STR     "CMCCLI.EXE"
  250. #endif
  251. /*
  252.  *  Version Stamp
  253.  */
  254. VS_VERSION_INFO VERSIONINFO
  255.     FILEVERSION             rmj,0,rmm,rup
  256.     PRODUCTVERSION          rmj,0,rmm,rup
  257.     FILEFLAGSMASK           0x3FL               /* This should not be changed */
  258.     FILEFLAGS               VER_FILEFLAGS
  259.     FILEOS                  VER_FILE_OS
  260.     FILETYPE                VFT_APP             /* Look at the list of VFT_* values */
  261.     FILESUBTYPE             VFT2_UNKNOWN        /* Look at the list of VFT2_* values */
  262.     {
  263.         BLOCK "StringFileInfo"
  264.         {
  265.             BLOCK "040904E4" /* US English, Windows 3.10 ANSI */
  266.             {
  267.                 VALUE "ProductName",        "Microsoft Messaging API for Windows(TM)"
  268.                 VALUE "Comments",           "Common Mail Calls client application"
  269.                 VALUE "CompanyName",        "Microsoft Corporation"
  270.                 VALUE "FileDescription",    "Sample CMC client"
  271.                 VALUE "LegalCopyright",     "Copyright 251 Microsoft Corp. 1993-1995"
  272.                 VALUE "InternalName",       VER_INTERNALNAME_STR
  273.                 VALUE "OriginalFilename",   VER_ORIGINALFILENAME_STR
  274.                 VALUE "ProductVersion",     VER_PRODUCTVERSION_STR
  275.                 VALUE "FileVersion",        VER_FILEVERSION_STR
  276.             }
  277.         }
  278.         BLOCK "VarFileInfo"
  279.         {
  280.             VALUE "Translation", 0x0409, 0x04E4
  281.         }
  282.     }