home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / hello6 / ahellow6.rcx < prev    next >
Encoding:
Text File  |  1996-02-22  |  9.2 KB  |  217 lines

  1. /******************************************************************************
  2. * .FILE:         adialog6.rc                                                  *
  3. *                                                                             *
  4. * .DESCRIPTION:  Hello World Sample Program Version 6: Resource Definitions   *
  5. *                                                                             *
  6. * .CLASSES:                                                                   *
  7. *                                                                             *
  8. * .COPYRIGHT:                                                                 *
  9. *    Licensed Material - Program-Property of IBM                              *
  10. *    (C) Copyright IBM Corp. 1992, 1996 - All Rights Reserved                 *
  11. *                                                                             *
  12. * .DISCLAIMER:                                                                *
  13. *   The following [enclosed] code is sample code created by IBM               *
  14. *   Corporation.  This sample code is not part of any standard IBM product    *
  15. *   and is provided to you solely for the purpose of assisting you in the     *
  16. *   development of your applications.  The code is provided 'AS IS',          *
  17. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  18. *   arising out of your use of the sample code, even if they have been        *
  19. *   advised of the possibility of such damages.                               *
  20. *                                                                             *
  21. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  22. *                                                                             *
  23. ******************************************************************************/
  24. #ifdef IC_WIN
  25. #include <windows.h>
  26. #endif
  27. #ifdef IC_PM
  28. #include <os2.h>
  29. #endif
  30. #ifdef WORKSHOP_INVOKED
  31. #include <windows.h>
  32. #endif
  33. #include "ahellow6.h"
  34.  
  35. //**************************************************************************
  36. // icon and bitmap resources                                               *
  37. //   Relate symbolic name to file containing main window icon.             *
  38. //**************************************************************************
  39. ICON WND_MAIN ahellow6.ico
  40.  
  41. //**************************************************************************
  42. // string resources                                                        *
  43. //   Relate symbolic names to literal text strings.                        *
  44. //**************************************************************************
  45. STRINGTABLE
  46.   BEGIN
  47.     STR_HELLO,  "Hello, World!!!"
  48.     WND_MAIN,   "Hello World Sample - Version 6"
  49.     WND_TEXTDIALOG, "Hello World Edit Dialog"
  50.     WND_HELLOPOPUP, "Hello Window Pop-up Menu"
  51.     WND_EARTHPOPUP, "Earth Window Pop-up Menu"
  52.     WND_NOTEBOOKFRAME, "Hello World Settings Notebook"
  53.  
  54.     STR_INFO,   "Use Alt-F4 to Close Window"
  55.     MI_EDIT,    "Edit Menu"
  56.     MI_ALIGNMENT,"Alignment Menu"
  57.     MI_CENTER,  "Set Center Alignment"
  58.     MI_LEFT,    "Set Left Alignment"
  59.     MI_RIGHT,   "Set Right Alignment"
  60.     MI_TEXT,    "Display Edit Dialog"
  61.     MI_HELP,    "Help for Selected Item"
  62.     MI_FONT,    "Open Font Dialog"
  63.     MI_SETTINGS,"Settings Menu"
  64.     MI_READSETS,"Read Settings from Profile"
  65.     MI_OPENSETS,"Open Settings Notebook"
  66.     MI_SAVESETS,"Save Settings in Profile"
  67.     MI_TWINKLE, "Toggle Twinkling of Stars"
  68.     MI_BRIGHT,  "Make Stars Bright (when not twinkling)"
  69.     MI_DIM,     "Make Stars Dim (when not twinkling)"
  70.     SC_HELPEXTENDED, "Display General Help"
  71.     SC_HELPKEYS,"Display Keys Help"
  72.     SC_HELPINDEX,"Display Help Index"
  73.     STR_INFODLG,"Modal Edit Text Dialog Active"
  74.     STR_CENTER, "Center Alignment"
  75.     STR_LEFT,   "Left Alignment"
  76.     STR_RIGHT,  "Right Alignment"
  77.     STR_LEFTB,  "Left"
  78.     STR_CENTERB,"Center"
  79.     STR_RIGHTB, "Right"
  80.     STR_HELPB,  "Help"
  81.     STR_HTITLE, "C++ Hello World - Help Window"
  82.     STR_HELP_NOT_FOUND, "Help file not found. Help is not available."
  83.     STR_FONTDLGT,"C++ Hello World - Font Dialog"
  84.     STR_EARTHTAB,             "Earth"
  85.     STR_DATETIMETAB,          "Date/Time"
  86.     STR_EARTHPAGEHEADING      "Earth Window Settings"
  87.     STR_STARSHEADING,         "Star Settings"
  88.     STR_TWINKLEBOX,           "Twinkle"
  89.     STR_BRIGHTBOX,            "Bright"
  90.     STR_LAYERSHEADING,        "Atmosphere Layers"
  91.     STR_EARTHCOLORHEADING,    "Earth Color"
  92.     STR_CYAN,                 "Cyan"
  93.     STR_GREEN,                "Green"
  94.     STR_WHITE                 "White"
  95.     STR_YELLOW,               "Yellow"
  96.     STR_DATETIMEPAGEHEADING,  "Date and Time Settings"
  97.     STR_DATEHEADING,          "Date Format"
  98.     STR_DATELONGBOX,          "Long"
  99.     STR_DATESHORTBOX,         "Short"
  100.     STR_DATELONGEXAMPLE,      "ex: August 10, 1994"
  101.     STR_DATESHORTEXAMPLE,     "ex: 08/10/94"
  102.     STR_TIMEHEADING,          "Time Format"
  103.     STR_TIMELONGBOX,          "Long"
  104.     STR_TIMESHORTBOX,         "Short"
  105.     STR_TIMELONGEXAMPLE,      "ex: 01:37:59 pm"
  106.     STR_TIMESHORTEXAMPLE,     "ex: 13:37"
  107.     STR_APPLY,                "Apply"
  108.     STR_RESET,                "Reset"
  109.     STR_CLOSE,                "Close"
  110.     STR_READOK,               "Settings successfully read from profile."
  111.     STR_SAVEDOK,              "Settings successfully saved to profile."
  112.     DID_OK,     "OK"
  113.     DID_CANCEL, "Cancel"
  114.     DID_STATIC, "Edit Text:"
  115.     DID_ENTRY,  ""
  116.     // Change HI_COUNT in ahellow6.h to change number of HIs used.
  117.     HI_WORLD,      "Hello, World!"              //English
  118.     HI_WORLD+1,    "Hi, World!"                 //American
  119.     HI_WORLD+2,    "Howdy, World!"              //Southern American
  120.     HI_WORLD+3,    "Alo, Mundo!"                //Portuguese
  121.     HI_WORLD+4,    "Ola, Mondo!"                //Spanish
  122.     HI_WORLD+5,    "Hallo wereld!"              //Dutch
  123.     HI_WORLD+6,    "Hallo Welt!"                //German
  124.     HI_WORLD+7,    "Bonjour le monde!"          //French
  125.     HI_WORLD+8,    "Put your language here!"    //Add more items, too!
  126.     // Change HI_COUNT in ahellow6.h to change number of HIs used.
  127.   END
  128.  
  129. //**************************************************************************
  130. // Menu bar for main window - used by IMenuBar Class                       *
  131. //   Define menu bar layout and relate symbolic names to menu item strings.*
  132. //**************************************************************************
  133. MENU WND_MAIN
  134.   BEGIN
  135.     SUBMENU "~Edit", MI_EDIT
  136.       BEGIN
  137.         SUBMENU "~Alignment", MI_ALIGNMENT
  138.           BEGIN
  139.             MENUITEM "~Left\tF7",   MI_LEFT
  140.             MENUITEM "~Center\tF8", MI_CENTER
  141.             MENUITEM "~Right\tF9",  MI_RIGHT
  142.           END
  143.         MENUITEM "~Text...", MI_TEXT
  144.         MENUITEM "~Font...", MI_FONT
  145.       END
  146.     SUBMENU "~Settings", MI_SETTINGS
  147.       BEGIN
  148.         MENUITEM "~Read from profile", MI_READSETS
  149.         MENUITEM "~Open ...",          MI_OPENSETS
  150.         MENUITEM "~Save to profile",   MI_SAVESETS
  151.       END
  152.     SUBMENU "~Help", MI_HELP, MIS_HELP
  153.       BEGIN
  154.         MENUITEM "~General help...",   SC_HELPEXTENDED, MIS_SYSCOMMAND
  155.         MENUITEM "~Keys help...",      SC_HELPKEYS, MIS_SYSCOMMAND
  156.         MENUITEM "Help ~index...",     SC_HELPINDEX, MIS_SYSCOMMAND
  157.       END
  158.   END
  159.  
  160. //**************************************************************************
  161. // Pop-up menus for AHelloWindow - used by IPopUpMenu class                *
  162. //   Define pop-up menu layout and relate symbolic IDs to menu items.      *
  163. //**************************************************************************
  164. MENU WND_HELLOPOPUP
  165.   BEGIN
  166.     MENUITEM "~Left-align text",  MI_LEFT
  167.     MENUITEM "~Center text"    ,  MI_CENTER
  168.     MENUITEM "~Right-align text", MI_RIGHT
  169.   END
  170. MENU WND_EARTHPOPUP
  171.   BEGIN
  172.     MENUITEM "~Twinkling stars", MI_TWINKLE
  173.     MENUITEM SEPARATOR
  174.     MENUITEM "~Brighten stars",  MI_BRIGHT
  175.     MENUITEM "~Dim stars",  MI_DIM
  176.   END
  177.  
  178. //**************************************************************************
  179. // Accelerator (key) table resources                                       *
  180. //   Relate accelerator keys to command IDs.                               *
  181. //**************************************************************************
  182. ACCELTABLE WND_MAIN
  183.   BEGIN
  184.     VK_F7,  MI_LEFT,   VIRTUALKEY
  185.     VK_F8,  MI_CENTER, VIRTUALKEY
  186.     VK_F9,  MI_RIGHT,  VIRTUALKEY
  187.   END
  188.  
  189. //**************************************************************************
  190. // Help table resources - used by IHelpWindow class                        *
  191. //   Relate window IDs to help file IDs.                                   *
  192. //**************************************************************************
  193. HELPTABLE HELP_TABLE
  194.   BEGIN
  195.     HELPITEM WND_MAIN,        SUBTABLE_MAIN,   100
  196.     HELPITEM WND_TEXTDIALOG,  SUBTABLE_DIALOG, 200
  197.   END
  198.  
  199. HELPSUBTABLE SUBTABLE_MAIN
  200.   BEGIN
  201.     HELPSUBITEM WND_HELLO, 100
  202.     HELPSUBITEM WND_LISTBOX,102
  203.     HELPSUBITEM MI_EDIT, 110
  204.     HELPSUBITEM MI_ALIGNMENT, 111
  205.     HELPSUBITEM MI_LEFT, 112
  206.     HELPSUBITEM MI_CENTER, 113
  207.     HELPSUBITEM MI_RIGHT, 114
  208.     HELPSUBITEM MI_TEXT, 199
  209.   END
  210.  
  211. HELPSUBTABLE SUBTABLE_DIALOG
  212.   BEGIN
  213.     HELPSUBITEM DID_ENTRY, 201
  214.     HELPSUBITEM DID_OK, 202
  215.     HELPSUBITEM DID_CANCEL, 203
  216.   END
  217.