ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hhctrl.ocx (https://www.excelbanter.com/excel-programming/362227-hhctrl-ocx.html)

bill

hhctrl.ocx
 
All,

I realize this may be a little "off topic" but does anyone know how to
find the entry points for HHCtrl.ocx. I am trying to use it as the Help
Viewer for an Excel .chm help file that I created.

TIA,

Bill


Ivan F Moala[_84_]

hhctrl.ocx
 

Here is an example of it's use


Code
-------------------

Option Explicit

Private Declare Function HtmlHelp Lib "hhctrl.ocx" _
Alias "HtmlHelpA" ( _
ByVal hwndCaller As Long, _
ByVal pszFile As String, _
ByVal uCommand As Long, _
ByVal dwData As Long) As Long

'// Some constants to use
Const HH_DISPLAY_TOPIC = &H0
Const HH_SET_WIN_TYPE = &H4
Const HH_GET_WIN_TYPE = &H5
Const HH_GET_WIN_HANDLE = &H6
Const HH_DISPLAY_TEXT_POPUP = &HE
'// Display string resource ID or text in a pop-up window.
Const HH_HELP_CONTEXT = &HF
'// Display mapped numeric value in dwData.
Const HH_TP_HELP_CONTEXTMENU = &H10
'// Text pop-up help, similar to WinHelp's HELP_CONTEXTMENU.
Const HH_TP_HELP_WM_HELP = &H11
'// Text pop-up help, similar to WinHelp's HELP_WM_HELP.
Const HH_CLOSE_ALL = &H12

Sub OpenHelp()
Dim hwndHelp As Long
'// The returned value is the window handle of the created help window.
hwndHelp = HtmlHelp(0, "C:\WINDOWS\HELP\msoe.chm", HH_DISPLAY_TOPIC, 0)
If hwndHelp = 0 Then MsgBox "Can't load"
End Sub

Sub CloseHelp()
HtmlHelp 0, "", HH_CLOSE_ALL, 0
End Sub



-------------------

--
Ivan F Moal

-----------------------------------------------------------------------
Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195
View this thread: http://www.excelforum.com/showthread.php?threadid=54486


bill

hhctrl.ocx
 
Ivan,

It worked perfectly. Thanks so much.

Bill



All times are GMT +1. The time now is 11:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com