?
Solved

CHM File generated with Robohelp: How do I retain the user size and placement of the help window?

Posted on 2007-11-28
6
Medium Priority
?
1,641 Views
Last Modified: 2012-06-21
I have generated a CHM file using RoboHelp for Word 6 build 099. I am able to open the help file from my C# project and I can open with context sensitivity. My problem is that the help window always opens to the original size. That is,  if the user resizes the help window, closes it, and then reopens the help window, it does not retain the user's resizing information.
Is there a setting in RoboHelp (or elsewhere) that will retain the user's resetting of the help file winow size/placement information?
0
Comment
Question by:cupper
  • 3
  • 2
6 Comments
 

Expert Comment

by:Sephrial
ID: 20367905
No, there is no setting in RoboHelp to retain window size placement/size.  For WinHelp projects you can define the window as a percentage of the screen size or with an absolute pixel size.  For HTML Help and other output formats, the placement of the window is determined by the viewer or browser for that file format (clients can use different viewers).  If there is no way for those browsers to pass in the placement and the viewer doesn't retain those settings automatically, you may be out of luck.
0
 

Author Comment

by:cupper
ID: 20367963
Is there something that can be done outside of RoboHelp? I've seen postings on other forums related to a file in the documents and settings directory with the name HH.DAT.  It seems like this file stores information related to the coordinates for the help window. I thought maybe there was a way to set this in Robohelp but if not, I would accept a solution that is external to Robohelp. I know I have used CHM files from software distributors that remember the screen settings.
 
0
 

Expert Comment

by:Sephrial
ID: 20368481
Hum, actually it looks like you CAN set the persistance of the window size using HHW:

Check out Char James-Tanny's HTML Help Workshop tutorial (Customizing the Window Section):
http://frogleg.mvps.org/helptechnologies/htmlhelp/pdfs/char_hhw.zip
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Accepted Solution

by:
help-info earned 2000 total points
ID: 20368570
I'm not using RoboHelp and I'm not quite sure but expecting RoboHelp has such options to store the help window's user settings. So I'd recommend to look deep into all options of RoboHelp.

You are right the settings are saved in the hh.dat file. But you cannot edit this file. You can do that by HTMLHelp Workshop *before* compiling your HTMLHelp (CHM) project. . At the window size and definiton here is a option "Save user defined window position after first use". Look for something like this at RoboHelp.
In a *.hhp file you can edit the window default values (decimal) by a plain text editor like Notepad. For the "save position" option you need to add hex values (see: 0x23520 changed to 0x63520)
example1:
[WINDOWS]
main="Online Help","CHM-example.hhc","CHM-example.hhk","index.htm","index.htm",,,,,0x23520,275,0x1046,[317,243,947,683],0xb0000,,,,,,0
example2:
[WINDOWS]
main="Online Help","CHM-example.hhc","CHM-example.hhk","index.htm","index.htm",,,,,0x63520,275,0x1046,[317,243,947,683],0xb0000,,,,,,0

You maybe intested in following link:
http://www.help-info.de/en/xml/maml_faq.xml#htmlhelp

HTH
Best regards
Ulrich Kulle
Microsoft MVP - Windows Help
***********************************
http://www.help-info.de
***********************************
0
 

Expert Comment

by:Sephrial
ID: 20369088
In conclusion, your best bet is to compile the CHM file with a default value for the window size/position, and check the apply persistence option.

If you did not have access to change the CHM's properties, or they were overridden by the application, than you would want to call the CHM file viewer from an API and attempt to modify the size of the window using the window handle.  The only problem is the viewer may override this by reading from that DAT file for example.  On the page that help-info provided, you see they have a HTML Help API for C++/MFC and they call the HTMLHelp() constructor and pass in a HWND pointer.  So, you may be able to change the size of the window programatically as well.  I don't know if there is a C# equivalent API for HTMLHelp though.
0
 

Author Closing Comment

by:cupper
ID: 31411488
Ulrich,
Thank you. While your answer didn't provide direct information on RoboHelp(I was never able to find a Robohelp equivalent for "Save user defined window position after first use"), I was able to modify the *.hhp file produced by Robohelp as you described. Once that was done, I was able to recompile using HTML Help workshop after I changed the hhp file produced by Robohelp.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month17 days, 2 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question