htmlhelp.pp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2009 by Marco van de Voort
  4. member of the Free Pascal development team.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. Original copyright statement follows.
  11. /****************************************************************************
  12. * *
  13. * HtmlHelp.h *
  14. * *
  15. * Copyright (c) 1996-1997, Microsoft Corp. All rights reserved. *
  16. * *
  17. ****************************************************************************/
  18. }
  19. unit htmlhelp;
  20. interface
  21. {$ifdef FPC_OS_UNICODE}
  22. {$define UNICODE}
  23. {$endif}
  24. Uses Windows;
  25. const
  26. // Commands to pass to HtmlHelp()
  27. HH_DISPLAY_TOPIC = $0000;
  28. HH_HELP_FINDER = $0000; // WinHelp equivalent
  29. HH_DISPLAY_TOC = $0001;
  30. HH_DISPLAY_INDEX = $0002;
  31. HH_DISPLAY_SEARCH = $0003;
  32. HH_SET_WIN_TYPE = $0004;
  33. HH_GET_WIN_TYPE = $0005;
  34. HH_GET_WIN_HANDLE = $0006;
  35. HH_ENUM_INFO_TYPE = $0007; // Get Info type name, call repeatedly to enumerate, -1 at end
  36. HH_SET_INFO_TYPE = $0008; // Add Info type to filter.
  37. HH_SYNC = $0009;
  38. HH_RESERVED1 = $000A;
  39. HH_RESERVED2 = $000B;
  40. HH_RESERVED3 = $000C;
  41. HH_KEYWORD_LOOKUP = $000D;
  42. HH_DISPLAY_TEXT_POPUP = $000E; // display string resource id or text in a popup window
  43. HH_HELP_CONTEXT = $000F; // display mapped numeric value in dwData
  44. HH_TP_HELP_CONTEXTMENU = $0010; // text popup help, same as WinHelp HELP_CONTEXTlMENU
  45. HH_TP_HELP_WM_HELP = $0011; // text popup help, same as WinHelp HELP_WM_HELP
  46. HH_CLOSE_ALL = $0012; // close all windows opened directly or indirectly by the caller
  47. HH_ALINK_LOOKUP = $0013; // ALink version of HH_KEYWORD_LOOKUP
  48. HH_GET_LAST_ERROR = $0014; // not currently implemented // See HHERROR.h
  49. HH_ENUM_CATEGORY = $0015; // Get category name, call repeatedly to enumerate, -1 at end
  50. HH_ENUM_CATEGORY_IT = $0016; // Get category info type members, call repeatedly to enumerate, -1 at end
  51. HH_RESET_IT_FILTER = $0017; // Clear the info type filter of all info types.
  52. HH_SET_INCLUSIVE_FILTER = $0018; // set inclusive filtering method for untyped topics to be included in display
  53. HH_SET_EXCLUSIVE_FILTER = $0019; // set exclusive filtering method for untyped topics to be excluded from display
  54. HH_INITIALIZE = $001C; // Initializes the help system.
  55. HH_UNINITIALIZE = $001D; // Uninitializes the help system.
  56. HH_SET_QUERYSERVICE = $001E; // Set the Host IQueryService interface
  57. HH_PRETRANSLATEMESSAGE = $00fd; // Pumps messages. (NULL, NULL, MSG*).
  58. HH_SET_GLOBAL_PROPERTY = $00fc; // Set a global property. (NULL, NULL, HH_GPROP)
  59. HH_SAFE_DISPLAY_TOPIC = $0020; // private addition to the interface for InternetExplorer.
  60. HHWIN_PROP_TAB_AUTOHIDESHOW = (1 shl 0); // Automatically hide/show tri-pane window
  61. HHWIN_PROP_ONTOP = (1 shl 1); // Top-most window
  62. HHWIN_PROP_NOTITLEBAR = (1 shl 2); // no title bar
  63. HHWIN_PROP_NODEF_STYLES = (1 shl 3); // no default window styles (only HH_WINTYPE.dwStyles)
  64. HHWIN_PROP_NODEF_EXSTYLES = (1 shl 4); // no default extended window styles (only HH_WINTYPE.dwExStyles)
  65. HHWIN_PROP_TRI_PANE = (1 shl 5); // use a tri-pane window
  66. HHWIN_PROP_NOTB_TEXT = (1 shl 6); // no text on toolbar buttons
  67. HHWIN_PROP_POST_QUIT = (1 shl 7); // post WM_QUIT message when window closes
  68. HHWIN_PROP_AUTO_SYNC = (1 shl 8); // automatically ssync contents and index
  69. HHWIN_PROP_TRACKING = (1 shl 9); // send tracking notification messages
  70. HHWIN_PROP_TAB_SEARCH = (1 shl 10); // include search tab in navigation pane
  71. HHWIN_PROP_TAB_HISTORY = (1 shl 11); // include history tab in navigation pane
  72. HHWIN_PROP_TAB_FAVORITES = (1 shl 12); // include favorites tab in navigation pane
  73. HHWIN_PROP_CHANGE_TITLE = (1 shl 13); // Put current HTML title in title bar
  74. HHWIN_PROP_NAV_ONLY_WIN = (1 shl 14); // Only display the navigation window
  75. HHWIN_PROP_NO_TOOLBAR = (1 shl 15); // Don't display a toolbar
  76. HHWIN_PROP_MENU = (1 shl 16); // Menu
  77. HHWIN_PROP_TAB_ADVSEARCH = (1 shl 17); // Advanced FTS UI.
  78. HHWIN_PROP_USER_POS = (1 shl 18); // After initial creation, user controls window size/position
  79. HHWIN_PROP_TAB_CUSTOM1 = (1 shl 19); // Use custom tab #1
  80. HHWIN_PROP_TAB_CUSTOM2 = (1 shl 20); // Use custom tab #2
  81. HHWIN_PROP_TAB_CUSTOM3 = (1 shl 21); // Use custom tab #3
  82. HHWIN_PROP_TAB_CUSTOM4 = (1 shl 22); // Use custom tab #4
  83. HHWIN_PROP_TAB_CUSTOM5 = (1 shl 23); // Use custom tab #5
  84. HHWIN_PROP_TAB_CUSTOM6 = (1 shl 24); // Use custom tab #6
  85. HHWIN_PROP_TAB_CUSTOM7 = (1 shl 25); // Use custom tab #7
  86. HHWIN_PROP_TAB_CUSTOM8 = (1 shl 26); // Use custom tab #8
  87. HHWIN_PROP_TAB_CUSTOM9 = (1 shl 27); // Use custom tab #9
  88. HHWIN_TB_MARGIN = (1 shl 28); // the window type has a margin
  89. HHWIN_PARAM_PROPERTIES = (1 shl 1); // valid fsWinProperties
  90. HHWIN_PARAM_STYLES = (1 shl 2); // valid dwStyles
  91. HHWIN_PARAM_EXSTYLES = (1 shl 3); // valid dwExStyles
  92. HHWIN_PARAM_RECT = (1 shl 4); // valid rcWindowPos
  93. HHWIN_PARAM_NAV_WIDTH = (1 shl 5); // valid iNavWidth
  94. HHWIN_PARAM_SHOWSTATE = (1 shl 6); // valid nShowState
  95. HHWIN_PARAM_INFOTYPES = (1 shl 7); // valid apInfoTypes
  96. HHWIN_PARAM_TB_FLAGS = (1 shl 8); // valid fsToolBarFlags
  97. HHWIN_PARAM_EXPANSION = (1 shl 9); // valid fNotExpanded
  98. HHWIN_PARAM_TABPOS = (1 shl 10); // valid tabpos
  99. HHWIN_PARAM_TABORDER = (1 shl 11); // valid taborder
  100. HHWIN_PARAM_HISTORY_COUNT = (1 shl 12); // valid cHistory
  101. HHWIN_PARAM_CUR_TAB = (1 shl 13); // valid curNavType
  102. HHWIN_BUTTON_EXPAND = (1 shl 1); // Expand/contract button
  103. HHWIN_BUTTON_BACK = (1 shl 2); // Back button
  104. HHWIN_BUTTON_FORWARD = (1 shl 3); // Forward button
  105. HHWIN_BUTTON_STOP = (1 shl 4); // Stop button
  106. HHWIN_BUTTON_REFRESH = (1 shl 5); // Refresh button
  107. HHWIN_BUTTON_HOME = (1 shl 6); // Home button
  108. HHWIN_BUTTON_BROWSE_FWD = (1 shl 7); // not implemented
  109. HHWIN_BUTTON_BROWSE_BCK = (1 shl 8); // not implemented
  110. HHWIN_BUTTON_NOTES = (1 shl 9); // not implemented
  111. HHWIN_BUTTON_CONTENTS = (1 shl 10); // not implemented
  112. HHWIN_BUTTON_SYNC = (1 shl 11); // Sync button
  113. HHWIN_BUTTON_OPTIONS = (1 shl 12); // Options button
  114. HHWIN_BUTTON_PRINT = (1 shl 13); // Print button
  115. HHWIN_BUTTON_INDEX = (1 shl 14); // not implemented
  116. HHWIN_BUTTON_SEARCH = (1 shl 15); // not implemented
  117. HHWIN_BUTTON_HISTORY = (1 shl 16); // not implemented
  118. HHWIN_BUTTON_FAVORITES = (1 shl 17); // not implemented
  119. HHWIN_BUTTON_JUMP1 = (1 shl 18);
  120. HHWIN_BUTTON_JUMP2 = (1 shl 19);
  121. HHWIN_BUTTON_ZOOM = (1 shl 20);
  122. HHWIN_BUTTON_TOC_NEXT = (1 shl 21);
  123. HHWIN_BUTTON_TOC_PREV = (1 shl 22);
  124. // Button IDs
  125. IDTB_EXPAND = 200;
  126. IDTB_CONTRACT = 201;
  127. IDTB_STOP = 202;
  128. IDTB_REFRESH = 203;
  129. IDTB_BACK = 204;
  130. IDTB_HOME = 205;
  131. IDTB_SYNC = 206;
  132. IDTB_PRINT = 207;
  133. IDTB_OPTIONS = 208;
  134. IDTB_FORWARD = 209;
  135. IDTB_NOTES = 210; // not implemented
  136. IDTB_BROWSE_FWD = 211;
  137. IDTB_BROWSE_BACK = 212;
  138. IDTB_CONTENTS = 213; // not implemented
  139. IDTB_INDEX = 214; // not implemented
  140. IDTB_SEARCH = 215; // not implemented
  141. IDTB_HISTORY = 216; // not implemented
  142. IDTB_FAVORITES = 217; // not implemented
  143. IDTB_JUMP1 = 218;
  144. IDTB_JUMP2 = 219;
  145. IDTB_CUSTOMIZE = 221;
  146. IDTB_ZOOM = 222;
  147. IDTB_TOC_NEXT = 223;
  148. IDTB_TOC_PREV = 224;
  149. // Notification codes
  150. HHN_FIRST = longword (0)-longword(860); // (0U-860U)
  151. HHN_LAST = longword (0)-longword(879); // (0U-879U)
  152. HHN_NAVCOMPLETE = (HHN_FIRST-0);
  153. HHN_TRACK = (HHN_FIRST-1);
  154. HHN_WINDOW_CREATE = (HHN_FIRST-2);
  155. HHWIN_DEF_BUTTONS = (HHWIN_BUTTON_EXPAND or
  156. HHWIN_BUTTON_BACK or
  157. HHWIN_BUTTON_OPTIONS or
  158. HHWIN_BUTTON_PRINT);
  159. HHWIN_NAVTYPE_TOC = 0;
  160. HHWIN_NAVTYPE_INDEX = 1;
  161. HHWIN_NAVTYPE_SEARCH = 2;
  162. HHWIN_NAVTYPE_FAVORITES = 3;
  163. HHWIN_NAVTYPE_HISTORY = 4; // not implemented
  164. HHWIN_NAVTYPE_AUTHOR = 5;
  165. HHWIN_NAVTYPE_CUSTOM_FIRST = 11;
  166. IT_INCLUSIVE = 0;
  167. IT_EXCLUSIVE = 1;
  168. IT_HIDDEN = 2;
  169. HHWIN_NAVTAB_TOP = 0;
  170. HHWIN_NAVTAB_LEFT = 1;
  171. HHWIN_NAVTAB_BOTTOM = 2;
  172. HH_MAX_TABS = 19; // maximum number of tabs
  173. HH_TAB_CONTENTS = 0;
  174. HH_TAB_INDEX = 1;
  175. HH_TAB_SEARCH = 2;
  176. HH_TAB_FAVORITES = 3;
  177. HH_TAB_HISTORY = 4;
  178. HH_TAB_AUTHOR = 5;
  179. HH_TAB_CUSTOM_FIRST = 11;
  180. HH_TAB_CUSTOM_LAST = HH_MAX_TABS;
  181. HH_MAX_TABS_CUSTOM = (HH_TAB_CUSTOM_LAST - HH_TAB_CUSTOM_FIRST + 1);
  182. // HH_DISPLAY_SEARCH Command Related Structures and Constants
  183. HH_FTS_DEFAULT_PROXIMITY = (-1);
  184. HHACT_TAB_CONTENTS = 0;
  185. HHACT_TAB_INDEX = 1;
  186. HHACT_TAB_SEARCH = 2;
  187. HHACT_TAB_HISTORY = 3;
  188. HHACT_TAB_FAVORITES = 4;
  189. HHACT_EXPAND = 5;
  190. HHACT_CONTRACT = 6;
  191. HHACT_BACK = 7;
  192. HHACT_FORWARD = 8;
  193. HHACT_STOP = 9;
  194. HHACT_REFRESH = 10;
  195. HHACT_HOME = 11;
  196. HHACT_SYNC = 12;
  197. HHACT_OPTIONS = 13;
  198. HHACT_PRINT = 14;
  199. HHACT_HIGHLIGHT = 15;
  200. HHACT_CUSTOMIZE = 16;
  201. HHACT_JUMP1 = 17;
  202. HHACT_JUMP2 = 18;
  203. HHACT_ZOOM = 19;
  204. HHACT_TOC_NEXT = 20;
  205. HHACT_TOC_PREV = 21;
  206. HHACT_NOTES = 22;
  207. HHACT_LAST_ENUM = 23;
  208. const
  209. External_library='hhctrl.ocx'; {Setup as you need}
  210. { Pointers to basic pascal types, inserted by h2pas conversion program.}
  211. Type
  212. PtagHHN_NOTIFY = ^tagHHN_NOTIFY;
  213. tagHHN_NOTIFY = packed record
  214. hdr : NMHDR;
  215. pszUrl : PCSTR; { Multi-byte, null-terminated string }
  216. end;
  217. HHN_NOTIFY = tagHHN_NOTIFY;
  218. PHHN_NOTIFY = ^HHN_NOTIFY;
  219. PtagHH_POPUP = ^tagHH_POPUP;
  220. tagHH_POPUP = packed record
  221. cbStruct : longint; { sizeof this structure }
  222. hinst : HINST {ANCE}; { instance handle for string resource }
  223. idString : UINT; { string resource id, or text id if pszFile is specified in HtmlHelp call }
  224. pszText : LPCTSTR; { used if idString is zero }
  225. pt : POINT; { top center of popup window }
  226. clrForeground : COLORREF; { use -1 for default }
  227. clrBackground : COLORREF; { use -1 for default }
  228. rcMargins : RECT; { amount of space between edges of window and text, -1 for each member to ignore }
  229. pszFont : LPCTSTR; { facename, point size, char set, BOLD ITALIC UNDERLINE }
  230. end;
  231. HH_POPUP = tagHH_POPUP;
  232. PHH_POPUP = ^HH_POPUP;
  233. PtagHH_AKLINK = ^tagHH_AKLINK;
  234. tagHH_AKLINK = packed record
  235. cbStruct : longint; { sizeof this structure }
  236. fReserved : BOOL; { must be FALSE (really!) }
  237. pszKeywords : LPCTSTR; { semi-colon separated keywords }
  238. pszUrl : LPCTSTR; { URL to jump to if no keywords found (may be NULL) }
  239. pszMsgText : LPCTSTR; { Message text to display in MessageBox if pszUrl is NULL and no keyword match }
  240. pszMsgTitle : LPCTSTR; { Message text to display in MessageBox if pszUrl is NULL and no keyword match }
  241. pszWindow : LPCTSTR; { Window to display URL in }
  242. fIndexOnFail : BOOL; { Displays index if keyword lookup fails. }
  243. end;
  244. HH_AKLINK = tagHH_AKLINK;
  245. PHH_AKLINK = ^HH_AKLINK;
  246. PtagHH_ENUM_IT = ^tagHH_ENUM_IT;
  247. tagHH_ENUM_IT = packed record
  248. cbStruct : longint; { size of this structure }
  249. iType : longint; { the type of the information type ie. Inclusive, Exclusive, or Hidden }
  250. pszCatName : LPCSTR; { Set to the name of the Category to enumerate the info types in a category; else NULL }
  251. pszITName : LPCSTR; { volitile pointer to the name of the infotype. Allocated by call. Caller responsible for freeing }
  252. pszITDescription : LPCSTR; { volitile pointer to the description of the infotype. }
  253. end;
  254. HH_ENUM_IT = tagHH_ENUM_IT;
  255. PHH_ENUM_IT = PtagHH_ENUM_IT;
  256. PPHH_ENUM_IT = ^PHH_ENUM_IT;
  257. PtagHH_ENUM_CAT = ^tagHH_ENUM_CAT;
  258. tagHH_ENUM_CAT = packed record
  259. cbStruct : longint; { size of this structure }
  260. pszCatName : LPCSTR; { volitile pointer to the category name }
  261. pszCatDescription : LPCSTR; { volitile pointer to the category description }
  262. end;
  263. HH_ENUM_CAT = tagHH_ENUM_CAT;
  264. PHH_ENUM_CAT = PtagHH_ENUM_CAT;
  265. PPHH_ENUM_CAT = ^PHH_ENUM_CAT;
  266. PtagHH_SET_INFOTYPE = ^tagHH_SET_INFOTYPE;
  267. tagHH_SET_INFOTYPE = packed record
  268. cbStruct : longint; { the size of this structure }
  269. pszCatName : LPCSTR; { the name of the category, if any, the InfoType is a member of. }
  270. pszInfoTypeName : LPCSTR; { the name of the info type to add to the filter }
  271. end;
  272. HH_SET_INFOTYPE = tagHH_SET_INFOTYPE;
  273. PHH_SET_INFOTYPE = PtagHH_SET_INFOTYPE;
  274. PPHH_SET_INFOTYPE = ^PHH_SET_INFOTYPE;
  275. HH_INFOTYPE = DWORD;
  276. PPHH_INFOTYPE = ^PHH_INFOTYPE;
  277. PHH_INFOTYPE = HH_INFOTYPE;
  278. PtagHH_FTS_QUERY = ^tagHH_FTS_QUERY;
  279. tagHH_FTS_QUERY = packed record
  280. cbStruct : longint; { Sizeof structure in bytes. }
  281. fUniCodeStrings : BOOL; { TRUE if all strings are unicode. }
  282. pszSearchQuery : LPCTSTR; { String containing the search query. }
  283. iProximity : LONG; { Word proximity. }
  284. fStemmedSearch : BOOL; { TRUE for StemmedSearch only. }
  285. fTitleOnly : BOOL; { TRUE for Title search only. }
  286. fExecute : BOOL; { TRUE to initiate the search. }
  287. pszWindow : LPCTSTR; { Window to display in }
  288. end;
  289. HH_FTS_QUERY = tagHH_FTS_QUERY;
  290. PHH_FTS_QUERY = ^HH_FTS_QUERY;
  291. PtagHH_WINTYPE = ^tagHH_WINTYPE;
  292. tagHH_WINTYPE = packed record { HH_WINTYPE Structure }
  293. cbStruct : longint; { IN: size of this structure including all Information Types }
  294. fUniCodeStrings : BOOL; { IN/OUT: TRUE if all strings are in UNICODE }
  295. pszType : LPCTSTR; { IN/OUT: Name of a type of window }
  296. fsValidMembers : DWORD; { IN: Bit flag of valid members (HHWIN_PARAM_) }
  297. fsWinProperties : DWORD; { IN/OUT: Properties/attributes of the window (HHWIN_) }
  298. pszCaption : LPCTSTR; { IN/OUT: Window title }
  299. dwStyles : DWORD; { IN/OUT: Window styles }
  300. dwExStyles : DWORD; { IN/OUT: Extended Window styles }
  301. rcWindowPos : RECT; { IN: Starting position, OUT: current position }
  302. nShowState : longint; { IN: show state (e.g., SW_SHOW) }
  303. hwndHelp : HWND; { OUT: window handle }
  304. hwndCaller : HWND; { OUT: who called this window }
  305. paInfoTypes : PHH_INFOTYPE; { IN: Pointer to an array of Information Types }
  306. { The following members are only valid if HHWIN_PROP_TRI_PANE is set }
  307. hwndToolBar : HWND; { OUT: toolbar window in tri-pane window }
  308. hwndNavigation : HWND; { OUT: navigation window in tri-pane window }
  309. hwndHTML : HWND; { OUT: window displaying HTML in tri-pane window }
  310. iNavWidth : longint; { IN/OUT: width of navigation window }
  311. rcHTML : RECT; { OUT: HTML window coordinates }
  312. pszToc : LPCTSTR; { IN: Location of the table of contents file }
  313. pszIndex : LPCTSTR; { IN: Location of the index file }
  314. pszFile : LPCTSTR; { IN: Default location of the html file }
  315. pszHome : LPCTSTR; { IN/OUT: html file to display when Home button is clicked }
  316. fsToolBarFlags : DWORD; { IN: flags controling the appearance of the toolbar }
  317. fNotExpanded : BOOL; { IN: TRUE/FALSE to contract or expand, OUT: current state }
  318. curNavType : longint; { IN/OUT: UI to display in the navigational pane }
  319. tabpos : longint; { IN/OUT: HHWIN_NAVTAB_TOP, HHWIN_NAVTAB_LEFT, or HHWIN_NAVTAB_BOTTOM }
  320. idNotify : longint; { IN: ID to use for WM_NOTIFY messages }
  321. tabOrder : array[0..(HH_MAX_TABS+1)-1] of BYTE; { IN/OUT: tab order: Contents, Index, Search, History, Favorites, Reserved 1-5, Custom tabs }
  322. cHistory : longint; { IN/OUT: number of history items to keep (default is 30) }
  323. pszJump1 : LPCTSTR; { Text for HHWIN_BUTTON_JUMP1 }
  324. pszJump2 : LPCTSTR; { Text for HHWIN_BUTTON_JUMP2 }
  325. pszUrlJump1 : LPCTSTR; { URL for HHWIN_BUTTON_JUMP1 }
  326. pszUrlJump2 : LPCTSTR; { URL for HHWIN_BUTTON_JUMP2 }
  327. rcMinSize : RECT; { Minimum size for window (ignored in version 1) }
  328. cbInfoTypes : longint; { size of paInfoTypes; }
  329. pszCustomTabs : LPCTSTR; { multiple zero-terminated strings }
  330. end;
  331. HH_WINTYPE = tagHH_WINTYPE;
  332. PHH_WINTYPE = PtagHH_WINTYPE;
  333. PPHH_WINTYPE = ^PHH_WINTYPE;
  334. PtagHHNTRACK = ^tagHHNTRACK;
  335. tagHHNTRACK = packed record
  336. hdr : NMHDR;
  337. pszCurUrl : PCSTR; { Multi-byte, null-terminated string }
  338. idAction : longint; { HHACT_ value }
  339. phhWinType : PHH_WINTYPE; { Current window type structure }
  340. end;
  341. HHNTRACK = tagHHNTRACK;
  342. PHHNTRACK = ^HHNTRACK;
  343. function HtmlHelpA(hwndCaller:HWND; pszFile:LPCSTR; uCommand:UINT; dwData:DWORD_PTR):HWND;stdcall;external External_library name 'HtmlHelpA';
  344. function HtmlHelpW(hwndCaller:HWND; pszFile:LPCWSTR; uCommand:UINT; dwData:DWORD_PTR):HWND;stdcall;external External_library name 'HtmlHelpW';
  345. {$ifdef Unicode}
  346. function HtmlHelp(hwndCaller:HWND; pszFile:LPCWSTR; uCommand:UINT; dwData:DWORD_PTR):HWND;stdcall;external External_library name 'HtmlHelpW';
  347. {$else}
  348. function HtmlHelp(hwndCaller:HWND; pszFile:LPCSTR; uCommand:UINT; dwData:DWORD_PTR):HWND;stdcall;external External_library name 'HtmlHelpA';
  349. {$endif}
  350. type HH_GPROPID = (
  351. HH_GPROPID_SINGLETHREAD=1, // VARIANT_BOOL: True for single thread
  352. HH_GPROPID_TOOLBAR_MARGIN=2, // long: Provides a left/right margin around the toolbar.
  353. HH_GPROPID_UI_LANGUAGE=3, // long: LangId of the UI.
  354. HH_GPROPID_CURRENT_SUBSET=4, // BSTR: Current subset.
  355. HH_GPROPID_CONTENT_LANGUAGE=5 // long: LandId for desired content.
  356. );
  357. {$packrecords 8}
  358. type
  359. PtagHH_GLOBAL_PROPERTY = ^tagHH_GLOBAL_PROPERTY;
  360. tagHH_GLOBAL_PROPERTY = packed record
  361. id : HH_GPROPID;
  362. _var : VARIANT;
  363. end;
  364. HH_GLOBAL_PROPERTY = tagHH_GLOBAL_PROPERTY;
  365. PHH_GLOBAL_PROPERTY = ^HH_GLOBAL_PROPERTY;
  366. implementation
  367. end.