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
1,616 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 7

Accepted Solution

by:
help-info earned 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 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