home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pentlk11.zip / LOADKBD.H < prev    next >
Text File  |  1994-01-13  |  6KB  |  114 lines

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /* File Name:    LOADKBD.H                                                   */
  4. /*                                                                           */
  5. /* Description:  Defines, static variable definitons and function            */
  6. /*               prototypes for Keyboard API Sample program.                 */
  7. /*                                                                           */
  8. /*                                                                           */
  9. /*  Copyright (C) 1993 IBM Corporation                                       */
  10. /*                                                                           */
  11. /*      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is          */
  12. /*      sample code created by IBM Corporation. This sample code is not      */
  13. /*      part of any standard or IBM product and is provided to you solely    */
  14. /*      for  the purpose of assisting you in the development of your         */
  15. /*      applications.  The code is provided "AS IS", without                 */
  16. /*      warranty of any kind.  IBM shall not be liable for any damages       */
  17. /*      arising out of your use of the sample code, even if they have been   */
  18. /*      advised of the possibility of such damages.                          */
  19. /*                                                                           */
  20. /*****************************************************************************/
  21. /*-------------------------------------------------------------------*/
  22. /* Resource identifiers.                                             */
  23. /*-------------------------------------------------------------------*/
  24. #define ID_NULL                           9999
  25. #define ID_WINDOW                          256
  26. #define ID_ICON                           1000
  27.  
  28. /*-------------------------------------------------------------------*/
  29. /* Menu item identifiers.                                            */
  30. /*-------------------------------------------------------------------*/
  31. #define IDM_START                         1300
  32. #define IDM_START_DLG                     1310
  33. #define IDM_EXIT_DLG                      1312
  34. #define IDM_HELP                          1313
  35.  
  36. /*-------------------------------------------------------------------*/
  37. /* Dialog item identifiers.                                          */
  38. /*-------------------------------------------------------------------*/
  39. #define IDD_DLG_DEMO                      1330
  40. #define IDD_NAME                          1331
  41. #define IDD_PHONE_NO                      1332
  42. #define IDD_OK                            1333
  43. #define IDD_TEXT_1                        1334
  44. #define IDD_TEXT_2                        1335
  45. #define IDD_INST_1                        1336
  46. #define IDD_INST_2                        1337
  47. #define IDD_INST_3                        1338
  48. #define IDD_FRAME                         1339
  49.  
  50. /*-------------------------------------------------------------------*/
  51. /* Help IDs                                                          */
  52. /*-------------------------------------------------------------------*/
  53. #define LOADKBD_HELPTABLE                  800
  54. #define LOADKBD_HELPSUBTABLE               801
  55. #define BTN_OK_HELPSUBTABLE                802
  56. #define EN_NAME_HELPSUBTABLE               803
  57. #define EN_PHNO_HELPSUBTABLE               804
  58. #define BTNCLR_HELPSUBTABLE                805
  59.  
  60. #define PANEL_LOADKBD                      910
  61. #define PANEL_BTN_OK                       911
  62. #define PANEL_EN_NAME                      912
  63. #define PANEL_EN_PHNO                      913
  64. #define PANEL_BTNCLR                       914
  65.  
  66. /*-------------------------------------------------------------------*/
  67. /* String identifiers.                                               */
  68. /*-------------------------------------------------------------------*/
  69. #define MY_MSG                            2800
  70.  
  71. #define IDS_APPNAME                   MY_MSG+1
  72. #define IDS_FIELD_1_SEZ               MY_MSG+2
  73. #define IDS_FIELD_2_SEZ               MY_MSG+3
  74. #define IDS_PEN_NOT_INSTALLED         MY_MSG+4
  75. #define IDS_PEN_NOT_RUNNING           MY_MSG+5
  76. #define IDS_NO_KBD_LOAD               MY_MSG+6
  77. #define IDS_NO_HELP                   MY_MSG+7
  78.  
  79. /*-------------------------------------------------------------------*/
  80. /* Constants.                                                        */
  81. /*-------------------------------------------------------------------*/
  82.  
  83. #define MAXSTRINGLEN                 80
  84. #define MAXMSGLEN                    30
  85. #define PARMLEN                      16
  86.  
  87. /*-------------------------------------------------------------------*/
  88. /* Public Variables                                                  */
  89. /*-------------------------------------------------------------------*/
  90.  
  91. static  HAB     hab;                           /* anchor block handle   */
  92. static  HWND    hwndFrame;                     /* frame window handle   */
  93. static  HWND    hwndClient;                    /* client window handle  */
  94. static  HWND    hwndHelp;                      /* Help window handle    */
  95. static  HWND    hwndDlgWin;                    /* dialog window handle  */
  96. static  HMQ     hmq;                           /* message queue handle  */
  97. static  QMSG    qmsg;                          /* message from msg Q    */
  98. static  CHAR    szMsgString[MAXSTRINGLEN];     /* message buffer        */
  99. static  CHAR    szMsg1String[MAXSTRINGLEN];    /* string for messages   */
  100. static  CHAR    szMsg2String[MAXSTRINGLEN];    /* string for messages   */
  101. static  CHAR    szString[MAXSTRINGLEN];        /* message buffer        */
  102. static  CHAR    szField1[MAXMSGLEN];           /* entry field buffer    */
  103. static  CHAR    szField2[MAXMSGLEN];           /* entry field buffer    */
  104.  
  105. /*-------------------------------------------------------------------*/
  106. /* Internal function prototypes                                      */
  107. /*-------------------------------------------------------------------*/
  108.  
  109. static MRESULT EXPENTRY MainWndProc( HWND, USHORT, MPARAM, MPARAM );
  110. static MRESULT EXPENTRY DemoDlgProc( HWND, USHORT, MPARAM, MPARAM );
  111. static VOID DisplayFields( HAB, PSZ, PSZ );
  112. static VOID DisplayMessage( HAB, ULONG );
  113. static VOID InitHelp( VOID );
  114.