home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 7.ddi / INCLUDE / PMHELP.H$ / PMHELP.bin
Encoding:
Text File  |  1989-11-02  |  11.0 KB  |  268 lines

  1. /************************************************************************\
  2. *
  3. * Module Name: PMHELP.H
  4. *
  5. * OS/2 Information Presentation Facility (IPF) for providing Help
  6. *
  7. * Copyright (c) 1989-1990, Microsoft Corporation.  All rights reserved.
  8. *
  9. *************************************************************************
  10. * Define INCL_WINHELP before OS2.H to include this file
  11. \************************************************************************/
  12.  
  13. #define PMHELP_INCLUDED
  14.  
  15. #ifndef PMHELP_H
  16. #define PMHELP_H
  17.  
  18. /************************************************************************/
  19. /* HelpSubTable entry structure                     */
  20. /************************************************************************/
  21.  
  22. typedef int HELPSUBTABLE;
  23. typedef int far *PHELPSUBTABLE;
  24.  
  25. /************************************************************************/
  26. /* HelpTable entry structure                        */
  27. /************************************************************************/
  28.  
  29. typedef struct _HELPTABLE   {  /* ht */
  30.     USHORT        idAppWindow;
  31.     PHELPSUBTABLE    phstHelpSubTable;
  32.     USHORT        idExtPanel;
  33. } HELPTABLE, FAR *PHELPTABLE;
  34.  
  35. /************************************************************************/
  36. /* IPF Initialization Structure used on the                */
  37. /* WinCreateHelpInstance() call.                    */
  38. /************************************************************************/
  39.  
  40. typedef struct _HELPINIT {    /* hinit */
  41.     USHORT       cb;
  42.     ULONG       ulReturnCode;
  43.     PSZ       pszTutorialName;
  44.     PHELPTABLE phtHelpTable;
  45.     HMODULE    hmodHelpTableModule;
  46.     HMODULE    hmodAccelActionBarModule;
  47.     USHORT       idAccelTable;
  48.     USHORT       idActionBar;
  49.     PSZ       pszHelpWindowTitle;
  50.     USHORT       usShowPanelId;
  51.     PSZ       pszHelpLibraryName;
  52. } HELPINIT,  FAR *PHELPINIT;
  53.  
  54.  
  55. /************************************************************************/
  56. /* Search parent chain indicator for HM_SET_ACTIVE_WINDOW message.    */
  57. /************************************************************************/
  58.  
  59. #define HWND_PARENT    (HWND) NULL
  60.  
  61. /************************************************************************/
  62. /* Constants used to define whether user wants to display panel using    */
  63. /* panel number or panel name.                        */
  64. /************************************************************************/
  65.  
  66. #define HM_RESOURCEID        0
  67. #define HM_PANELNAME        1
  68.  
  69. #define HMPANELTYPE_NUMBER    0
  70. #define HMPANELTYPE_NAME    1
  71.  
  72. /************************************************************************/
  73. /* Constants used to define the how the panel IDs are displayed on    */
  74. /* help panels.                             */
  75. /************************************************************************/
  76.  
  77. #define CMIC_HIDE_PANEL_ID    0x0000
  78. #define CMIC_SHOW_PANEL_ID    0x0001
  79. #define CMIC_TOGGLE_PANEL_ID    0x0002
  80.  
  81. /************************************************************************/
  82. /* Window Help function declarations.                    */
  83. /************************************************************************/
  84.  
  85. BOOL APIENTRY  WinDestroyHelpInstance(HWND hwndHelpInstance);
  86. HWND APIENTRY  WinCreateHelpInstance(HAB hab, PHELPINIT phinitHMInitStructure);
  87. BOOL APIENTRY  WinAssociateHelpInstance(HWND hwndHelpInstance, HWND hwndApp);
  88. HWND APIENTRY  WinQueryHelpInstance(HWND hwndApp);
  89. BOOL APIENTRY  WinLoadHelpTable(HWND hwndHelpInstance, USHORT idHelpTable,
  90.                 HMODULE Module);
  91. BOOL APIENTRY  WinCreateHelpTable(HWND hwndHelpInstance,
  92.                   PHELPTABLE phtHelpTable);
  93.  
  94. /************************************************************************/
  95. /* IPF message base.                            */
  96. /************************************************************************/
  97.  
  98. #define HM_MSG_BASE        0x0220
  99.  
  100. /************************************************************************/
  101. /* Messages applications can send to the IPF.                */
  102. /************************************************************************/
  103.  
  104. #define HM_DISMISS_WINDOW        HM_MSG_BASE+0x0001
  105. #define HM_DISPLAY_HELP         HM_MSG_BASE+0x0002
  106. #define HM_EXT_HELP            HM_MSG_BASE+0x0003
  107. #define HM_SET_ACTIVE_WINDOW        HM_MSG_BASE+0x0004
  108. #define HM_LOAD_HELP_TABLE        HM_MSG_BASE+0x0005
  109. #define HM_CREATE_HELP_TABLE        HM_MSG_BASE+0x0006
  110. #define HM_SET_HELP_WINDOW_TITLE    HM_MSG_BASE+0x0007
  111. #define HM_SET_SHOW_PANEL_ID        HM_MSG_BASE+0x0008
  112. #define HM_REPLACE_HELP_FOR_HELP    HM_MSG_BASE+0x0009
  113. #define HM_HELP_INDEX            HM_MSG_BASE+0x000a
  114. #define HM_HELP_CONTENTS        HM_MSG_BASE+0x000b
  115. #define HM_KEYS_HELP            HM_MSG_BASE+0x000c
  116. #define HM_SET_HELP_LIBRARY_NAME    HM_MSG_BASE+0x000d
  117.  
  118. /************************************************************************/
  119. /* Messages the IPF sends to the applications active window        */
  120. /* as defined by the IPF.                        */
  121. /************************************************************************/
  122.  
  123. #define HM_ERROR            HM_MSG_BASE+0x000e
  124. #define HM_HELPSUBITEM_NOT_FOUND    HM_MSG_BASE+0x000f
  125. #define HM_QUERY_KEYS_HELP        HM_MSG_BASE+0x0010
  126. #define HM_TUTORIAL            HM_MSG_BASE+0x0011
  127. #define HM_EXT_HELP_UNDEFINED        HM_MSG_BASE+0x0012
  128. #define HM_ACTIONBAR_COMMAND        HM_MSG_BASE+0x0013
  129. #define HM_INFORM            HM_MSG_BASE+0x0014
  130.  
  131. /************************************************************************/
  132. /* HMERR_NO_FRAME_WND_IN_CHAIN - There is no frame window in the    */
  133. /* window chain from which to find or set the associated help        */
  134. /* instance.                                */
  135. /************************************************************************/
  136.  
  137. #define  HMERR_NO_FRAME_WND_IN_CHAIN        0x00001001L
  138.  
  139. /************************************************************************/
  140. /* HMERR_INVALID_ASSOC_APP_WND - The application window handle        */
  141. /* specified on the WinAssociateHelpInstance() call is not a valid    */
  142. /* window handle.                            */
  143. /************************************************************************/
  144.  
  145. #define  HMERR_INVALID_ASSOC_APP_WND        0x00001002L
  146.  
  147. /************************************************************************/
  148. /* HMERR_INVALID_ASSOC_HELP_INST - The help instance handle specified    */
  149. /* on the WinAssociateHelpInstance() call is not a valid        */
  150. /* window handle.                            */
  151. /************************************************************************/
  152.  
  153. #define  HMERR_INVALID_ASSOC_HELP_INST        0x00001003L
  154.  
  155. /************************************************************************/
  156. /* HMERR_INVALID_DESTROY_HELP_INST - The window handle specified    */
  157. /* as the help instance to destroy is not of the help instance class.    */
  158. /************************************************************************/
  159.  
  160. #define  HMERR_INVALID_DESTROY_HELP_INST    0x00001004L
  161.  
  162. /************************************************************************/
  163. /* HMERR_NO_HELP_INST_IN_CHAIN - The parent or owner chain of the    */
  164. /* application window specified does not have a help instance        */
  165. /* associated with it.                            */
  166. /************************************************************************/
  167.  
  168. #define  HMERR_NO_HELP_INST_IN_CHAIN        0x00001005L
  169.  
  170. /************************************************************************/
  171. /* HMERR_INVALID_HELP_INSTANCE_HDL - The handle specified to be a    */
  172. /* help instance does not have the class name of a IPF            */
  173. /* help instance.                            */
  174. /************************************************************************/
  175.  
  176. #define  HMERR_INVALID_HELP_INSTANCE_HDL    0x00001006L
  177.  
  178. /************************************************************************/
  179. /* HMERR_INVALID_QUERY_APP_WND - The application window specified on    */
  180. /* a WinQueryHelpInstance() call is not a valid window handle.        */
  181. /************************************************************************/
  182.  
  183. #define  HMERR_INVALID_QUERY_APP_WND        0x00001007L
  184.  
  185. /************************************************************************/
  186. /* HMERR_HELP_INST_CALLED_INVALID -  The handle of the help instance    */
  187. /* specified on an API call to the IPF does not have the        */
  188. /* class name of an IPF help instance.                    */
  189. /************************************************************************/
  190.  
  191. #define  HMERR_HELP_INST_CALLED_INVALID     0x00001008L
  192. #define  HMERR_HELPTABLE_UNDEFINE        0x00001009L
  193. #define  HMERR_HELP_INSTANCE_UNDEFINE        0x0000100aL
  194. #define  HMERR_HELPITEM_NOT_FOUND        0x0000100bL
  195. #define  HMERR_INVALID_HELPSUBITEM_SIZE     0x0000100cL
  196. #define  HMERR_HELPSUBITEM_NOT_FOUND        0x0000100dL
  197.  
  198. /************************************************************************/
  199. /* HMERR_INDEX_NOT_FOUND - No index in library file.            */
  200. /************************************************************************/
  201.  
  202. #define  HMERR_INDEX_NOT_FOUND            0x00002001L
  203.  
  204. /************************************************************************/
  205. /* HMERR_CONTENT_NOT_FOUND - Library file does not have any content    */
  206. /************************************************************************/
  207.  
  208. #define  HMERR_CONTENT_NOT_FOUND        0x00002002L
  209.  
  210. /************************************************************************/
  211. /* HMERR_OPEN_LIB_FILE       - Cannot open library file            */
  212. /************************************************************************/
  213.  
  214. #define  HMERR_OPEN_LIB_FILE            0x00002003L
  215.  
  216. /************************************************************************/
  217. /* HMERR_READ_LIB_FILE       - Cannot read library file            */
  218. /************************************************************************/
  219.  
  220. #define  HMERR_READ_LIB_FILE            0x00002004L
  221.  
  222. /************************************************************************/
  223. /* HMERR_CLOSE_LIB_FILE    - Cannot close library file            */
  224. /************************************************************************/
  225.  
  226. #define  HMERR_CLOSE_LIB_FILE            0x00002005L
  227.  
  228. /************************************************************************/
  229. /* HMERR_INVALID_LIB_FILE  - Improper library file provided        */
  230. /************************************************************************/
  231.  
  232. #define  HMERR_INVALID_LIB_FILE         0x00002006L
  233.  
  234. /************************************************************************/
  235. /* HMERR_NO_MEMORY - Unable to allocate the requested amount of memory    */
  236. /************************************************************************/
  237.  
  238. #define  HMERR_NO_MEMORY            0x00002007L
  239.  
  240. /************************************************************************/
  241. /* HMERR_ALLOCATE_SEGMENT - Unable                    */
  242. /* to allocate a segment of memory for memory allocation requested    */
  243. /* from the IPF.                            */
  244. /************************************************************************/
  245.  
  246. #define  HMERR_ALLOCATE_SEGMENT         0x00002008L
  247.  
  248. /************************************************************************/
  249. /* HMERR_FREE_MEMORY - Unable to free allocated  memory.        */
  250. /************************************************************************/
  251.  
  252. #define  HMERR_FREE_MEMORY            0x00002009L
  253.  
  254. /************************************************************************/
  255. /* HMERR_PANEL_NOT_FOUND  - Unable                    */
  256. /* to find a help panel requested to IPF.                */
  257. /************************************************************************/
  258.  
  259. #define  HMERR_PANEL_NOT_FOUND            0x00002010L
  260.  
  261. /************************************************************************/
  262. /* HMERR_DATABASE_NOT_OPEN - Unable to read the unopened database.    */
  263. /************************************************************************/
  264.  
  265. #define  HMERR_DATABASE_NOT_OPEN        0x00002011L
  266.  
  267. #endif
  268.