home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource1
/
program3
/
pmhelp.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-11-23
|
14KB
|
279 lines
{**************************************************************************\
*
* Module Name: PMHELP.H
*
* OS/2 Information Presentation Facility (IPF) for providing Help
*
* Copyright (c) International Business Machines Corporation 1989, 1990
*
*****************************************************************************
}
{| Version: 1.00
| Original translation: Peter Sawatzki (ps)
| Contributing:
| Peter Sawatzki ps
|
| change history:
| Date: Ver: Author:
| 11/11/93 1.00 ps original translation by ps
}
Unit PmHelp;
Interface
Uses
Os2Def;
Type
{****************************************************************************}
{ HelpSubTable entry structure }
{****************************************************************************}
HELPSUBTABLE = Integer;
pHELPSUBTABLE = ^HELPSUBTABLE;
{****************************************************************************}
{ HelpTable entry structure }
{****************************************************************************}
HELPTABLE = Record
idAppWindow: USHORT;
phstHelpSubTable: pHELPSUBTABLE;
idExtPanel: USHORT
End;
pHELPTABLE = ^HELPTABLE;
{****************************************************************************}
{ IPF Initialization Structure used on the }
{ WinCreateHelpInstance() call. }
{****************************************************************************}
HELPINIT = Record
cb: USHORT;
ulReturnCode: ULONG;
pszTutorialName: pSZ;
phtHelpTable: pHELPTABLE;
hmodHelpTableModule,
hmodAccelActionBarModule: HMODULE;
idAccelTable,
idActionBar: USHORT;
pszHelpWindowTitle:pSZ;
usShowPanelId: USHORT;
pszHelpLibraryName: pSZ
End;
pHELPINIT = HELPINIT;
Const
{****************************************************************************}
{ Search parent chain indicator for HM_SET_ACTIVE_WINDOW message. }
{****************************************************************************}
HWND_PARENT = HWND(0);
{****************************************************************************}
{ Constants used to define whether user wants to display panel using }
{ panel number or panel name. }
{****************************************************************************}
HM_RESOURCEID = 0;
HM_PANELNAME = 1;
HMPANELTYPE_NUMBER = 0;
HMPANELTYPE_NAME = 1;
{****************************************************************************}
{ Constants used to define how the panel IDs are displayed on }
{ help panels. }
{****************************************************************************}
CMIC_HIDE_PANEL_ID = $0000;
CMIC_SHOW_PANEL_ID = $0001;
CMIC_TOGGLE_PANEL_ID = $0002;
{****************************************************************************}
{ Window Help function declarations. }
{****************************************************************************}
Function WinDestroyHelpInstance(hwndHelpInstance: HWND): BOOL;
Function WinCreateHelpInstance(_hab: HAB; phinitHMInitStructure: PHELPINIT): HWND;
Function WinAssociateHelpInstance(hwndHelpInstance, hwndApp: HWND): BOOL;
Function WinQueryHelpInstance(hwndApp: HWND): HWND;
Function WinLoadHelpTable (hwndHelpInstance: HWND; idHelpTable: USHORT;
Module: HMODULE): BOOL;
Function WinCreateHelpTable (hwndHelpInstance: HWND; phtHelpTable: PHELPTABLE): BOOL;
Const
{****************************************************************************}
{ IPF message base. }
{****************************************************************************}
HM_MSG_BASE = $0220;
{****************************************************************************}
{ Messages applications can send to the IPF. }
{****************************************************************************}
HM_DISMISS_WINDOW = HM_MSG_BASE+$0001;
HM_DISPLAY_HELP = HM_MSG_BASE+$0002;
HM_EXT_HELP = HM_MSG_BASE+$0003;
HM_SET_ACTIVE_WINDOW = HM_MSG_BASE+$0004;
HM_LOAD_HELP_TABLE = HM_MSG_BASE+$0005;
HM_CREATE_HELP_TABLE = HM_MSG_BASE+$0006;
HM_SET_HELP_WINDOW_TITLE = HM_MSG_BASE+$0007;
HM_SET_SHOW_PANEL_ID = HM_MSG_BASE+$0008;
HM_REPLACE_HELP_FOR_HELP = HM_MSG_BASE+$0009;
HM_HELP_INDEX = HM_MSG_BASE+$000a;
HM_HELP_CONTENTS = HM_MSG_BASE+$000b;
HM_KEYS_HELP = HM_MSG_BASE+$000c;
HM_SET_HELP_LIBRARY_NAME = HM_MSG_BASE+$000d;
{****************************************************************************}
{ Messages the IPF sends to the applications active window }
{ as defined by the IPF. }
{****************************************************************************}
HM_ERROR = HM_MSG_BASE+$000e;
HM_HELPSUBITEM_NOT_FOUND = HM_MSG_BASE+$000f;
HM_QUERY_KEYS_HELP = HM_MSG_BASE+$0010;
HM_TUTORIAL = HM_MSG_BASE+$0011;
HM_EXT_HELP_UNDEFINED = HM_MSG_BASE+$0012;
HM_ACTIONBAR_COMMAND = HM_MSG_BASE+$0013;
HM_INFORM = HM_MSG_BASE+$0014;
{****************************************************************************}
{ HMERR_NO_FRAME_WND_IN_CHAIN - There is no frame window in the }
{ window chain from which to find or set the associated help }
{ instance. }
{****************************************************************************}
HMERR_NO_FRAME_WND_IN_CHAIN = $00001001;
{****************************************************************************}
{ HMERR_INVALID_ASSOC_APP_WND - The application window handle }
{ specified on the WinAssociateHelpInstance() call is not a valid }
{ window handle. }
{****************************************************************************}
HMERR_INVALID_ASSOC_APP_WND = $00001002;
{****************************************************************************}
{ HMERR_INVALID_ASSOC_HELP_INST - The help instance handle specified }
{ on the WinAssociateHelpInstance() call is not a valid }
{ window handle. }
{****************************************************************************}
HMERR_INVALID_ASSOC_HELP_INST = $00001003;
{****************************************************************************}
{ HMERR_INVALID_DESTROY_HELP_INST - The window handle specified }
{ as the help instance to destroy is not of the help instance class. }
{****************************************************************************}
HMERR_INVALID_DESTROY_HELP_INST = $00001004;
{****************************************************************************}
{ HMERR_NO_HELP_INST_IN_CHAIN - The parent or owner chain of the }
{ application window specified does not have a help instance }
{ associated with it. }
{****************************************************************************}
HMERR_NO_HELP_INST_IN_CHAIN = $00001005;
{****************************************************************************}
{ HMERR_INVALID_HELP_INSTANCE_HDL - The handle specified to be a }
{ help instance does not have the cl