⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 htmlhelpapi.pas

📁 Mathematic Method,(mindres carées) delphi, with help
💻 PAS
📖 第 1 页 / 共 2 页
字号:
   HHWIN_NAVTYPE_FAVORITES      = 3;
   HHWIN_NAVTYPE_HISTORY        = 4;  // not implemented
   HHWIN_NAVTYPE_AUTHOR         = 5;
   HHWIN_NAVTYPE_CUSTOM_FIRST   = 11;

   IT_INCLUSIVE  = 0;
   IT_EXCLUSIVE  = 1;
   IT_HIDDEN     = 2;

type

   HH_ENUM_IT = record
      cbStruct : Integer;        // size of this structure
      iType : Integer;           // the type of the information type ie. Inclusive, Exclusive, or Hidden
      pszCatName : PChar;        // Set to the name of the Category to enumerate the info types in a category; else NULL
      pszITName : PChar;         // volitile pointer to the name of the infotype. Allocated by call. Caller responsible for freeing
      pszITDescription : PChar;  // volitile pointer to the description of the infotype.
   end;
   THHEnumIT = HH_ENUM_IT;
   PHH_ENUM_IT = ^HH_ENUM_IT;

   HH_ENUM_CAT = record
      cbStruct : Integer;        // size of this structure
      pszCatName : PChar;        // volitile pointer to the category name
      pszCatDescription : PChar; // volitile pointer to the category description
   end;
   THHEnumCAT = HH_ENUM_CAT;
   PHH_ENUM_CAT = ^HH_ENUM_CAT;

   HH_SET_INFOTYPE = record
      cbStruct : Integer;        // the size of this structure
      pszCatName : PChar;        // the name of the category, if any, the InfoType is a member of.
      pszInfoTypeName : PChar;   // the name of the info type to add to the filter
   end;
   THHSetInfoType = HH_SET_INFOTYPE;
   PHH_SET_INFOTYPE = ^HH_SET_INFOTYPE;

   HH_INFOTYPE = DWORD;
   PHH_INFOTYPE = ^HH_INFOTYPE;

const

   HHWIN_NAVTAB_TOP     = 0;
   HHWIN_NAVTAB_LEFT    = 1;
   HHWIN_NAVTAB_BOTTOM  = 2;

   HH_MAX_TABS          = 19;    // maximum number of tabs

   HH_TAB_CONTENTS      = 0;
   HH_TAB_INDEX         = 1;
   HH_TAB_SEARCH        = 2;
   HH_TAB_FAVORITES     = 3;
   HH_TAB_HISTORY       = 4;
   HH_TAB_AUTHOR        = 5;

   HH_TAB_CUSTOM_FIRST  = 11;
   HH_TAB_CUSTOM_LAST   = HH_MAX_TABS;

   HH_MAX_TABS_CUSTOM   = (HH_TAB_CUSTOM_LAST - HH_TAB_CUSTOM_FIRST + 1);

   // HH_DISPLAY_SEARCH Command Related Structures and Constants

   HH_FTS_DEFAULT_PROXIMITY   = (-1);

type

   HH_FTS_QUERY = record
      cbStruct : Integer;        // Sizeof structure in bytes.
      fUniCodeStrings : BOOL;    // TRUE if all strings are unicode.
      pszSearchQuery : PChar;    // String containing the search query.
      iProximity : Integer;      // Word proximity.
      fStemmedSearch : BOOL;     // TRUE for StemmedSearch only.
      fTitleOnly : BOOL;         // TRUE for Title search only.
      fExecute : BOOL;           // TRUE to initiate the search.
      pszWindow : PChar;         // Window to display in
   end;
   THHFTSQuery = HH_FTS_QUERY;

   // HH_WINTYPE Structure

   HH_WINTYPE = record
      cbStruct : Integer;     // IN: size of this structure including all Information Types
      fUniCodeStrings : BOOL; // IN/OUT: TRUE if all strings are in UNICODE
      pszType : PChar;        // IN/OUT: Name of a type of window
      fsValidMembers : DWORD; // IN: Bit flag of valid members (HHWIN_PARAM_)
      fsWinProperties : DWORD;// IN/OUT: Properties/attributes of the window (HHWIN_)

      pszCaption : PChar;     // IN/OUT: Window title
      dwStyles : DWORD;       // IN/OUT: Window styles
      dwExStyles : DWORD;     // IN/OUT: Extended Window styles
      rcWindowPos : TRect;    // IN: Starting position, OUT: current position
      nShowState : Integer;   // IN: show state (e.g., SW_SHOW)

      hwndHelp : HWND;        // OUT: window handle
      hwndCaller : HWND;      // OUT: who called this window

      paInfoTypes : PHH_INFOTYPE;   // IN: Pointer to an array of Information Types

      // The following members are only valid if HHWIN_PROP_TRI_PANE is set

      hwndToolBar : HWND;     // OUT: toolbar window in tri-pane window
      hwndNavigation : HWND;  // OUT: navigation window in tri-pane window
      hwndHTML : HWND;        // OUT: window displaying HTML in tri-pane window
      iNavWidth : Integer;    // IN/OUT: width of navigation window
      rcHTML : TRect;         // OUT: HTML window coordinates

      pszToc : PChar;         // IN: Location of the table of contents file
      pszIndex : PChar;       // IN: Location of the index file
      pszFile : PChar;        // IN: Default location of the html file
      pszHome : PChar;        // IN/OUT: html file to display when Home button is clicked
      fsToolBarFlags : DWORD; // IN: flags controling the appearance of the toolbar
      fNotExpanded : BOOL;    // IN: TRUE/FALSE to contract or expand, OUT: current state
      curNavType : Integer;   // IN/OUT: UI to display in the navigational pane
      tabpos : Integer;       // IN/OUT: HHWIN_NAVTAB_TOP, HHWIN_NAVTAB_LEFT, or HHWIN_NAVTAB_BOTTOM
      idNotify : Integer;     // IN: ID to use for WM_NOTIFY messages
      tabOrder : array [0..HH_MAX_TABS] of BYTE; // IN/OUT: tab order: Contents, Index, Search, History, Favorites, Reserved 1-5, Custom tabs
      cHistory : Integer;     // IN/OUT: number of history items to keep (default is 30)
      pszJump1 : PChar;       // Text for HHWIN_BUTTON_JUMP1
      pszJump2 : PChar;       // Text for HHWIN_BUTTON_JUMP2
      pszUrlJump1 : PChar;    // URL for HHWIN_BUTTON_JUMP1
      pszUrlJump2 : PChar;    // URL for HHWIN_BUTTON_JUMP2
      rcMinSize : TRect;      // Minimum size for window (ignored in version 1)
      cbInfoTypes : Integer;  // size of paInfoTypes;
      pszCustomTabs : PChar;  // multiple zero-terminated strings
   end;
   PHHWinType = HH_WINTYPE;
   PHH_WINTYPE = ^HH_WINTYPE;

