Skip to content

Latest commit

 

History

History
2070 lines (786 loc) · 27.2 KB

win32help.md

File metadata and controls

2070 lines (786 loc) · 27.2 KB

win32help

Module win32help

A module, encapsulating the Win32 help API's.

Methods

  • WinHelp

    Invokes the Windows Help system. 

  • HH_AKLINK

    Create and returns an HH_AKLINK structure 

  • HH_FTS_QUERY

    Create and returns an HH_FTS_QUERY structure 

  • HH_POPUP

    Create and returns an HH_POPUP structure 

  • HH_WINTYPE

    Create and returns an HH_WINTYPE structure 

  • NMHDR

    Create and returns an NMHDR structure 

  • HHN_NOTIFY

    Create and returns an HHN_NOTIFY structure 

  • HHNTRACK

    Create and returns an HHNTRACK structure 

  • HtmlHelp

    Invokes the Windows HTML Help system. 

HHACT_BACK

const win32help.HHACT_BACK;

HHACT_CONTRACT

const win32help.HHACT_CONTRACT;

HHACT_CUSTOMIZE

const win32help.HHACT_CUSTOMIZE;

HHACT_EXPAND

const win32help.HHACT_EXPAND;

HHACT_FORWARD

const win32help.HHACT_FORWARD;

HHACT_HIGHLIGHT

const win32help.HHACT_HIGHLIGHT;

HHACT_HOME

const win32help.HHACT_HOME;

HHACT_JUMP1

const win32help.HHACT_JUMP1;

HHACT_JUMP2

const win32help.HHACT_JUMP2;

HHACT_LAST_ENUM

const win32help.HHACT_LAST_ENUM;

HHACT_NOTES

const win32help.HHACT_NOTES;

HHACT_OPTIONS

const win32help.HHACT_OPTIONS;

HHACT_PRINT

const win32help.HHACT_PRINT;

HHACT_REFRESH

const win32help.HHACT_REFRESH;

HHACT_STOP

const win32help.HHACT_STOP;

HHACT_SYNC

const win32help.HHACT_SYNC;

HHACT_TAB_CONTENTS

const win32help.HHACT_TAB_CONTENTS;

HHACT_TAB_FAVORITES

const win32help.HHACT_TAB_FAVORITES;

HHACT_TAB_HISTORY

const win32help.HHACT_TAB_HISTORY;

HHACT_TAB_INDEX

const win32help.HHACT_TAB_INDEX;

HHACT_TAB_SEARCH

const win32help.HHACT_TAB_SEARCH;

HHACT_TOC_NEXT

const win32help.HHACT_TOC_NEXT;

HHACT_TOC_PREV

const win32help.HHACT_TOC_PREV;

HHACT_ZOOM

const win32help.HHACT_ZOOM;

win32help.HHNTRACK

PyHHNTRACK = HHNTRACK() Creates a new HHNTRACK object.

HHN_FIRST

const win32help.HHN_FIRST;

HHN_LAST

const win32help.HHN_LAST;

HHN_NAVCOMPLETE

const win32help.HHN_NAVCOMPLETE;

win32help.HHN_NOTIFY

PyHHN_NOTIFY = HHN_NOTIFY() Creates a new HHN_NOTIFY object.

HHN_TRACK

const win32help.HHN_TRACK;

HHN_WINDOW_CREATE

const win32help.HHN_WINDOW_CREATE;

HHWIN_BUTTON_BACK

const win32help.HHWIN_BUTTON_BACK;

Back button

HHWIN_BUTTON_BROWSE_BCK

const win32help.HHWIN_BUTTON_BROWSE_BCK;

not implemented

HHWIN_BUTTON_BROWSE_FWD

const win32help.HHWIN_BUTTON_BROWSE_FWD;

not implemented

HHWIN_BUTTON_CONTENTS

const win32help.HHWIN_BUTTON_CONTENTS;

not implemented

HHWIN_BUTTON_EXPAND

const win32help.HHWIN_BUTTON_EXPAND;

Expand/contract button

HHWIN_BUTTON_FAVORITES

const win32help.HHWIN_BUTTON_FAVORITES;

not implemented

HHWIN_BUTTON_FORWARD

const win32help.HHWIN_BUTTON_FORWARD;

Forward button

HHWIN_BUTTON_HISTORY

const win32help.HHWIN_BUTTON_HISTORY;

not implemented

HHWIN_BUTTON_HOME

const win32help.HHWIN_BUTTON_HOME;

Home button

HHWIN_BUTTON_INDEX

const win32help.HHWIN_BUTTON_INDEX;

not implemented

HHWIN_BUTTON_JUMP1

const win32help.HHWIN_BUTTON_JUMP1;

HHWIN_BUTTON_JUMP2

const win32help.HHWIN_BUTTON_JUMP2;

HHWIN_BUTTON_NOTES

const win32help.HHWIN_BUTTON_NOTES;

not implemented

HHWIN_BUTTON_OPTIONS

const win32help.HHWIN_BUTTON_OPTIONS;

Options button

HHWIN_BUTTON_PRINT

const win32help.HHWIN_BUTTON_PRINT;

Print button

HHWIN_BUTTON_REFRESH

const win32help.HHWIN_BUTTON_REFRESH;

Refresh button

HHWIN_BUTTON_SEARCH

const win32help.HHWIN_BUTTON_SEARCH;

not implemented

HHWIN_BUTTON_STOP

const win32help.HHWIN_BUTTON_STOP;

Stop button

HHWIN_BUTTON_SYNC

const win32help.HHWIN_BUTTON_SYNC;

Sync button

HHWIN_BUTTON_TOC_NEXT

const win32help.HHWIN_BUTTON_TOC_NEXT;

HHWIN_BUTTON_TOC_PREV

const win32help.HHWIN_BUTTON_TOC_PREV;

HHWIN_BUTTON_ZOOM

const win32help.HHWIN_BUTTON_ZOOM;

HHWIN_DEF_BUTTONS

const win32help.HHWIN_DEF_BUTTONS;

HHWIN_NAVTAB_BOTTOM

const win32help.HHWIN_NAVTAB_BOTTOM;

HHWIN_NAVTAB_LEFT

const win32help.HHWIN_NAVTAB_LEFT;

HHWIN_NAVTAB_TOP

const win32help.HHWIN_NAVTAB_TOP;

HHWIN_PARAM_CUR_TAB

const win32help.HHWIN_PARAM_CUR_TAB;

valid curNavType

HHWIN_PARAM_EXPANSION

const win32help.HHWIN_PARAM_EXPANSION;

valid notExpanded

HHWIN_PARAM_EXSTYLES

const win32help.HHWIN_PARAM_EXSTYLES;

valid exStyles

HHWIN_PARAM_HISTORY_COUNT

const win32help.HHWIN_PARAM_HISTORY_COUNT;

valid cHistory

HHWIN_PARAM_INFOTYPES

const win32help.HHWIN_PARAM_INFOTYPES;

valid apInfoTypes

HHWIN_PARAM_NAV_WIDTH

const win32help.HHWIN_PARAM_NAV_WIDTH;

valid navWidth

HHWIN_PARAM_PROPERTIES

const win32help.HHWIN_PARAM_PROPERTIES;

valid winProperties

HHWIN_PARAM_RECT

const win32help.HHWIN_PARAM_RECT;

valid windowPos

HHWIN_PARAM_SHOWSTATE

const win32help.HHWIN_PARAM_SHOWSTATE;

valid showState

HHWIN_PARAM_STYLES

const win32help.HHWIN_PARAM_STYLES;

valid styles

HHWIN_PARAM_TABORDER

const win32help.HHWIN_PARAM_TABORDER;

valid taborder

HHWIN_PARAM_TABPOS

const win32help.HHWIN_PARAM_TABPOS;

valid tabpos

HHWIN_PARAM_TB_FLAGS

const win32help.HHWIN_PARAM_TB_FLAGS;

valid toolBarFlags

HHWIN_PROP_AUTO_SYNC

const win32help.HHWIN_PROP_AUTO_SYNC;

automatically ssync contents

and index

HHWIN_PROP_CHANGE_TITLE

const win32help.HHWIN_PROP_CHANGE_TITLE;

Put current HTML title in

title bar

HHWIN_PROP_MENU

const win32help.HHWIN_PROP_MENU;

Menu

HHWIN_PROP_NAV_ONLY_WIN

const win32help.HHWIN_PROP_NAV_ONLY_WIN;

Only display the navigation

window

HHWIN_PROP_NODEF_EXSTYLES

const win32help.HHWIN_PROP_NODEF_EXSTYLES;

no default extended

window styles (only HH_WINTYPE.exStyles)

HHWIN_PROP_NODEF_STYLES

const win32help.HHWIN_PROP_NODEF_STYLES;

no default window styles

(only HH_WINTYPE.styles)

HHWIN_PROP_NOTB_TEXT

const win32help.HHWIN_PROP_NOTB_TEXT;

no text on toolbar buttons

HHWIN_PROP_NOTITLEBAR

const win32help.HHWIN_PROP_NOTITLEBAR;

no title bar

HHWIN_PROP_NO_TOOLBAR

const win32help.HHWIN_PROP_NO_TOOLBAR;

Don't display a toolbar

HHWIN_PROP_ONTOP

const win32help.HHWIN_PROP_ONTOP;

Top-most window

HHWIN_PROP_POST_QUIT

const win32help.HHWIN_PROP_POST_QUIT;

post WM_QUIT message when

window closes

HHWIN_PROP_TAB_ADVSEARCH

const win32help.HHWIN_PROP_TAB_ADVSEARCH;

Advanced FTS UI.

HHWIN_PROP_TAB_AUTOHIDESHOW

const win32help.HHWIN_PROP_TAB_AUTOHIDESHOW;

Automatically hide/show

tri-pane window

HHWIN_PROP_TAB_CUSTOM1

const win32help.HHWIN_PROP_TAB_CUSTOM1;

Use custom tab #1

HHWIN_PROP_TAB_CUSTOM2

const win32help.HHWIN_PROP_TAB_CUSTOM2;

Use custom tab #2

HHWIN_PROP_TAB_CUSTOM3

const win32help.HHWIN_PROP_TAB_CUSTOM3;

Use custom tab #3

HHWIN_PROP_TAB_CUSTOM4

const win32help.HHWIN_PROP_TAB_CUSTOM4;

Use custom tab #4

HHWIN_PROP_TAB_CUSTOM5

const win32help.HHWIN_PROP_TAB_CUSTOM5;

Use custom tab #5

HHWIN_PROP_TAB_CUSTOM6

const win32help.HHWIN_PROP_TAB_CUSTOM6;

Use custom tab #6

HHWIN_PROP_TAB_CUSTOM7

const win32help.HHWIN_PROP_TAB_CUSTOM7;

Use custom tab #7

HHWIN_PROP_TAB_CUSTOM8

const win32help.HHWIN_PROP_TAB_CUSTOM8;

Use custom tab #8

HHWIN_PROP_TAB_CUSTOM9

const win32help.HHWIN_PROP_TAB_CUSTOM9;

Use custom tab #9

HHWIN_PROP_TAB_FAVORITES

const win32help.HHWIN_PROP_TAB_FAVORITES;

include favorites tab in

navigation pane

HHWIN_PROP_TAB_HISTORY

const win32help.HHWIN_PROP_TAB_HISTORY;

include history tab in

navigation pane

HHWIN_PROP_TAB_SEARCH

const win32help.HHWIN_PROP_TAB_SEARCH;

include search tab in

navigation pane

HHWIN_PROP_TRACKING

const win32help.HHWIN_PROP_TRACKING;

send tracking notification

messages

HHWIN_PROP_TRI_PANE

const win32help.HHWIN_PROP_TRI_PANE;

use a tri-pane window

HHWIN_PROP_USER_POS

const win32help.HHWIN_PROP_USER_POS;

After initial creation, user

controls window size/position

HHWIN_TB_MARGIN

const win32help.HHWIN_TB_MARGIN;

the window type has a margin

win32help.HH_AKLINK

PyHH_AKLINK = HH_AKLINK() Creates a new HH_AKLINK object.

HH_ALINK_LOOKUP

const win32help.HH_ALINK_LOOKUP;

ALink version of HH_KEYWORD_LOOKUP

HH_CLOSE_ALL

const win32help.HH_CLOSE_ALL;

close all windows opened directly or

indirectly by the caller

HH_DISPLAY_INDEX

const win32help.HH_DISPLAY_INDEX;

not currently implemented

HH_DISPLAY_SEARCH

const win32help.HH_DISPLAY_SEARCH;

not currently implemented

HH_DISPLAY_TEXT_POPUP

const win32help.HH_DISPLAY_TEXT_POPUP;

display string resource id

or text in a popup window

HH_DISPLAY_TOC

const win32help.HH_DISPLAY_TOC;

not currently implemented

HH_DISPLAY_TOPIC

const win32help.HH_DISPLAY_TOPIC;

HH_ENUM_CATEGORY

const win32help.HH_ENUM_CATEGORY;

Get category name, call

repeatedly to enumerate, -1 at end

HH_ENUM_CATEGORY_IT

const win32help.HH_ENUM_CATEGORY_IT;

Get category info type members,

call repeatedly to enumerate, -1 at end

HH_ENUM_INFO_TYPE

const win32help.HH_ENUM_INFO_TYPE;

Get Info type name, call

repeatedly to enumerate, -1 at end

HH_FTS_DEFAULT_PROXIMITY

const win32help.HH_FTS_DEFAULT_PROXIMITY;

win32help.HH_FTS_QUERY

PyHH_FTS_QUERY = HH_FTS_QUERY() Creates a new HH_FTS_QUERY object.

HH_GET_LAST_ERROR

const win32help.HH_GET_LAST_ERROR;

not currently implemented

See HHERROR.h

HH_GET_WIN_HANDLE

const win32help.HH_GET_WIN_HANDLE;

HH_GET_WIN_TYPE

const win32help.HH_GET_WIN_TYPE;

HH_GPROPID_CONTENT_LANGUAGE

const win32help.HH_GPROPID_CONTENT_LANGUAGE;

long: LandId for desired

content.

HH_GPROPID_CURRENT_SUBSET

const win32help.HH_GPROPID_CURRENT_SUBSET;

BSTR: Current subset.

HH_GPROPID_SINGLETHREAD

const win32help.HH_GPROPID_SINGLETHREAD;

VARIANT_BOOL: True for single

thread

HH_GPROPID_TOOLBAR_MARGIN

const win32help.HH_GPROPID_TOOLBAR_MARGIN;

long: Provides a left/right

margin around the toolbar.

HH_GPROPID_UI_LANGUAGE

const win32help.HH_GPROPID_UI_LANGUAGE;

long: LangId of the UI.

HH_HELP_CONTEXT

const win32help.HH_HELP_CONTEXT;

display mapped numeric value in

dwData

HH_HELP_FINDER

const win32help.HH_HELP_FINDER;

WinHelp equivalent

HH_INITIALIZE

const win32help.HH_INITIALIZE;

Initializes the help system.

HH_KEYWORD_LOOKUP

const win32help.HH_KEYWORD_LOOKUP;

HH_MAX_TABS_CUSTOM

const win32help.HH_MAX_TABS_CUSTOM;

win32help.HH_POPUP

PyHH_POPUP = HH_POPUP() Creates a new HH_POPUP object.

HH_PRETRANSLATEMESSAGE

const win32help.HH_PRETRANSLATEMESSAGE;

Pumps messages.

(NULL, NULL, MSG*).

HH_RESERVED1

const win32help.HH_RESERVED1;

HH_RESERVED2

const win32help.HH_RESERVED2;

HH_RESERVED3

const win32help.HH_RESERVED3;

HH_RESET_IT_FILTER

const win32help.HH_RESET_IT_FILTER;

Clear the info type filter of

all info types.

HH_SET_EXCLUSIVE_FILTER

const win32help.HH_SET_EXCLUSIVE_FILTER;

set exclusive filtering

method for untyped topics to be excluded from display

HH_SET_GLOBAL_PROPERTY

const win32help.HH_SET_GLOBAL_PROPERTY;

Set a global property.

(NULL, NULL, HH_GPROP).

HH_SET_INCLUSIVE_FILTER

const win32help.HH_SET_INCLUSIVE_FILTER;

set inclusive filtering

method for untyped topics to be included in display

HH_SET_INFO_TYPE

const win32help.HH_SET_INFO_TYPE;

Add Info type to filter.

HH_SET_WIN_TYPE

const win32help.HH_SET_WIN_TYPE;

HH_SYNC

const win32help.HH_SYNC;

HH_TAB_AUTHOR

const win32help.HH_TAB_AUTHOR;

HH_TAB_CONTENTS

const win32help.HH_TAB_CONTENTS;

HH_TAB_CUSTOM_FIRST

const win32help.HH_TAB_CUSTOM_FIRST;

HH_TAB_CUSTOM_LAST

const win32help.HH_TAB_CUSTOM_LAST;

HH_TAB_FAVORITES

const win32help.HH_TAB_FAVORITES;

HH_TAB_HISTORY

const win32help.HH_TAB_HISTORY;

HH_TAB_INDEX

const win32help.HH_TAB_INDEX;

HH_TAB_SEARCH

const win32help.HH_TAB_SEARCH;

HH_TP_HELP_CONTEXTMENU

const win32help.HH_TP_HELP_CONTEXTMENU;

text popup help, same as

WinHelp HELP_CONTEXTMENU

HH_TP_HELP_WM_HELP

const win32help.HH_TP_HELP_WM_HELP;

text popup help, same as

WinHelp HELP_WM_HELP

HH_UNINITIALIZE

const win32help.HH_UNINITIALIZE;

Uninitializes the help system.

win32help.HH_WINTYPE

PyHH_WINTYPE = HH_WINTYPE() Creates a new HH_WINTYPE object.

win32help.HtmlHelp

int = HtmlHelp(hwnd, file

, cmd

, data

) Invokes the Windows Html Help system.

Parameters

  • hwnd : int

    The handle of the window requesting help.

  • file : string/None

    The name of the help file, or None.

  • cmd : int

    The type of help. Valid values are:

HH_ALINK_LOOKUP

: Looks up one or more Associative link (ALink) names

in a compiled help (.chm) file.

The ALink names to search for, and the action to be taken if no matches

are found, are specified in the win32help::HH_AKLINK structure.

file

: Specifies a compiled help (.chm) file, or a specific topic

within a compiled help file.

data

: Specifies NULL or a pointer to a topic within a compiled help

file.

HH_CLOSE_ALL

: Closes all windows opened directly or indirectly by the

calling program. The args are not checked for type, values are set as

they "Must" be.

hwnd

: Must be None.

file

: Must be None.

data

: Must be zero.

HH_DISPLAY_INDEX

: Selects the Index tab in the Navigation pane of the

HTML Help Viewer and searches for the keyword specified in the data

parameter.

file

: Specifies a compiled help (.chm) file, or a specific topic

within a compiled help file.

data

: Specifies the keyword to select in the index (.hhk) file.

HH_DISPLAY_SEARCH

: Selects the Search tab in the Navigation pane of

the HTML Help Viewer and performs a search for the term specified in the

searchQuery parameter of the win32help::HH_FTS_QUERY structure.

file

: Specifies a compiled help (.chm) file, or a specific topic

within a compiled help file.

data

: Specifies a pointer to an win32help::HH_FTS_QUERY

structure.

HH_DISPLAY_TEXT_POPUP

: Opens a pop-up window that displays the

contents of one of the following:

An explicit text string.

A text string based on a resource ID.

A text string ID based on a text file contained in a compiled help (.chm)

file.

file

: To use an explicit text string, use None. To use a text

string from a resource, use None. To use text string from a text file

contained in a compiled help file, specify the .chm file and the text

file within the .chm file.

data

: Specifies a pointer to an win32help::HH_POPUP structure.

HH_DISPLAY_TOC

: Selects the Contents tab in the Navigation pane of

the HTML Help Viewer.

file

: Specifies a compiled help (.chm) file, or a specific topic

within a compiled help file.

data

: Specifies None or a pointer to a topic within a compiled help

file.

HH_DISPLAY_TOPIC

: Opens a help topic in a specified help window.

If a window type is not specified, a default window type is used. If the

window type or default window type is open, the help topic replaces the

current topic in the window.

file

: Specifies a compiled help (.chm) file, or a specific topic

within a compiled help file. To specify a defined window type, insert a

greater-than (&gt) character followed by the name of the window type.

data

: Specifies None or a pointer to a topic within a compiled help

file.

HH_GET_LAST_ERROR

: Returns information about the last error that

occurred in the HTML Help ActiveX control (Hhctrl.ocx).

file

: Must be None

data

: A pointer to a HH_LAST_ERROR structure.

Has not been implemented by Microsoft yet

HH_GET_WIN_HANDLE

: Returns the handle (hwnd) of a specified window

type.

file

: Specifies the name of the compiled help (.chm) file in which

the window type is defined.

data

: Specifies the name of the window type whose handle you want to

return.

HH_GET_WIN_TYPE

: Retrieves a pointer to the win32help::HH_WINTYPE

structure associated with a specified window type.

file

: Specifies the name of the window type whose information you

want to get and the name of the compiled help (.chm) file in which the

window type is defined. The window name must begin with a greater-than (&gt)

character and must be preceded by the name of the compiled help file it

is defined in.

data

: Ignored.

HH_HELP_CONTEXT

: Displays a help topic based on a mapped topic ID.

If a window type is not specified, a default window type is used. If the

window type or default window type is open, the help topic replaces the

current topic in the window.

file

: Specifies the compiled help (.chm) file that contains the

mapping information. To specify a defined window type, insert a

greater-than (&gt) character followed by the name of the window type.

data

: Specifies the numeric ID of the topic to display. You must map

symbolic IDs of dialog boxes to numeric IDs in the [MAP] section of your

project (.hhp) file.

HH_INITIALIZE

: This command initializes the help system for use and

must be the first HTML Help command called. It returns a cookie which must

be used in the HH_UNINITIALIZE

call. HH_INITIALIZE configures HTML Help

to run on the same thread as the calling application instead of a

secondary thread by setting the global property HH_GPROPID_SINGLETHREAD

to VARIANT_TRUE. Running HTML Help on the same thread as the calling

application requires the calling application to send messages to HTML Help

by calling the HH_PRETRANSLATEMESSAGE

command.

file

: Must be None.

data

: Ignored.

HH_KEYWORD_LOOKUP

: Looks up one or more keywords in a compiled help

(.chm) file. The keywords to search for and the action to be taken if

no matches are found are specified in the win32help::HH_AKLINK

structure.

file

: Specifies the compiled help (.chm) file that contains

keywords.

data

: Points to an win32help::HH_AKLINK structure.

HH_PRETRANSLATEMESSAGE

: This command is called in the message loop

of your Windows application to ensure proper handling of Windows

messages, especially keyboard messages when running HTML Help single

thread. The HTML Help API is not thread safe and must be called from one

and only one thread in a process.

file

data

: Points to a Win32 MSG structure.

Has not been implemented yet

HH_SET_WIN_TYPE

: Creates a new help window or modifies an existing

help window at run time.

file

: Specifies the name of the window type that you want to

create or modify and the name of the compiled help (.chm) file in which

the window type is defined. The window type name must begin with a

greater-than (&gt) character and must be preceded by the name of the

compiled help file in which it is defined.

data

: Points to an win32help::HH_WINTYPE structure.

HH_SYNC

: Locates and selects the contents entry for the help topic

that is open in the Topic pane of the HTML Help Viewer.

file

: Specifies the name of the window type that you want to

sync and the name of the compiled help (.chm) file in which the window

type is defined. The window type name must begin with a greater-than (&gt)

character and must be preceded by the name of the compiled help file in

which it is defined.

data

: Specifies a pointer to a topic within a compiled help file.

This value is the topic file to which the contents will synchronize.

HH_TP_HELP_CONTEXTMENU

: Opens a pop-up context menu. Generally used

in response to the Windows WM_CONTEXTMENU message. For example, this

message is sent when a user right-clicks a dialog box control.

hwnd

: Specifies the window handle of the dialog box control for

which you want pop-up help to appear. This is typically the control

that has focus.

file

: Specifies the compiled help (.chm) file, and the text

file that contains the pop-up help topics. By default, the text file is

named Cshelp.txt. If Cshelp.txt is located in the root of the compiled

help file, then you only need to specify the help file name. If not,

you must also specify the relative path.

data

: Specifies an array of DWORDs containing pairs of dialog

box control IDs and help topic IDs. The array must be terminated by zero,

as in the following example:

DWORD ids[3];

ids[0] = ControlId;

ids[1] = HelpId;

ids[2] = 0;

HH_TP_HELP_WM_HELP

: Opens a pop-up help topic. Generally used in

response to the Windows WM_HELP message. For example, this message is

sent when a user presses F1.

