PropertyPage custom help file

  • Thread starter Thread starter Sunny
  • Start date Start date
S

Sunny

Hi,
I have VS.Net 2003 C# addin for Outlook 2000.

Works OK, after a lot of troubles, I have made a custom property page to
work. But I can not make Outlook to invoke my help.chm file for that
page.

I'm setting the HelpFile parameter with full path to my help.chm in
GetPageInfo method, but no result :(

It just discards F1 button.

Any help?

Cheers
Sunny
 
I don't know if this helps because I don't use C#, but in a VB 6 property
page I set both HelpFile and HelpContext. I also include the declarations
for help in a code module and initialize the settings.

' in a code module
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

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


'GetPageInfo method
Private Sub PropertyPage_GetPageInfo(HelpFile As String, HelpContext As
Long)
On Error Resume Next

'Call help here
HelpFile = g_strWinDir
HelpContext = 1070
End Sub

'in my initialization calls
g_strWinDir = basRegistryPP.GetWinDir 'call registry function to find
"Windows" folder
g_strWinDir = g_strWinDir & "\help\remindermanager.chm"
App.HelpFile = g_strWinDir
 
Hi Ken, thanks for the input. Some questions inline:

I don't know if this helps because I don't use C#, but in a VB 6 property
page I set both HelpFile and HelpContext. I also include the declarations
for help in a code module and initialize the settings.

' in a code module
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

I've never done COM/ActiveX VB programing, so, what is a code module.
I.e. where exactly you put that function? And where from you call it?
'in my initialization calls
g_strWinDir = basRegistryPP.GetWinDir 'call registry function to find
"Windows" folder
g_strWinDir = g_strWinDir & "\help\remindermanager.chm"
App.HelpFile = g_strWinDir

Where you put that initialization calls. And what is "App" ?

I guess I can do the interop call to that .ocx, but I do not know where
and when.

Thanks again for your help.

Sunny
 
A code module is a place that stores code that is accessible to the entire
program. For a C-like language I suppose it could be a header file or any
place else you can declare various constants and reference the Help library
OCX.

App is the application (COM addin) in VB code. That has a property called
HelpFile. I have no idea what C# provides for that. I call the
initialization code when my addin starts up, in the InitHandler class that
is called from the On_Connection event handler.

That is how it's done in COM programming. Using the Interop I have no idea
what equivalent functions are provided. See if there's any information about
this for .NET languages at
http://www.microeye.com/resources/res_outlookvsnet.htm
 
Hi Ken,
pls, read inline:

A code module is a place that stores code that is accessible to the entire
program. For a C-like language I suppose it could be a header file or any
place else you can declare various constants and reference the Help library
OCX.
Ok, I've got the idea. I know where to place this. And I know how to get
reference to that function in the .ocx file. The only confusion is, that
I can not see where from you call this HtmlHelp function in your code.
App is the application (COM addin) in VB code. That has a property called
HelpFile. I have no idea what C# provides for that. I call the
initialization code when my addin starts up, in the InitHandler class that
is called from the On_Connection event handler.

I can not see COMAddIn class to have HelpFile property. I do not see it
for the Application object as well. Some more help to find it?
That is how it's done in COM programming. Using the Interop I have no idea
what equivalent functions are provided. See if there's any information about
this for .NET languages at
http://www.microeye.com/resources/res_outlookvsnet.htm

I can not find anything related there. But with interop theoretically :)
there should be a way to repeat anything from the COM world. So if I
know exactly how it is done in VB, maybe I can repeat it in C#.

Please, if you have a very sample addin, which just creates a very
simple property page with a help, please, send me the VB code, so I can
take a look. If you do not want to post in the group, use:
sunnyXicebergwirelessOcom. Replace X with @ and O with "."

Thanks again
Sunny
 
Back
Top