const

   HHACT_TAB_CONTENTS   = 0;
   HHACT_TAB_INDEX      = 1;
   HHACT_TAB_SEARCH     = 2;
   HHACT_TAB_HISTORY    = 3;
   HHACT_TAB_FAVORITES  = 4;

   HHACT_EXPAND         = 5;
   HHACT_CONTRACT       = 6;
   HHACT_BACK           = 7;
   HHACT_FORWARD        = 8;
   HHACT_STOP           = 9;
   HHACT_REFRESH        = 10;
   HHACT_HOME           = 11;
   HHACT_SYNC           = 12;
   HHACT_OPTIONS        = 13;
   HHACT_PRINT          = 14;
   HHACT_HIGHLIGHT      = 15;
   HHACT_CUSTOMIZE      = 16;
   HHACT_JUMP1          = 17;
   HHACT_JUMP2          = 18;
   HHACT_ZOOM           = 19;
   HHACT_TOC_NEXT       = 20;
   HHACT_TOC_PREV       = 21;
   HHACT_NOTES          = 22;

   HHACT_LAST_ENUM      = 23;

type

   HHNTRACK = record
      hdr : NMHDR;
      pszCurUrl : PChar;         // Multi-byte, null-terminated string
      idAction : Integer;        // HHACT_ value
      phhWinTyp : PHH_WINTYPE;   // Current window type structure
   end;

   function HtmlHelp(hwndCaller : HWND; pszFile: PChar; uCommand : Integer;
                     dwData : DWORD) : HWND; stdcall; external 'hhctrl.ocx' name 'HtmlHelpA';

   function HtmlHelpA(hwndCaller : HWND; pszFile: PChar; uCommand : Integer;
                      dwData : DWORD) : HWND; stdcall; external 'hhctrl.ocx' name 'HtmlHelpA';

   function HtmlHelpW(hwndCaller : HWND; pszFile: PWideChar; uCommand : Integer;
                      dwData : DWORD) : HWND; stdcall; external 'hhctrl.ocx' name 'HtmlHelpW';

{$IFNDEF NO_FORMS_UNIT}
function HtmlHelpShowHelp : HWND;
function HtmlHelpShowTopic(const aTopic : String) : HWND;
function HtmlHelpShowContents : HWND;
function HtmlHelpShowIndex : HWND;
{$ENDIF}

implementation

{$IFNDEF NO_FORMS_UNIT}
uses Forms;

function HtmlHelpShowHelp : HWND;
begin
   Result:=HtmlHelp(0, PChar(Application.HelpFile), HH_DISPLAY_TOPIC, 0);
end;

function HtmlHelpShowTopic(const aTopic : String) : HWND;
begin
   Result:=HtmlHelp(0, PChar(Application.HelpFile+'::'+aTopic), HH_DISPLAY_TOPIC, 0);
end;

function HtmlHelpShowContents : HWND;
begin
   Result:=HtmlHelp(0, PChar(Application.HelpFile), HH_DISPLAY_TOC, 0);
end;

function HtmlHelpShowIndex : HWND;
begin
   Result:=HtmlHelp(0, PChar(Application.HelpFile), HH_DISPLAY_INDEX, 0);
end;

{$ENDIF}

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -