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

  1. /*****************************************************************************/
  2. /*                                                                           */
  3. /* File Name:    MOVEKBD.H                                                   */
  4. /*                                                                           */
  5. /* Description:  Defines, static variable definitons and function            */
  6. /*               prototypes for MOVEKBD 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_DEMO                          1310
  34. #define IDM_OPTIONS                       1311
  35. #define IDM_EXIT_DEMO                     1312
  36. #define IDM_HELP                          1313
  37.  
  38. /*-------------------------------------------------------------------*/
  39. /* Dialog item identifiers.                                          */
  40. /*-------------------------------------------------------------------*/
  41. #define IDD_DLG_MOVE                      1330
  42. #define IDD_LOAD                          1331
  43. #define IDD_MOVE                          1332
  44. #define IDD_ENLARGE                       1333
  45. #define IDD_SHRINK                        1334
  46. #define IDD_CLOSE                         1335
  47.  
  48. /*-------------------------------------------------------------------*/
  49. /* Help IDs                                                          */
  50. /*-------------------------------------------------------------------*/
  51. #define MOVEKBD_HELPTABLE                  800
  52. #define MOVEKBD_HELPSUBTABLE               801
  53. #define BTNLOAD_HELPSUBTABLE               802
  54. #define BTNMOVE_HELPSUBTABLE               803
  55. #define BTNLARG_HELPSUBTABLE               804
  56. #define BTNSHNK_HELPSUBTABLE               805
  57. #define BTNCLOSE_HELPSUBTABLE              806
  58.  
  59. #define PANEL_MOVEKBD                      910
  60. #define PANEL_BTNLOAD                      911
  61. #define PANEL_BTNMOVE                      912
  62. #define PANEL_BTNLARG                      913
  63. #define PANEL_BTNSHNK                      914
  64. #define PANEL_BTNCLOSE                     915
  65.  
  66. /*-------------------------------------------------------------------*/
  67. /* String identifiers.                                               */
  68. /*-------------------------------------------------------------------*/
  69. #define MY_MSG                            2800
  70.  
  71. #define IDS_APPNAME                   MY_MSG+1
  72. #define IDS_NOSTANDARDWIN             MY_MSG+2
  73. #define IDS_NOREGISTER                MY_MSG+3
  74. #define IDS_NOERASE                   MY_MSG+4
  75. #define IDS_NO_KBD_LOAD               MY_MSG+5
  76. #define IDS_NO_KBD_RUNNING            MY_MSG+6
  77. #define IDS_NO_SET_KBD_POS            MY_MSG+7
  78. #define IDS_NO_QUERY_KBD_POS          MY_MSG+8
  79. #define IDS_NO_RESIZE_KBD             MY_MSG+9
  80. #define IDS_NO_CLOSE_KBD              MY_MSG+10
  81. #define IDS_NO_HELP                   MY_MSG+11
  82. #define IDS_PEN_NOT_INSTALLED         MY_MSG+12
  83. #define IDS_PEN_NOT_RUNNING           MY_MSG+13
  84.  
  85. /*-------------------------------------------------------------------*/
  86. /* Constants.                                                        */
  87. /*-------------------------------------------------------------------*/
  88.  
  89. #define MAXSTRINGLEN                 80
  90. #define KEYBOARD_MOVE_INCREMENT      50L
  91. #define KEYBOARD_SIZE_INCREMENT      25L
  92. #define PARMLEN                      16
  93.  
  94. /*-------------------------------------------------------------------*/
  95. /* Public Variables                                                  */
  96. /*-------------------------------------------------------------------*/
  97.  
  98. static  BOOL    fRunning=FALSE;                /* keyboard running flag */
  99. static  HAB     hab;                           /* anchor block handle   */
  100. static  HWND    hwndFrame;                     /* frame window handle   */
  101. static  HWND    hwndClient;                    /* client window handle  */
  102. static  HWND    hwndDemoWin;                   /* demo window handle    */
  103. static  HWND    hwndHelp;                      /* help window handle    */
  104. static  HMQ     hmq;                           /* message queue handle  */
  105. static  QMSG    qmsg;                          /* message from msg Q    */
  106. static  LONG    lScreenWd;                     /* screen width          */
  107. static  LONG    lScreenHt;                     /* screen height         */
  108. static  SWP     sDWin;                         /* window coordinates    */
  109. static  SWP     sWinPos;                       /* DeskTop size          */
  110. static  SWP     sKbdPos;                       /* popup keyboard pos    */
  111. static  CHAR    szMsgString[MAXSTRINGLEN];     /* message buffer        */
  112. static  CHAR    szString[MAXSTRINGLEN];        /* message buffer        */
  113.  
  114. /*-------------------------------------------------------------------*/
  115. /* Internal function prototypes                                      */
  116. /*-------------------------------------------------------------------*/
  117.  
  118. static MRESULT EXPENTRY MainWndProc( HWND, USHORT, MPARAM, MPARAM );
  119. static MRESULT EXPENTRY DemoDlgProc( HWND, USHORT, MPARAM, MPARAM );
  120. static VOID DisplayMessage( HAB, ULONG );
  121. static VOID InitHelp( VOID );
  122.