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

Windows编程

开发平台:

Visual C++

  1. #include "windows.h"
  2. #include "resource.h"
  3. /////////////////////////////////////////////////////////////////////////////
  4. //
  5. // Icon
  6. //
  7. TTYICON                 ICON    DISCARDABLE     "TTY.ICO"
  8. /////////////////////////////////////////////////////////////////////////////
  9. //
  10. // Bitmap
  11. //
  12. TTYBITMAP               BITMAP  MOVEABLE PURE   "TTY.BMP"
  13. /////////////////////////////////////////////////////////////////////////////
  14. //
  15. // Menu
  16. //
  17. TTYMENU MENU DISCARDABLE 
  18. BEGIN
  19.     POPUP "&Action"
  20.     BEGIN
  21.         MENUITEM "&ConnecttShift+PgUp",        IDM_CONNECT
  22.         MENUITEM "&DisconnecttShift+PgDn",     IDM_DISCONNECT
  23.         MENUITEM SEPARATOR
  24.         MENUITEM "E&xit",                       IDM_EXIT
  25.     END
  26.     MENUITEM "&Settings...",                IDM_SETTINGS
  27.     POPUP "&Transfer"
  28.     BEGIN
  29.         MENUITEM "Send Data BlocktShift+F1",   IDM_SENDBLOCK
  30.     END
  31.     MENUITEM "A&bout",                      IDM_ABOUT
  32. END
  33. /////////////////////////////////////////////////////////////////////////////
  34. //
  35. // Accelerator
  36. //
  37. TTYACCEL ACCELERATORS MOVEABLE PURE 
  38. BEGIN
  39.     VK_F1,          IDM_SENDBLOCK,          VIRTKEY, SHIFT, NOINVERT
  40.     VK_NEXT,        IDM_DISCONNECT,         VIRTKEY, SHIFT, NOINVERT
  41.     VK_PRIOR,       IDM_CONNECT,            VIRTKEY, SHIFT, NOINVERT
  42. END
  43. /////////////////////////////////////////////////////////////////////////////
  44. //
  45. // Dialog
  46. //
  47. SETTINGSDLGBOX DIALOG DISCARDABLE  25, 20, 200, 175
  48. STYLE WS_POPUP | WS_CAPTION
  49. CAPTION "TTY Settings..."
  50. FONT 8, "Helv"
  51. BEGIN
  52.     GROUPBOX        "&COM Options:",-1,5,5,115,130
  53.     RTEXT           "&Port:",-1,10,20,40,10
  54.     COMBOBOX        IDD_PORTCB,55,20,55,35,CBS_DROPDOWNLIST | CBS_HASSTRINGS | 
  55.                     WS_VSCROLL | WS_TABSTOP
  56.     RTEXT           "&Baud Rate:",-1,10,35,40,10,NOT WS_GROUP
  57.     COMBOBOX        IDD_BAUDCB,55,35,55,35,CBS_DROPDOWNLIST | CBS_HASSTRINGS | 
  58.                     WS_VSCROLL | WS_TABSTOP
  59.     RTEXT           "&Data Bits:",-1,10,50,40,10,NOT WS_GROUP
  60.     COMBOBOX        IDD_DATABITSCB,55,50,55,35,CBS_DROPDOWNLIST | 
  61.                     CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
  62.     RTEXT           "P&arity:",-1,10,65,40,10,NOT WS_GROUP
  63.     COMBOBOX        IDD_PARITYCB,55,65,55,35,CBS_DROPDOWNLIST | 
  64.                     CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
  65.     RTEXT           "&Stop Bits:",-1,10,80,40,10,NOT WS_GROUP
  66.     COMBOBOX        IDD_STOPBITSCB,55,80,55,35,CBS_DROPDOWNLIST | 
  67.                     CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
  68.     RTEXT           "F&low:",-1,10,95,40,10,NOT WS_GROUP
  69.     CONTROL         "DTR/DSR",IDD_DTRDSR,"Button",BS_AUTOCHECKBOX | 
  70.                     WS_TABSTOP,55,95,50,10
  71.     CONTROL         "RTS/CTS",IDD_RTSCTS,"Button",BS_AUTOCHECKBOX,55,105,50,
  72.                     10
  73.     CONTROL         "XON/XOFF",IDD_XONXOFF,"Button",BS_AUTOCHECKBOX,55,115,
  74.                     50,10
  75.     GROUPBOX        "&TTY Options:",-1,125,5,70,55,WS_GROUP
  76.     CONTROL         "Autowrap",IDD_AUTOWRAP,"Button",BS_AUTOCHECKBOX | 
  77.                     WS_TABSTOP,135,20,50,10
  78.     CONTROL         "New Line",IDD_NEWLINE,"Button",BS_AUTOCHECKBOX,135,30,
  79.                     50,10
  80.     CONTROL         "Local Echo",IDD_LOCALECHO,"Button",BS_AUTOCHECKBOX,135,
  81.                     40,50,10
  82.     GROUPBOX        "Control &Options",-1,5,135,190,35
  83.     CONTROL         "Use CN_RECEIVE Notifications",IDD_USECNRECEIVE,"Button",
  84.                     BS_AUTOCHECKBOX | WS_TABSTOP,10,150,115,10
  85.     CONTROL         "Display Errors",IDD_DISPLAYERRORS,"Button",
  86.                     BS_AUTOCHECKBOX,130,150,60,10
  87.     PUSHBUTTON      "&Font",IDD_FONT,140,70,40,14,WS_GROUP
  88.     DEFPUSHBUTTON   "Ok",IDD_OK,140,90,40,14
  89.     PUSHBUTTON      "Cancel",IDD_CANCEL,140,110,40,14
  90. END
  91. ABOUTDLGBOX DIALOG DISCARDABLE  10, 25, 220, 100
  92. STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  93. CAPTION "About the SDK TTY Sample"
  94. FONT 8, "Helv"
  95. BEGIN
  96.     ICON            TTYICON,IDD_ABOUTICON,10,5,18,20
  97.     LTEXT           "Microsoft Windows v.%d.%d",IDD_TITLELINE,45,5,127,10,
  98.                     SS_NOPREFIX | NOT WS_GROUP
  99.     LTEXT           "TTY Sample v.%02d.%02d.%03d",IDD_VERSION,45,15,120,10,
  100.                     SS_NOPREFIX | NOT WS_GROUP
  101.     LTEXT           "Copyright 1992 - 1997 Microsoft Corp.",-1,45,25,145,
  102.                     10,SS_NOPREFIX | NOT WS_GROUP
  103.     LTEXT           "",IDD_BYLINE,45,35,145,20,SS_NOPREFIX | NOT WS_GROUP
  104.     CONTROL         "",-1,"Static",SS_BLACKRECT,45,60,172,1
  105.     LTEXT           "386 Enhanced Mode",IDD_WINDOWSMODE,45,65,150,10,
  106.                     SS_NOPREFIX | NOT WS_GROUP
  107.     LTEXT           "Memory:",-1,45,75,70,10,SS_NOPREFIX | NOT WS_GROUP
  108.     LTEXT           "%lu KB Free",IDD_FREEMEM,120,75,74,10,SS_NOPREFIX | NOT 
  109.                     WS_GROUP
  110.     LTEXT           "System Resources:",-1,45,85,70,10,SS_NOPREFIX | NOT 
  111.                     WS_GROUP
  112.     LTEXT           "%d%%",IDD_RESOURCES,120,85,74,10,SS_NOPREFIX | NOT 
  113.                     WS_GROUP
  114.     DEFPUSHBUTTON   "OK",IDD_OK,177,5,40,14
  115. END
  116. /////////////////////////////////////////////////////////////////////////////
  117. //
  118. // String Table
  119. //
  120. STRINGTABLE DISCARDABLE 
  121. BEGIN
  122.     IDS_COMPREFIX           "COM"
  123. END
  124. STRINGTABLE DISCARDABLE 
  125. BEGIN
  126.     IDS_BAUD110             "110"
  127.     IDS_BAUD300             "300"
  128.     IDS_BAUD600             "600"
  129.     IDS_BAUD1200            "1200"
  130.     IDS_BAUD2400            "2400"
  131.     IDS_BAUD4800            "4800"
  132.     IDS_BAUD9600            "9600"
  133.     IDS_BAUD14400           "14.4k"
  134.     IDS_BAUD19200           "19.2k"
  135.     IDS_BAUD38400           "38.4k"
  136.     IDS_BAUD56000           "56k"
  137.     IDS_BAUD128000          "128k"
  138.     IDS_BAUD256000          "256k"
  139. END
  140. STRINGTABLE DISCARDABLE 
  141. BEGIN
  142.     IDS_PARITYNONE          "None"
  143.     IDS_PARITYEVEN          "Even"
  144.     IDS_PARITYODD           "Odd"
  145.     IDS_PARITYMARK          "Mark"
  146.     IDS_PARITYSPACE         "Space"
  147. END
  148. STRINGTABLE DISCARDABLE 
  149. BEGIN
  150.     IDS_ONESTOPBIT          "1"
  151.     IDS_ONE5STOPBITS        "1.5"
  152.     IDS_TWOSTOPBITS         "2"
  153. END
  154. STRINGTABLE DISCARDABLE 
  155. BEGIN
  156.     IDS_MODE_STANDARD       "Standard mode"
  157.     IDS_MODE_ENHANCED       "386 Enhanced mode"
  158.     IDS_MODE_WLO            "WLO Compatibilty mode"
  159.     IDS_MODE_UNDEF          "Undefined mode"
  160. END