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

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /* File Name:    HIDEKBD.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. /*-------------------------------------------------------------------*/
  23. /* Resource identifiers.                                             */
  24. /*-------------------------------------------------------------------*/
  25. #define ID_NULL                           9999
  26. #define ID_WINDOW                          256
  27. #define ID_ICON                           1000
  28.  
  29. /*-------------------------------------------------------------------*/
  30. /* Menu item identifiers.                                            */
  31. /*-------------------------------------------------------------------*/
  32. #define IDM_START_DLG                     1300
  33. #define IDM_OPTIONS                       1310
  34. #define IDM_DEMO                          1311
  35. #define IDM_EXIT_DEMO                     1312
  36. #define IDM_HELP                          1320
  37.  
  38. /*-------------------------------------------------------------------*/
  39. /* Dialog item identifiers.                                          */
  40. /*-------------------------------------------------------------------*/
  41. #define IDD_DLG_HIDE                      1330
  42. #define IDD_LOAD                          1331
  43. #define IDD_HIDE                          1332
  44. #define IDD_RESTORE                       1333
  45. #define IDD_CLOSE                         1334
  46.  
  47. /*-------------------------------------------------------------------*/
  48. /* Help IDs                                                          */
  49. /*-------------------------------------------------------------------*/
  50. #define HIDEKBD_HELPTABLE                  800
  51. #define HIDEKBD_HELPSUBTABLE               801
  52. #define BTNLOAD_HELPSUBTABLE               802
  53. #define BTNHIDE_HELPSUBTABLE               803
  54. #define BTNREST_HELPSUBTABLE               804
  55. #define BTNCLOSE_HELPSUBTABLE              805
  56.  
  57. #define PANEL_HIDEKBD                      910
  58. #define PANEL_BTNLOAD                      911
  59. #define PANEL_BTNHIDE                      912
  60. #define PANEL_BTNREST                      913
  61. #define PANEL_BTNCLOSE                     914
  62.  
  63. /*-------------------------------------------------------------------*/
  64. /* String identifiers.                                               */
  65. /*-------------------------------------------------------------------*/
  66. #define MY_MSG                            2800
  67.  
  68. #define IDS_APPNAME                   MY_MSG+1
  69. #define IDS_NOSTANDARDWIN             MY_MSG+2
  70. #define IDS_NOREGISTER                MY_MSG+3
  71. #define IDS_NOERASE                   MY_MSG+4
  72. #define IDS_NO_KBD_LOAD               MY_MSG+5
  73. #define IDS_NO_KBD_RUNNING            MY_MSG+6
  74. #define IDS_NO_HIDE_KBD               MY_MSG+7
  75. #define IDS_NO_RESTORE_KBD            MY_MSG+8
  76. #define IDS_NO_CLOSE_KBD              MY_MSG+9
  77. #define IDS_NO_HELP                   MY_MSG+10
  78. #define IDS_PEN_NOT_INSTALLED         MY_MSG+11
  79. #define IDS_PEN_NOT_RUNNING           MY_MSG+12
  80.  
  81. /*-------------------------------------------------------------------*/
  82. /* Constants.                                                        */
  83. /*-------------------------------------------------------------------*/
  84.  
  85. #define MAXSTRINGLEN         80
  86. #define PARMLEN              16
  87. #define THREADSTACKSIZE   8192L
  88. #define SEM_WAIT            -1L
  89. #define SEM_TIMEOUT      10000L
  90.  
  91. /*-------------------------------------------------------------------*/
  92. /* Public Variables                                                  */
  93. /*-------------------------------------------------------------------*/
  94.  
  95. CHAR    szMsgString[MAXSTRINGLEN];          /* string for messages   */
  96.  
  97. /*-------------------------------------------------------------------*/
  98. /* Private Variables                                                 */
  99. /*-------------------------------------------------------------------*/
  100.  
  101. static  BOOL    fRunning=FALSE;             /* keyboard running flag */
  102. static  HAB     hab;                        /* anchor block handle   */
  103. static  HWND    hwndFrame;                  /* frame window handle   */
  104. static  HWND    hwndClient;                 /* client window handle  */
  105. static  HWND    hwndDemoWin;                /* demo dialog handle    */
  106. static  HWND    hwndHelp;                   /* help window handle    */
  107. static  HMQ     hmq;                        /* message queue handle  */
  108. static  QMSG    qmsg;                       /* message from msg Q    */
  109. static  CHAR    szString[MAXSTRINGLEN];     /* string to display     */
  110.  
  111. /*-------------------------------------------------------------------*/
  112. /* Internal function prototypes                                      */
  113. /*-------------------------------------------------------------------*/
  114.  
  115. static MRESULT EXPENTRY MainWndProc( HWND, USHORT, MPARAM, MPARAM );
  116. static MRESULT EXPENTRY DemoDlgProc( HWND, USHORT, MPARAM, MPARAM );
  117. static MRESULT EXPENTRY InstDlgProc( HWND, USHORT, MPARAM, MPARAM );
  118. static MRESULT EXPENTRY MessageDlgProc( HWND, USHORT, MPARAM, MPARAM );
  119. static VOID DisplayMessage( HAB, ULONG );
  120. static VOID    InitHelp(VOID);
  121.