hwnd

: Specifies the window handle of the dialog box control for

which you want pop-up help to appear. This is typically the control that

has focus.

file

: Specifies the compiled help (.chm) file, and the text file

that contains the pop-up help topics. By default, the text file is named

Cshelp.txt. If Cshelp.txt is located in the root of the compiled help

file, then you only need to specify the help file name. If not, you must

also specify the relative path.

data

: Specifies an array of DWORDs containing pairs of dialog

box control IDs and help topic IDs. The array must be terminated by 0,

as in the following example:

DWORD ids[3];

ids[0] = ControlId;

ids[1] = HelpId;

ids[2] = 0;

HH_UNINITIALIZE

: This command is called to properly shut down HTML

Help. This function should be the last help command the application

calls. HH_UNINITIALIZE should not be called during DLL process detach,

but during the normal application shutdown process. The type of the

file arg is not checked, just set to the value it "Must" be.

file

: Must be None.

data

: Specifies a cookie. This is the cookie returned by

HH_INITIALIZE

.

win32help::HH_FTS_QUERY/win32help::HH_POPUP/

win32help::HH_WINTYPE

Additional data specific to the help call\.

Win32 API References

Return Value

Depending on the specified cmd and the result:

HH_GET_WIN_TYPE

:

tuple: (hwnd as below, and the win32help::HH_WINTYPE object).

Deep copy the structure to which dwData points before modifying the

structure.

HH_INITIALIZE

:

tuple: (hwnd as below, and the cookie).

This call returns a cookie that you must pass as the value of

data when you call HH_UNINITIALIZE

.

All other commands

:

HtmlHelp() returns one or both of the following:

The handle (hwnd) of the help window.

NULL. In some cases, NULL indicates failure; in other cases, NULL

indicates that the help window has not yet been created.

IDTB_BACK

const win32help.IDTB_BACK;

IDTB_BROWSE_BACK

const win32help.IDTB_BROWSE_BACK;

IDTB_BROWSE_FWD

const win32help.IDTB_BROWSE_FWD;

IDTB_CONTENTS

const win32help.IDTB_CONTENTS;

not implemented

IDTB_CONTRACT

const win32help.IDTB_CONTRACT;

IDTB_CUSTOMIZE

const win32help.IDTB_CUSTOMIZE;

IDTB_EXPAND

const win32help.IDTB_EXPAND;

IDTB_FAVORITES

const win32help.IDTB_FAVORITES;

not implemented

IDTB_FORWARD

const win32help.IDTB_FORWARD;

IDTB_HISTORY

const win32help.IDTB_HISTORY;

not implemented

IDTB_HOME

const win32help.IDTB_HOME;

IDTB_INDEX

const win32help.IDTB_INDEX;

not implemented

IDTB_JUMP1

const win32help.IDTB_JUMP1;

IDTB_JUMP2

const win32help.IDTB_JUMP2;

IDTB_NOTES

const win32help.IDTB_NOTES;

not implemented

IDTB_OPTIONS

const win32help.IDTB_OPTIONS;

IDTB_PRINT

const win32help.IDTB_PRINT;

IDTB_REFRESH

const win32help.IDTB_REFRESH;

IDTB_SEARCH

const win32help.IDTB_SEARCH;

not implemented

IDTB_STOP

const win32help.IDTB_STOP;

IDTB_SYNC

const win32help.IDTB_SYNC;

IDTB_TOC_NEXT

const win32help.IDTB_TOC_NEXT;

IDTB_TOC_PREV

const win32help.IDTB_TOC_PREV;

IDTB_ZOOM

const win32help.IDTB_ZOOM;

win32help.NMHDR

PyNMHDR = NMHDR() Creates a new NMHDR object.

win32help.WinHelp

WinHelp(hwnd, hlpFile, cmd, data) Invokes the Windows Help system.

Parameters

  • hwnd : int

    The handle of the window requesting help.

  • hlpFile : string

    The name of the help file.

  • cmd : int

    The type of help. See the api for full details.

  • data=None : None/int/string

    Additional data specific to the help call. Can be a buffer or pointer-sized int.

Win32 API References

Return Value

The method raises an exception if an error occurs.

debug

const win32help.debug;

1 if we are current using a _DEBUG build of

win32help, else 0.