home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winbase / io / serial / tty.rc < prev    next >
Text File  |  1997-10-09  |  6KB  |  183 lines

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