From: JCO on
Using VS2008, MFC Dialog App

In my menu, I have a Help>Information.

I don't want to display the typical help (.chm file). I have a simply .htm
file that I would like this menu to display. However, I don't want to
distribute the htm file. So here's my two Questions.

Question 1:
If I drag my Info.htm file onto the solution explorer it will display with
the source files. Does this mean it gets compiled as part of the exe
(regardless of any code)?

Question 2:
Assuming that this is true, what would be the easiest way to call this
Info.htm using the menu Help>Information?

Thanks


From: Goran on
On May 19, 9:02 pm, "JCO" <some...(a)somewhere.com> wrote:
> Using VS2008,  MFC Dialog App
>
> In my menu, I have a Help>Information.
>
> I don't want to display the typical help (.chm file).  I have a simply ..htm
> file that I would like this menu to display.  However, I don't want to
> distribute the htm file.  So here's my two Questions.
>
> Question 1:
> If I drag my Info.htm file onto the solution explorer it will display with
> the source files.  Does this mean it gets compiled as part of the exe
> (regardless of any code)?
> Question 2:
> Assuming that this is true, what would be the easiest way to call this
> Info.htm using the menu Help>Information?

If you distribute HTML with your app, you can use ShellExecute to
launch HTML viewer (a browser). You might add resources of type "HTML"
to your exe resources with resource editor and launch browser using res://
protocol. Examples are not hard to find, and there has been a similar
discussion on that here, not long ago. You can also put WebBrowser
control of IE into your about dialog and display same HTML.

Goran.
From: JCO on
Are there any choices if you don't want to distribute an htm file?

"Goran" <goran.pusic(a)gmail.com> wrote in message
news:b70939de-4038-4975-b876-5f6934394414(a)z33g2000vbb.googlegroups.com...
> On May 19, 9:02 pm, "JCO" <some...(a)somewhere.com> wrote:
>> Using VS2008, MFC Dialog App
>>
>> In my menu, I have a Help>Information.
>>
>> I don't want to display the typical help (.chm file). I have a simply
>> .htm
>> file that I would like this menu to display. However, I don't want to
>> distribute the htm file. So here's my two Questions.
>>
>> Question 1:
>> If I drag my Info.htm file onto the solution explorer it will display
>> with
>> the source files. Does this mean it gets compiled as part of the exe
>> (regardless of any code)?
>> Question 2:
>> Assuming that this is true, what would be the easiest way to call this
>> Info.htm using the menu Help>Information?
>
> If you distribute HTML with your app, you can use ShellExecute to
> launch HTML viewer (a browser). You might add resources of type "HTML"
> to your exe resources with resource editor and launch browser using res://
> protocol. Examples are not hard to find, and there has been a similar
> discussion on that here, not long ago. You can also put WebBrowser
> control of IE into your about dialog and display same HTML.
>
> Goran.

From: Stephen Myers on
JCO wrote:
> Are there any choices if you don't want to distribute an htm file?
>
> "Goran" <goran.pusic(a)gmail.com> wrote in message
> news:b70939de-4038-4975-b876-5f6934394414(a)z33g2000vbb.googlegroups.com...
>> On May 19, 9:02 pm, "JCO" <some...(a)somewhere.com> wrote:
>>> Using VS2008, MFC Dialog App
>>>
>>> In my menu, I have a Help>Information.
>>>
>>> I don't want to display the typical help (.chm file). I have a
>>> simply .htm
>>> file that I would like this menu to display. However, I don't want to
>>> distribute the htm file. So here's my two Questions.
>>>
>>> Question 1:
>>> If I drag my Info.htm file onto the solution explorer it will display
>>> with
>>> the source files. Does this mean it gets compiled as part of the exe
>>> (regardless of any code)?
>>> Question 2:
>>> Assuming that this is true, what would be the easiest way to call this
>>> Info.htm using the menu Help>Information?
>>
>> If you distribute HTML with your app, you can use ShellExecute to
>> launch HTML viewer (a browser). You might add resources of type "HTML"
>> to your exe resources with resource editor and launch browser using
>> res://
>> protocol. Examples are not hard to find, and there has been a similar
>> discussion on that here, not long ago. You can also put WebBrowser
>> control of IE into your about dialog and display same HTML.
>>
>> Goran.
>
Try this:

1. Save help document as help.RTF.

2. Add help.rtf to your resources.

3. Use LoadResource() etc to get a pointer to the resource as a string.

4. Load it into a Rich Edit Control.

Sorry that there are a number of details missing.

HTH
Steve
From: JCO on
Yeah I think I need more information. I created CHelpDlg class (derived
from CDialog) but could not put a RichEdit Control on it. It causes all
sorts of compile errors. Right now I have a regular CEdit set to handle
Multiple Lines, vertical & horz scrolls. This CEdit (ID = IDC_EDIT_HISTORY)
is as big as the CHelpDlg.

I don't know how to use the FindResource() & LoadResource() well enough to
make this work although I'm doing some reading on it now. The more I read
the more confusing it is so I'm not sure if I'm going down the wrong path or
not.

My way of adding the HistoryInfo.rtf file as a resource was to drag it to
the Resource Folder with in Visual Studio's Solution Explorer. When I
select the file History.rtf, the properties shows the relative path to be:
".\HistoryInfo.rtf". If that makes it a resource, great, but I just don't
know how to connect the dots.

Hope this is not to confusing... but more help is needed.

Thanks
JCO

"Stephen Myers" <""StephenMyers\"@discussions(a)microsoft.com"> wrote in
message news:uR8$cE1#KHA.420(a)TK2MSFTNGP02.phx.gbl...
> JCO wrote:
>> Are there any choices if you don't want to distribute an htm file?
>>
>> "Goran" <goran.pusic(a)gmail.com> wrote in message
>> news:b70939de-4038-4975-b876-5f6934394414(a)z33g2000vbb.googlegroups.com...
>>> On May 19, 9:02 pm, "JCO" <some...(a)somewhere.com> wrote:
>>>> Using VS2008, MFC Dialog App
>>>>
>>>> In my menu, I have a Help>Information.
>>>>
>>>> I don't want to display the typical help (.chm file). I have a simply
>>>> .htm
>>>> file that I would like this menu to display. However, I don't want to
>>>> distribute the htm file. So here's my two Questions.
>>>>
>>>> Question 1:
>>>> If I drag my Info.htm file onto the solution explorer it will display
>>>> with
>>>> the source files. Does this mean it gets compiled as part of the exe
>>>> (regardless of any code)?
>>>> Question 2:
>>>> Assuming that this is true, what would be the easiest way to call this
>>>> Info.htm using the menu Help>Information?
>>>
>>> If you distribute HTML with your app, you can use ShellExecute to
>>> launch HTML viewer (a browser). You might add resources of type "HTML"
>>> to your exe resources with resource editor and launch browser using
>>> res://
>>> protocol. Examples are not hard to find, and there has been a similar
>>> discussion on that here, not long ago. You can also put WebBrowser
>>> control of IE into your about dialog and display same HTML.
>>>
>>> Goran.
>>
> Try this:
>
> 1. Save help document as help.RTF.
>
> 2. Add help.rtf to your resources.
>
> 3. Use LoadResource() etc to get a pointer to the resource as a string.
>
> 4. Load it into a Rich Edit Control.
>
> Sorry that there are a number of details missing.
>
> HTH
> Steve