HH_SET_WIN_TYPE command

HTML Help API

HH_SET_WIN_TYPE command

Creates a new help window or modifies an existing help window at run time.

pszFile dwData

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 (>) character and must be preceded by the name of the compiled help file in which it is defined.

Points to an HH_WINTYPE structure.

Example


HH_WINTYPE WinType ;

...

HtmlHelp(
GetDesktopWindow(),
"..\\help.chm>mainwin",
HH_SET_WIN_TYPE,
(DWORD) &WinType;) ;

Return value

  • On success, the handle (hwnd) of the help window.
  • On success, NULL, if the help window has not yet been created.
  • On failure, NULL, if the specified window type has not been defined.

Comments

  • Using the window type specified in pszFile to display multiple compiled help files is permitted, but not recommended.
  • Always specify the name of the compiled help file in which the window type is defined when calling an API command. If the window type is not defined in a help file, then specify NULL.
  • If a NULL is passed to HH_SET_WIN_TYPE, the name of the window type is placed into an array and is treated as a global window type. A global window type is a window type that is not specific to a particular compiled help file. Only use global window types if you require backward compatibility for existing applications.

See also

HH_GET_WIN_TYPE


link to overview topic About commands